AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题 / 1521890
Accepted
user234899
user234899
Asked: 2020-02-02 00:06:54 +0800 CST2020-02-02 00:06:54 +0800 CST 2020-02-02 00:06:54 +0800 CST

rsync 冻结后无法读取 RAID 10 LUKS 阵列上的超级块(带有 Budgie 桌面的 Ubuntu Server 18.04.3)

  • 772

在从外部 LUKS raid 10 阵列(通过 e-sata 连接)到内部驱动器的 rsync 期间,操作系统冻结。

重新启动后,我无法再访问外部 RAID 10。当我单击它时,我收到以下错误消息:

Error mounting filesystem
Error mounting /dev/dm-0 at /media/marco/EXT_RAID_10: can't read superblock
on /dev/mapper/luks-49aa238c-96bc-4bf6-abeb-1f4b018ccabe (udisks-error-quark, 0)

该系统是带有 Budgie 桌面的 Ubuntu 服务器 18.04.3。所有 4 个驱动灯都亮起,表明它们应该没问题

sudo fdisk -l 的输出:

Disk /dev/nvme0n1: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x373d828f

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda2            2048 468860927 468858880 223.6G  5 Extended
/dev/sda5       443695104 468860927  25165824    12G 82 Linux swap / Solaris
/dev/sda6            4096 226996223 226992128 108.2G 83 Linux
/dev/sda7       226998272 443693055 216694784 103.3G 83 Linux

Partition table entries are not in disk order.


Disk /dev/sdf: 3.7 TiB, 4000694927360 bytes, 7813857280 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B9829E9E-44BE-4381-BB42-387062B5252D

Device     Start        End    Sectors  Size Type
/dev/sdf1   2048 7813855231 7813853184  3.7T unknown


Disk /dev/mapper/luks-49aa238c-96bc-4bf6-abeb-1f4b018ccabe: 3.7 TiB, 4000690733056 bytes, 7813849088 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

sudo fsck.ext4 -v /dev/sdf1 的输出:

e2fsck 1.44.1 (24-Mar-2018)
ext2fs_open2: Bad magic number in super-block
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/sdf1

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

/dev/sdf1 contains a crypto_LUKS filesystem

sudo mke2fs -n /dev/sdf1 的输出:

Creating filesystem with 976731648 4k blocks and 244187136 inodes
Filesystem UUID: 11a09e27-4114-4555-8dd3-afcf61deacc4
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
    4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
    102400000, 214990848, 512000000, 550731776, 644972544

sudo e2fsck -b 98304 /dev/sdf1 的输出:

e2fsck 1.44.1 (24-Mar-2018)
e2fsck: Bad magic number in super-block while trying to open /dev/sdf1

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

/dev/sdf1 contains a crypto_LUKS filesystem

最后,问题只是驱动器由于中断的 rsync 命令而被锁定(当我中断一个简单的 cp 命令时也发生了)。LUKS 加密使这个简单的锁定变得复杂,给出了神秘的(双关语)错误消息。我通过按照以下说明移除锁解决了这个问题: https ://alvinabad.wordpress.com/2012/09/22/how-to-recover-a-luks-encrypted-disk/

简而言之:

1. Boot from a recovery disk

2. Determine /dev address of locked LUKS partition (in this case /dev/sdh1):
~$ sudo fdisk -l

3. Display LUKS header info:
~$ sudo cryptsetup -v luksDump /dev/sdh1

4. Unlock partition with LUKS passphrase:
~$ sudo cryptsetup -v luksOpen /dev/sdh1 sdh1_crypt

5. Mount drive using Nautilus or manually:
~$ mkdir /tmp/disk
~$ sudo mount /dev/mapper/sdh1_crypt /tmp/disk
luks superblock
  • 2 2 个回答
  • 681 Views

2 个回答

  • Voted
  1. Best Answer
    user234899
    2020-02-09T14:13:35+08:002020-02-09T14:13:35+08:00

    改变了电缆并做到了这一点: https ://alvinabad.wordpress.com/2012/09/22/how-to-recover-a-luks-encrypted-disk/

    为我工作:

    1. Boot from a recovery disk
    
    2. Determine /dev address of locked LUKS partition (in this case /dev/sdh1):
    ~$ sudo fdisk -l
    
    3. Display LUKS header info:
    ~$ sudo cryptsetup -v luksDump /dev/sdh1
    
    4. Unlock partition with LUKS passphrase:
    ~$ sudo cryptsetup -v luksOpen /dev/sdh1 sdh1_crypt
    
    5. Mount drive using Nautilus or manually:
    ~$ mkdir /tmp/disk
    ~$ sudo mount /dev/mapper/sdh1_crypt /tmp/disk
    
    • 1
  2. vssher
    2020-02-02T23:53:44+08:002020-02-02T23:53:44+08:00

    但是,我没有 Raid 设置,我自己在使用 Linux 时遇到了错误。
    确保它不是您的电缆 eSATA。

    如何修复 Ubuntu 上的文件系统错误

    使用 Ubuntu 安装 CD 引导您的系统,然后选择测试 Ubuntu。
    接下来,打开一个终端,并使用命令行
       $ sudo fsck.ext3 -f /dev/sdaX
    启动搜索任何错误。应修复所有发现的错误。 您可以通过键入sudo touch /forcefsck

    要求系统在下次重新启动时检查文件系统
      

    • 0

相关问题

  • 使用 vgchange 禁用后卷组仍然处于活动状态?

  • LUKS 模式下 dm-crypt / cryptsetup 的默认加密密钥大小是多少?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    v15 为什么通过电缆(同轴电缆)的千兆位/秒 Internet 连接不能像光纤一样提供对称速度? 2020-01-25 08:53:31 +0800 CST
  • Martin Hope
    fixer1234 “HTTPS Everywhere”仍然相关吗? 2019-10-27 18:06:25 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve