XFS all seem to have bad superblocks


Recommended Posts

I had an issue where a drive was corrupted, and the xfs_repair tool was unable to find any suitable superblocks.

 

Now I'd assume that a "good" disk would return something about good superblocks found and good magic numbers when you initially run it (xfs_repair -n /dev/sdX).  However all of mine are returning bad superblocks and bad magic numbers.

 

My question is two-fold:

1.  Does it matter?

2.  Is there some routine maintenance I should be running?

Link to comment
29 minutes ago, whoopn said:

Nevermind I'm an idiot

 

Don't be so hard on yourself. Was it the -n flag that was tripped you up? In case anyone else stumbles across this thread with a similar problem, the -n flag means no-modify, so to actually make the repair you have to run the command without it. The other thing I would say is that /dev/sdX if the identifier for the actual disk. In a parity protected array you should be using /dev/mdX in order to maintain parity.

xfs_repair /dev/mdX

 

Link to comment
35 minutes ago, John_M said:

The other thing I would say is that /dev/sdX if the identifier for the actual disk. In a parity protected array you should be using /dev/mdX in order to maintain parity.

 

And if you did repair the sdX device and it was part of the array, then you have invalidated parity so you will have to resync.

Link to comment
2 hours ago, whoopn said:

I had an issue where a drive was corrupted, and the xfs_repair tool was unable to find any suitable superblocks.

 

Now I'd assume that a "good" disk would return something about good superblocks found and good magic numbers when you initially run it (xfs_repair -n /dev/sdX).  However all of mine are returning bad superblocks and bad magic numbers.

 

My question is two-fold:

1.  Does it matter?

2.  Is there some routine maintenance I should be running?

If you use the /dev/sdX identifiers then you need to also include the partition number (i.e. /dev/sdX1).    However as was mentioned this invalidates parity so you would normally put the array into Maintenance mode and use /dev/mdX where X is the disk number.   Using the /dev/mdX names means that you do not need to include the partition and it maintains valid parity.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.