Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

XFS repair on mounted drive

Featured Replies

Is it correct that xfs_repair runs on an unraid-mounted drive without warning that it should be unmounted?

 

I lost some data recently, possibly (but possibly not) because of doing this. It was not critical and I am not complaining, but it does seem like a potential data destroyer if someone runs xfs_repair and forgets to stop the array first.

 

I may be wrong about all this, but I thought I should mention it just in case it's a problem and you guys aren't aware of it.

 

Jason

  • Community Expert

What were the exact commands you used?

  • Author

I connected to my unraid box with SSH, then ran:

 

xfs_repair /dev/sdi1

 

... or some similar designation of the device (it might have been sdn1 or some such).

 

I subsequently ran xfs_repair -L /dev/sdi1

 

I realise this was not the right thing to do on a mounted filesystem and it may have caused some filesystem corruption (I ended up with some stuff in LOST+FOUND), but I was really just experimenting.

 

I seem to recall that other filesystem repair tools - for reiserfs and btrfs - decline to run on a mounted filesystem, or am I misremembering?

 

  • Community Expert

With reiserfs, it is usually run against the md device instead of the sd device. The md device includes parity updates with any changes made. Not sure if the same would apply to xfs or not.

  • Author

I see. And it seems like xfs_repair does pick up md-devices correctly. So perhaps the answer is simply that I should have run /dev/md1 instead?

Yes,  the same for all filesystems. If you run against /dev/sd# you just invalidated your parity as you did updates that bypass the /dev/md#.

  • Author

Thanks! Well, I feel a bit dumb now but I am used to that ;)

Make sure you run a correcting parity check, otherwise your array remains invalid.

  • Author

Thanks. Yep, I have since done a correcting parity check.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.