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.

Unmountable drive. Xfs_repair shows "bad magic in block N"

Featured Replies

I just noticed that another of my drives went into "unmountable" state. I just ran xfs_repair -nv and it shows multiple bad magic in block N messages. Last time it happened I lost over 600GB of data so I don't want it to happen again.

 

How should I proceed to avoid data loss?

orion2-diagnostics-20220111-0307.zip

  • Community Expert

Basically the only option you have is to run it again without -n, you should also have backups of anything important, Unraid or any RAID solution is not a backup.

  • Author
3 hours ago, JorgeB said:

Basically the only option you have is to run it again without -n, you should also have backups of anything important, Unraid or any RAID solution is not a backup.

 

I did that and it fixed it for like 10 minutes and then it unmounted again. I repeated the steps, fixed it but after another 30 minutes it happened again. Same disk every time.

  • Community Expert

If the disk is healthy I would suggest re-creating that filesystem, after backing it up.

  • Author

If I replace current drive with an empty one, rebuild it from parity and then recreate fs - should it work?

  • Community Expert
1 hour ago, paululibro said:

If I replace current drive with an empty one, rebuild it from parity and then recreate fs - should it work?

Rebuilding to a replacement might help if there are actual problems with the disk causing this, in that case no point in recreating fs.

 

1 hour ago, JorgeB said:

re-creating that filesystem, after backing it up

recreating it means format, so you have to back it up somewhere first.

  • Author

I'm rebuilding to a new disk. Currently at 18% but it already shows "Unmountable: not mounted".

 

6 minutes ago, trurl said:

recreating it means format, so you have to back it up somewhere first.

 

All data should still be backed up on the original drive. If recreating will be necessary I can copy from there.

  • Community Expert
Just now, paululibro said:

I'm rebuilding to a new disk. Currently at 18% but it already shows "Unmountable: not mounted".

You should try xfs repair on the rebuilt disk.

 

Also, new diagnostics might tell us if the rebuild is going well.

  • Community Expert

looks OK so far

  • Author

Rebuilding finished with 0 errors so I ran xfs_repair with no modify flag and got thousands of these lines:

 

out-of-order bno btree record 344 (108441151 18) block 0/651941
block (0,108917856-108917947) multiply claimed by bno space tree, state - 1
data fork in ino 15034795729 claims free block 37702356
free space (7,69487107-69487108) only seen by one free space btree

 

And thousands of files and directories marked to be junked:

 

entry "Season 1" in shortform directory 106340182 references non-existent inode 2183048375
would have junked entry "Season 1" in directory inode 106340182

 

Then, I plugged in original disk, mounted it with Unassigned Devices and compared tree command from today and yesterday - all data is still on it.

 

Now:

1. unplug original drive

2. go to maintenance mode

3. click on new drive

4. re-create fs (the only way I see is to set it something else like btrfs and then again to xfs)

5. connect and mount original drive

6. copy all files from orignal drive to the new one

 

Is that correct?

  • Community Expert

Looks good.

  • Author

It took almost 2 days to copy everything but all files are now on a new disk and everything seems to be working fine. It copied ~8TB without any I/O errors and I was getting them quiet often before. Thanks for help

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...

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.