In Linux, file system corruption can occur due to unusual operations. For example, a super block is damaged. A super block is the core file of a file system, which records the type, size, and free disk blocks of the file system. If the super block of a filesystem is damaged, Linux cannot identify the system. If you moust specify the filesystem type is displayed when the system image is mounted, the system cannot be accessed

  1. Simulation corrupts the file system

    • Dd if= /dev/zero of=dev/ SDB bs=512 count=4

    • Dd: Copy if= source file or source device

    • Of = Target file or target device

    • Bs = byte size

    • Count = Number of replication times

  2. Try to mount /dev/sdb1 to/MNT

    • mount /dev/sdb1 /mnt/

    • The following information is displayed: The file system type is incorrect, the options are incorrect, and the super block exists in /dev/loop0

  3. Repair the file system

    1. Restart the system

    2. Enter the Character screen

    3. Enter the password of user root to go to the temporary shell environment

    4. CentOS 6 repair: FSCK -y -t ext4 /dev/sdb1

    5. CentOS 7 Repair: xfs_repair -t XFS /dev/sdb