When we mount any file system or disk on redhat linux server, we have received below error message some times.
[root@redhat001:~]# mount /redhat
mount: wrong fs type, bad option, bad superblock on /dev/mapper/system-lv_redhat
In above, /redhat is mount point and /dev/mapper/system-lv_redhat is device mapper name for this file system.
system is volume group and lv_redhat is logical volume.
To resolve this issue, you need to check below points and performed action.
1. Check /etc/fstab entry, file system type (eg. xfs, ext4 etc.) should be correct.
2. Check data integrity or the filesystem type using below command:
[root@redhat001:~]# file -sL /dev/mapper/system-lv_redhat
/dev/mapper/system-lv_redhat: SGI XFS filesystem data (blksz 4096, inosz 512, v2 dirs)
The output of the above command shows that filesystem type is XFS
3. Check filesystem type mentioned in /etc/fstab:
[root@redhat001:~]#cat /etc/fstab
/dev/mapper/system-lv_redhat /redhat xfs defaults 1 2
4. If bad superblock found on the server, we need to repair file system.
To check bad superblock you can run "e2fsck" and "tune2fs" for ext formatted file system and "xfs_repair" for xfs file system.
For above example, file system is xfs type , so please run the below command to repair file system.
Before doing this, please ensure, you have backup of this file system in tape library or any other backup solution.
[root@redhat001:~]# xfs_repair /dev/mapper/system-lv_redhat
It will take time to repair file system, also depend upon file system size. If file system size bigger, the repairing process will take long time.