Ext4 HD recovery


To check superblock

fsck.ext4 -v /dev/sdX1

If there is superblock corruption, the above command will output something like this:

The superblock could not be read or does not describe a correct ext4
filesystem. If the device is valid and it really contains an 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

If there is corruption, find where superblock backups are kept with

mke2fs -n /dev/sdX1


Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 160563

Use backup to recreate superblock:

e2fsck -b 32768 /dev/sdX1

In case of journal corruption, mount disk as read only

mount -o ro,noload /dev/sdX1 /mnt/storage_tmp/

Create backup and replace the failing drive ASAP!


Comments are closed.