我无法挂载lvm损坏的硬盘,我不得不复制

我无法挂载lvm损坏的硬盘,我不得不复制

我有一个安装了 centos 的硬盘,我想使用 Fedora live USB 从中获取文件。我发现了一些关于它的有用帖子,第一次将其安装到 /mnt 并更改了其 fstab 文件,当我想再次安装它时,我无法安装它,它返回错误。上面我写了我所做的所有步骤。

[root@localhost ~]# lvdisplay 
--- Logical volume ---
LV Path                /dev/vg_dstkpi/lv_root
LV Name                lv_root
VG Name                vg_dstkpi
LV UUID                Sq7sV4-zQsX-0CH3-9HU2-ZTES-A6nI-hvNtfY
LV Write Access        read/write
LV Creation host, time dstkpi.dst.uz, 2016-05-14 18:35:10 -0400
LV Status              available
# open                 0
LV Size                50.00 GiB
Current LE             12800
Segments               1
Allocation             inherit
Read ahead sectors     auto
- currently set to     256
Block device           253:0

--- Logical volume ---
LV Path                /dev/vg_dstkpi/lv_home
LV Name                lv_home
VG Name                vg_dstkpi
LV UUID                5wA6g6-VfJW-g6dW-SZ7P-ncwj-at1h-c098Du
LV Write Access        read/write
LV Creation host, time dstkpi.dst.uz, 2016-05-14 18:35:30 -0400
LV Status              available
# open                 0
LV Size                94.71 GiB
Current LE             24247
Segments               1
Allocation             inherit
Read ahead sectors     auto
- currently set to     256
Block device           253:1

--- Logical volume ---
LV Path                /dev/vg_dstkpi/lv_swap
LV Name                lv_swap
VG Name                vg_dstkpi
LV UUID                aUbOVe-gbEn-LfKH-EQOu-etPN-FyOd-bCuxb3
LV Write Access        read/write
LV Creation host, time dstkpi.dst.uz, 2016-05-14 18:36:11 -0400
LV Status              available
# open                 2
LV Size                3.84 GiB
Current LE             984
Segments               1
Allocation             inherit
Read ahead sectors     auto
- currently set to     256
Block device           253:2

之后我想像这样安装它:

[root@localhost ~]# mount /dev/vg_dstkpi/lv_root /mnt/rescue/
mount: wrong fs type, bad option, bad superblock on /dev/mapper/vg_dstkpi-lv_root,
   missing codepage or helper program, or other error

   In some cases useful info is found in syslog - try
   dmesg | tail or so.

我打开了日志文件。

[root@localhost ~]# dmesg | tail
[ 2116.827233] ata3.00: configured for UDMA/133
[ 2116.827249] sd 2:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 2116.827252] sd 2:0:0:0: [sda] tag#0 Sense Key : Medium Error [current] 
[ 2116.827255] sd 2:0:0:0: [sda] tag#0 Add. Sense: Unrecovered read error - auto reallocate failed
[ 2116.827258] sd 2:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 0f b0 08 00 00 08 00
[ 2116.827260] blk_update_request: I/O error, dev sda, sector 1028104
[ 2116.827278] EXT4-fs (dm-0): can't read group descriptor 0
[ 2116.827298] ata3: EH complete
[ 2116.833657] EXT4-fs (dm-0): couldn't mount as ext3 due to feature incompatibilities
[ 2116.833954] EXT4-fs (dm-0): couldn't mount as ext2 due to feature incompatibilities

我也尝试过:

[root@localhost ~]# e2fsck -y /dev/vg_dstkpi/lv_root 
e2fsck 1.43.1 (08-Jun-2016)
e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/vg_dstkpi/lv_root
Could this be a zero-length partition?

答案1

sudo e2fsck -b 32768 /dev/mapper/vg_dstkpi-lv_root 这帮助我解决了问题!问题出在超级块中。

答案2

AFAICT 您的机器认为该磁盘已损坏。它甚至无法读取足够的数据来安装驱动器。您的下一步应该是使用类似的东西克隆驱动器dd_rescue

完成此操作后,您可以开始调查是否能够从中获取任何数据。

相关内容