一次修复磁盘的记录 (ext4 mount: wrong fs type, bad option, bad superblock)

$ sudo e2fsck -f /dev/sdb1
e2fsck 1.41.4 (27-Jan-2009)
e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/sdb1
Could this be a zero-length partition?

$ sudo dumpe2fs -f /dev/sdb1 | grep -i superblock
dumpe2fs 1.41.4 (27-Jan-2009)
dumpe2fs: Attempt to read block from filesystem resulted in short read while trying to open /dev/sdb1
Couldn't find valid filesystem superblock.


找到ext4中的备份superblock

$ sudo mke2fs -n /dev/sdb1
mke2fs 1.41.4 (27-Jan-2009)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
10010624 inodes, 40019915 blocks
2000995 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
1222 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, 23887872


利用工具e2fsck,修复文件系统

$ sudo e2fsck -f -b 32768 /dev/sdb1
e2fsck 1.41.4 (27-Jan-2009)
Superblock has an invalid journal (inode 8).
Clear? yes


你可能感兴趣的:(Linux)