Data disk mount mount: wrong fs type, bad option, bad superblock on /dev/sdb1 troubleshooting

Background: use dd backup, dd if=/data/filename of=/dev/sdb1 /data hangs under sdb1, resulting in abnormal backup, (remember to pay attention to the source path and target path when backing up), after the exception occurs, Use the following command to mount.

The mount command: mount /dev/sdb1 /data has the following error:

mount: wrong fs type, bad option, bad superblock on /dev/vdb1

On-site:
1. Look at the site, this error is reported and try to use a different file system to mount and try again, but it will not work 

 2. Try to mount through the file system. This time the file system is ext4. The result is that the mount fails.

Looking for a solution:

1. Try to use fsck to repair, the error is the same

3. Find a normal machine to obtain disk related information

e2fsck -f /dev/xvdb1

3.1 e2fsck is to check the correctness of ext2, ext3, ext4 and other file systems, -f even if there is no sign of error in the file system, it still checks the correctness forcibly. Note: Add the -y parameter later, otherwise you will need to continuously input y. Namely: e2fsck -f /dev/xvdb1 -y. The picture below is a screenshot of the original author of the app, because I forgot to take a screenshot during the laboratory test.

dumpe2fs -f /dev/xvdb1 |grep -i superblock

3.2 dumpe2fs will display the file system information on the superblock and the information of each block group (block group). Generally, there are many block group file systems, and the output will be very large, so add grep to filter the superblock

(The parameter of -f is not good in English, so I won’t translate it,,,
force dumpe2fs to display a filesystem even though it may have

  1. some filesystem feature flags which dumpe2fs may not understand

  2. (and which can cause some of dumpe2fs’s display to be suspect).)

mkfs.ext4 -n /dev/xvdb1

3.3 Look at the corresponding information if ext4 is formatted (-n does not actually create a file system, but only displays the created information)

3.4 Use the tool e2fsck to repair the file system (specify the superblock, you can get the starting position of the backup superblock by referring to dumpe2fs) and remember to add the -y parameter after it, otherwise you will need to continuously input y, which is very troublesome.

e2fsck -f -b 32768 /dev/xvdb1

3.5 Remount to restore

Recovery:
4, check the correctness of the file system, failed

5. Failed to obtain superblock

6, try to fix

Through the above method, the problem is solved.

Original address: Record a data disk mount mount: wrong fs type, bad option, bad superblock on /dev/vdb1 troubleshooting - Gray letter network (software development blog aggregation)

Guess you like

Origin blog.csdn.net/weixin_42132076/article/details/130360624