0

we have rhel 7.2 machine , and machine is VM type

since one of the machines disk failure,we performed xfs_repair /dev/sdb ( in single user mode )

finally after 1 hour we get the following message

could not find valid secondery superblock

is it means that we cant repair the disk?

enter image description here

1
  • It's dead, Jim. According to multiple Google results which mention "xfs_repair could not find valid secondary superblock" your filesystem is dead and you should recover files from backup. If there's no backup, you're SOL. There are Windows utilities which might help you recover files but I cannot vouch for it as I've never used them: raisedr.com sysdevlabs.com/product.php?id=ufsxs Aug 10 '20 at 10:50
1

It's impossible to answer your question since you are providing zero detail about your issue. What kind of disk failure and what else was done? And you're sure XFS was on /dev/sdb (full disk) instead of a partition? This is slightly unusual.

So I'd just like to point out that the output by xfs_repair is what you get when running it on a full zero device that isn't and never has been XFS.

# truncate -s 40M foobar.img
# losetup --find --show foobar.img 
/dev/loop0
# xfs_repair /dev/loop0
Phase 1 - find and verify superblock...
bad primary superblock - bad magic number !!!

attempting to find secondary superblock...
...........................Sorry, could not find valid secondary superblock
Exiting now.

So, in case you're using the wrong device or making another similar mistake, the output doesn't mean a thing.

Tools like xfs_repair, fsck, etc. should be used with caution, they can cause more damage. In a data recovery situation, you should always have a full disk copy or a copy-on-write layer to experiment with.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.