我在笔记本上使用Linux。 我的笔记本最近落在地上,现在我正在尽可能多地保存损坏的硬盘上的数据。 我可以从Linux Live CD启动笔记本。
长话短说:一个ext4分区不可挂载,但我可以尝试通过fsck.ext4来修复它。 我也可以尝试首先尝试恢复硬盘上的坏块(可能通过SpinRite)。 我可以先做什么?
详细信息:
这是我的动力:
# fdisk -l Disk /dev/sda: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000080 Device Boot Start End Blocks Id System /dev/sda1 * 1 3824 30716248+ 7 HPFS/NTFS /dev/sda2 3825 19449 125507812+ 83 Linux /dev/sda3 19450 19457 64260 83 Linux
让我们忘记/ dev / sda1 NTFS分区,不是那么重要。 第三个分区/ dev / sda3只是/ boot,也不重要。 第二个/ dev / sda2是LVM的物理空间(见下文)。
逻辑组/ dev / group1 / arch由dm-crypt LUKSencryption,我无法打开它,那里的数据可能会丢失。 逻辑组/ dev / group1 / data和/ dev / group1 / data2是ext4卷。 我可以在外部驱动器上挂载/ dev / group1 / data2( mount -t ext4 -o ro,noload / dev / group1 / data2 / mnt / data2 )和备份数据。 但是我不能mount / dev / group1 / data:
# mount -t ext4 -o ro,noload /dev/group1/data /x/data mount: wrong fs type, bad option, bad superblock on /dev/mapper/group1-data, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so
fsck不起作用:
# fsck.ext4 -n /dev/group1/data e2fsck 1.41.11 (14-Mar-2010) fsck.ext4: Attempt to read block from filesystem resulted in short read while trying to open /dev/group1/data Could this be a zero-length partition?
dumpe2fs也没有find超级块:
# dumpe2fs /dev/group1/data dumpe2fs 1.41.11 (14-Mar-2010) dumpe2fs: Attempt to read block from filesystem resulted in short read while trying to open /dev/group1/data Couldn't find valid filesystem superblock.
我唯一能做的就是试着找出superblock通常的位置:
# mkfs.ext4 -n /dev/group1/data mke2fs 1.41.11 (14-Mar-2010) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 5242880 inodes, 20971520 blocks 1048576 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=0 640 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000
…并使用以下其中一个超级块启动fsck:
# fsck.ext4 -n -b 229376 /dev/group1/data e2fsck 1.41.11 (14-Mar-2010) One or more block group descriptor checksums are invalid. Fix? no Group descriptor 0 checksum is invalid. IGNORED. Group descriptor 1 checksum is invalid. IGNORED. Group descriptor 2 checksum is invalid. IGNORED. Group descriptor 3 checksum is invalid. IGNORED. Group descriptor 4 checksum is invalid. IGNORED. Group descriptor 5 checksum is invalid. IGNORED. ... Group descriptor 637 checksum is invalid. IGNORED. Group descriptor 638 checksum is invalid. IGNORED. Group descriptor 639 checksum is invalid. IGNORED. /dev/group1/data contains a file system with errors, check forced. Resize inode not valid. Recreate? no Pass 1: Checking inodes, blocks, and sizes ...here I pressed Ctrl-C...
所以 – 它显示了很多错误,但它似乎会尝试修复(如果我使用fsck.ext4 -y当然是fsck.ext4 -n)。
其他选项 – 我的朋友有SpinRite 6启动CD,这是告诉是最好的scheme来修复坏块。
所以我的问题是 – 我应该
非常感谢任何提示。
LVM结构:
# pvdisplay --- Physical volume --- PV Name /dev/sda2 VG Name group1 PV Size 119.69 GiB / not usable 2.22 MiB Allocatable yes (but full) PE Size 4.00 MiB Total PE 30641 Free PE 0 Allocated PE 30641 PV UUID 0k3Zl5-Q7BD-rb8J-9jTZ-2uii-GSGd-B339JB # vgdisplay --- Volume group --- VG Name group1 System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 10 VG Access read/write VG Status resizable MAX LV 0 Cur LV 4 Open LV 1 Max PV 0 Cur PV 1 Act PV 1 VG Size 119.69 GiB PE Size 4.00 MiB Total PE 30641 Alloc PE / Size 30641 / 119.69 GiB Free PE / Size 0 / 0 VG UUID kKhvri-OVpL-uhCP-T4an-qXIJ-4XL0-kn9Ifi # lvdisplay --- Logical volume --- LV Name /dev/group1/swap VG Name group1 LV UUID wpDink-01q0-peLc-29at-5kgP-YO3a-8bNrb7 LV Write Access read/write LV Status available # open 0 LV Size 1.50 GiB Current LE 384 Segments 1 Allocation contiguous Read ahead sectors auto - currently set to 256 Block device 252:0 --- Logical volume --- LV Name /dev/group1/arch VG Name group1 LV UUID S1TZkr-y62z-dOuc-D38G-nuCH-1ilc-y2jqMa LV Write Access read/write LV Status available # open 0 LV Size 15.00 GiB Current LE 3840 Segments 1 Allocation contiguous Read ahead sectors auto - currently set to 256 Block device 252:1 --- Logical volume --- LV Name /dev/group1/data VG Name group1 LV UUID 2R4LNv-sHPh-E7ES-goIF-5nUz-tQyj-GOiwvC LV Write Access read/write LV Status available # open 0 LV Size 80.00 GiB Current LE 20480 Segments 1 Allocation contiguous Read ahead sectors auto - currently set to 256 Block device 252:2 --- Logical volume --- LV Name /dev/group1/data2 VG Name group1 LV UUID 4VqpZj-uOBi-OAIZ-1IXA-G6mj-Qgfb-c6RYqw LV Write Access read/write LV Status available # open 1 LV Size 23.19 GiB Current LE 5937 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 252:3
我要做的第一件事就是使用liveCD上的ddrescue创build驱动器的备份映像。 如果驱动器有物理损坏,则可能会有一定的时间,直到完全失效。 然后,制作该图像的副本。
从那里,我没有build议你没有尝试过。 其他比我聪明的人将不得不在那里帮助你。