Linux: recover data from xfs
I have a broken XFS filesystem on one of my HDD.
I ran xfs_repair
which was not able to find a secondary superblock to repair the filesystem. Therefore, I am not able to mount the HDD/partition.
I tried to make a backup to a NTFS HDD via ddrescure
to an iso-file.
Unfortunately, I discovered now that my target drive is 4 KiB smaller than the source drive. That's why I was not able to complete the backup.
ddrescure
showed that there were actually no bad blocks or sectors on my HDD, which lets me assume, that my data is still there but I cannot access it.
I am doing this from a Live-Ubuntu-Stick, because I was not able to see/mount the HDD via Windows and some tools for this use case (mounting XFS in Windows).
Is there any way to access/recover my data from the incomplete image or directly from my HDD?
Edit: My out from xfs_repair /dev/sdc1
Phase 1 - find and verify superblock...
couldn't verify primary superblock - not enough secondary superblocks with matching geometry !!!
attempting to find secondary superblock...
[then plenty of these lines]
found candidate secondary superblock...
unable to verify superblock, continuing...
[then it finishes with this]
Sorry, could not find valid secondary superblock
Exiting now.
Solution 1:
Clone the disk so that you have more than one copy of it.
Open a support case with whomever maintains XFS for your operating system. Get xfs_metadump
output to show the current state of the file system, including if you have a secondary superblock.
Restore any backups you have. Or prepare users to rebuild what was on there.