[CentOS] mounting XFS RAID-1 disk partition that needs repair.

Tue Nov 23 15:03:11 UTC 2021
Simon Matter <simon.matter at invoca.ch>


> I'm attempting to extract data from a HD that has a bunch of linux-raid
> partitions, including one large one with data I need to save off the disk.
> I actually have two drives like that (both not from the same RAID pair),
> and one of them I was successful in creating a MD device so I could mount
> it RO and copy off a ton of data.
> the second one fails to mount, saying the XFS filesystem is corrupted.
> Attempting to run XFS_repair I get a message that the filesystem is XFS-1
> and I need an older version of XFS tools to do it.

Are you sure the filesystem is really corrupt? Maybe it's only your kernel
which doesn't understand the old XFS version?

To use older xfs_repair, you can just download an older version like
xfsprogs-2.9.4-1.el4.centos.x86_64.rpm, extract it to a directory and call
the xfs_repair binary from the package.

I'm not sure whether you need a matching xfs kernel module to run
xfs_repair successfully.