XFS repair on mounted drive


Recommended Posts

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

Link to comment

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?

 

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.