关于使用e2fsck修复磁盘bad magic number的问题

bobqi 2019-05-02 10:08:16
是这样的我用oopenmediavault过程中,经常出现checksum invalid的错误,
一般重启后会进入emergency mode,用fsck -y /dev/xxx处理后,又能运行,
但几次后发现文件出现丢失,因此想使用extundelete来恢复文件

执行extundelete 后提示

引用
block bitmap checksum does not match bitmap when trying to examine filesystem


于是我用e2fsck检查对应的磁盘和分区,
磁盘是sdb,分区是sdb1,整个磁盘只做了一个分区

fdisk -l /dev/sdb
引用
Disk /dev/sdb: 7.3 TiB, 8001563222016 bytes, 15628053168 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: B3B0F9A1-5267-43E4-BFB6-62AAD360C71F

Device Start End Sectors Size Type
/dev/sdb1 2048 15628053134 15628051087 7.3T Linux filesystem


对sdb1分区做e2fsck时正常,

对sdb磁盘做e2fsck时报错
e2fsck /dev/sdb
引用
e2fsck 1.43.4 (31-Jan-2017)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/sdb

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>

Found a gpt partition table in /dev/sdb



我找了网上的资料,用mke2fs -n 方式找了下备份block位置

mke2fs -n /dev/sdb
引用
mke2fs 1.43.4 (31-Jan-2017)
Found a gpt partition table in /dev/sdb
Proceed anyway? (y,N) y
Creating filesystem with 1953506646 4k blocks and 244191232 inodes
Filesystem UUID: 24fbea24-74cb-4ea6-8e0e-a014b81767be
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, 1934917632


然后再执行
e2fsck -b 32768 /dev/sdb
但是仍然不能继续
引用
e2fsck 1.43.4 (31-Jan-2017)
e2fsck: Bad magic number in super-block while trying to open /dev/sdb

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>


想请问各位大佬,这种情况我该怎么恢复我的数据,万分感谢,谢谢
...全文
1707 回复 打赏 收藏 举报
写回复
回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
相关推荐
发帖
系统维护与使用区
加入

1.9w+

社区成员

系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
申请成为版主
帖子事件
创建了帖子
2019-05-02 10:08
社区公告
暂无公告