repairing XFS filesystem

After a crash I checked my root partition using xfs_repair.
I was shocked, when xfs_repair did not find a superblock and no copy at all on the whole filesystem…

Though, I can still read only mount it and see the data.

Is there any way to recover or reconstruct a superblock? Well, xfs_repair did not find a second copy of it…

Thanks

You are sure that your root file system is of type XFS?

No comment:


 # LANG=C xfs_info /dev/sda
xfs_info: /dev/sda is not a mounted XFS filesystem
 # 

What about /dev/sda1 or /dev/sda2?

Try ‘fdisk -l /dev/sda’

Actually “parted --list” is better, it indicates which file system is on each partition. For example on this system, /dev/sdb2 and /dev/sdc3 are XFS partitions; /dev/sda1 is the ext4 boot and root partition:


 # xfs_info /dev/sdb2
meta-data=/dev/sdb2              isize=256    agcount=4, agsize=59736832 blks
         =                       sectsz=512   attr=2, projid32bit=0
         =                       crc=0        finobt=0 spinodes=0
data     =                       bsize=4096   blocks=238947328, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal               bsize=4096   blocks=116673, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
 # 
 # xfs_info /dev/sdc3
meta-data=/dev/sdc3              isize=512    agcount=4, agsize=23970112 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0 spinodes=0
data     =                       bsize=4096   blocks=95880448, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal               bsize=4096   blocks=46816, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
 # 
 # xfs_info /dev/sda1
xfs_info: /dev/sda1 is not a mounted XFS filesystem
 #