XFS (dm-10): SB validate failed

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 6
  • xfsprogs

Issue

  • Unable to mount xfs filesystem, getting below error.
XFS (dm-10): bad version
XFS (dm-10): SB validate failed

Resolution

  • Currently it is not possible to mount xfs filesystem on RHEL 6 which is formatted on RHEL 7.
  • In order to resolve the issue, mount the xfs filesystem on RHEL 7 and take the data backup. Recreate xfs filesystem on RHEL 6 and restore the data from the backup.

Root Cause

  • The features of XFS V5 are neither tested nor supported in Red Hat Enterprise 6. By default xfs filesystem created on RHEL 6 will have the below features.
 xfs_db -c version /dev/mapper/testvg-testlv
versionnum [0xb4a4+0xa] = V4,NLINK,ALIGN,DIRV2,LOGV2,EXTFLG,MOREBITS,ATTR2,LAZYSBCOUNT

Diagnostic Steps

  • Monitor dmesg while trying to mount xfs filesystem.
$ mount /dev/mapper/testvg-testlv /data
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

# dmesg | tail -f 
SGI XFS with ACLs, security attributes, large block/inode numbers, no debug enabled
SGI XFS Quota Management subsystem
XFS (dm-10): bad version
XFS (dm-10): SB validate failed
  • Check current xfs version and feature bits for the affected filesystem
On RHEL 6 system:
# xfs_db -c version /dev/mapper/testvg-testlv
xfs_db: WARNING - filesystem uses v1 dirs,limited functionality provided.
cache_node_purge: refcount was 1, not zero (node=0x1308210)
xfs_db: cannot read root inode (117)
cache_node_purge: refcount was 1, not zero (node=0x1308810)
xfs_db: cannot read realtime bitmap inode (117)
xfs_db: WARNING - filesystem uses v1 dirs,limited functionality provided.
versionnum [0xb4a5+0x18a] =

On RHEL 7 system:
# xfs_db -c version /dev/mapper/testvg-testlv
versionnum [0xb4a5+0x18a] = V5,NLINK,DIRV2,ALIGN,LOGV2,EXTFLG,MOREBITS,ATTR2,LAZYSBCOUNT,PROJID32BIT,CRC,FTYPE

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments