Ext 3或2文件系统恢复:错误的超级块,没有可用的备份超级块。我还能尝试什么?

程序员

我有一个WD Green 2TB硬盘驱动器,以前在带USB 2.0连接的外壳中使用。为了提高通信速度,我将其从包装盒中取出并通过SATA连接到我的PC。

在此硬盘驱动器上,我有一个分区,并且大约99%的人确定文件系统为EXT3。否则,它可能是EXT2或EXT4。在我将其取出之前,它工作得还不错,但是现在看来文件系统已损坏。

当我尝试挂载分区时,出现以下错误:

ubuntu@ubuntu:~$ sudo mount /dev/sdb1 /media/wd/
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
       missing codepage or helper program, or other error

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

我已经尝试了几种方法来修复和恢复超级块。我阅读了以下相关文章:

sudo fdisk -l 给我以下输出:

Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start        End    Sectors  Size Id Type
/dev/sdb1          64 3907024895 3907024832  1.8T 83 Linux

Parted并不表示它找到了任何文件系统:

Model: ATA WDC WD20EURX-63T (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      32.8kB  2000GB  2000GB  primary

我寻找了这样的备份超级块:

ubuntu@ubuntu:~$ sudo mke2fs -n -S /dev/sdb1
mke2fs 1.42.13 (17-May-2015)
Creating filesystem with 488378104 4k blocks and 122101760 inodes
Filesystem UUID: 9e7b7f80-e70c-474a-b889-eff034b72fb0
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
    4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
    102400000, 214990848

但是,当我使用检查所有这些备份时sudo e2fsck -b <BLOCK NUMBER> /dev/sdb1,它们似乎都不起作用。对于所有备份超级块,我得到相同的输出:

ubuntu@ubuntu:~$ sudo e2fsck -b 23887872 /dev/sdb1
e2fsck 1.42.13 (17-May-2015)
e2fsck: Bad magic number in super-block while trying to open /dev/sdb1

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>

我还尝试使用gpart扫描驱动器,这表明我错了,因为它是ext3文件系统:

ubuntu@ubuntu:~$ sudo gpart /dev/sdb

Begin scan...
Possible partition(Linux ext2), size(1907726mb), offset(1mb)
End scan.

Checking partitions...
Partition(Linux ext2 filesystem): primary 
Ok.

Guessed primary partition table:
Primary partition(1)
   type: 131(0x83)(Linux ext2 filesystem)
   size: 1907726mb #s(3907022848) s(2048-3907024895)
   chs:  (0/32/33)-(1023/254/63)d (0/32/33)-(243201/13/12)r

Primary partition(2)
   type: 000(0x00)(unused)
   size: 0mb #s(0) s(0-0)
   chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r

Primary partition(3)
   type: 000(0x00)(unused)
   size: 0mb #s(0) s(0-0)
   chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r

Primary partition(4)
   type: 000(0x00)(unused)
   size: 0mb #s(0) s(0-0)
   chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r

我尝试过的其他方法:

ubuntu@ubuntu:~$ sudo dumpe2fs /dev/sdb1
dumpe2fs 1.42.13 (17-May-2015)
dumpe2fs: Bad magic number in super-block while trying to open /dev/sdb1
Couldn't find valid filesystem superblock.

ubuntu@ubuntu:~$ sudo fsck /dev/sdb1
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdb1

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>

有人对我还可以尝试恢复数据有什么建议吗?

普西

看来您的分区表有些混乱。如果使用任何软件对驱动器进行分区的时间超过了7年左右,则分区应该从扇区2048开始,而不是从扇区63开始。根据gpart的说法,这实际上是文件系统的起始位置,因此您需要更正分区表。使用fdisk删除并重新创建分区,但起始扇区为2048。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

如何在无分区的qcow2的ext3文件系统中找到替代的超级块?

恢复ext4超级块

ext4超级块备份位置与记录的位置不同

如何从包含的ext3文件系统的块计数中计算分区备份所需的大小

ext4中的超级块副本

ext4超级块校验和?

ext4-超级块中的错误魔术数

EXT文件系统系列:为什么第一个超级块从偏移量1024开始?

在超级块中发现ext4损坏,但是可以挂载文件系统

如何创建块大小为1024且没有命令行保留块的EXT4文件系统?

EXT4-fs (sda2):写入超级块时出现 I/0 错误

自动恢复ext4文件系统

df和stat -f LVM上ext4文件系统的块计数差异

我需要使用Ext2和Ext3文件系统测试USB性能

为什么Ubuntu在我的硬盘上找不到ext3文件系统?

查看已挂载的ext2 / ext3 / ext4文件系统上的坏块

我正在运行 fsck 并得到“ext2fs_open2:超级块中的坏幻数”

最小的文件块大小(ext 3、4)

如何模拟ext3文件系统损坏?

如何模拟ext3文件系统损坏?

/ boot分区的Ext2文件系统

如何清除ext3 / ext4文件系统中的日志?

在ext4文件系统的目录中有许多文件会有什么后果?

什么决定了ext2文件系统中的最大文件大小

如果将EXT4文件系统中的一组特定块清零,会发生什么情况?

增加EXT3文件系统时是否有大小限制?

Ext JS布局错误

“警告:文件系统“ ext2”不支持嵌入。” 但是我的系统也没有嵌入,为什么grub会尝试?

快速格式化后恢复ext4文件系统