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.

BTRFS Critical Failure: Corrupt Leaf. Can I recover drive?

Featured Replies

Hi Everyone, looking for some help.

 

I have my array setup with 7 drives, a parity and a cache. The 7th drive (actually drive 10 in unraid) is an SSD that I kept my images for a Windows VM and Docker.

 

I came home the other day to see that the SSD had run out of space and was pausing my VM. So I needed to transfer some of the files from the Server applications I had installed (Plex etc, onto another drive) I successfully did this with midnight commander had about 40gb free. At some point then, the drive appeared to failand , and the contents was being emulated. I wasn't sure what to do so I decided to restart the server and see what would happen. Once I restarted the server it said that the drive was unmountable and that I needed to format it. The contents don't seem to be being emulated any more because the shares stored on that drive (vdisks, isos) have disappeared from the Shares page, along with my VM and docker image.

 

I would really like to recover the data on this drive if its not dead. Is there any hope?

The console is spitting out this error when I boot:

 

Oct  9 23:05:08 KJS-Server kernel: BTRFS critical (device md10): corrupt leaf, invalid item offset size pair: block=548110336,root=1, slot=0
Oct  9 23:05:08 KJS-Server logger: mount: wrong fs type, bad option, bad superblock on /dev/md10,
Oct  9 23:05:08 KJS-Server logger:        missing codepage or helper program, or other error
Oct  9 23:05:08 KJS-Server logger:        In some cases useful info is found in syslog - try
Oct  9 23:05:08 KJS-Server logger:        dmesg | tail  or so

 

But the SMART report for the drive PASSED.

 

Has the filesystem failed and can I repair it?

 

Attached are the system diagnostics and SMART report for the drive.

 

Please please please help if you can, I can't really afford to lose my VM right now.

kjs-server-diagnostics-20161009-2320.zip

kjs-server-smart-20161009-2314.zip

I had a similar issue a little while back (in my case it was a power outage). Anyway, guys here suggested few things here: https://lime-technology.com/forum/index.php?topic=50147

 

In the end, although the copy command throw out many errors, the final vdisk image file i ended up with (of my W10 VM) was actually perfectly usable. I plugged in an extra HDD and mounted it using unassigned devices plugin, then used the copy command mentioned in that thread to copy the vdisk image to the new drive. Then re-linked the VM's vdisk location to the new location and it worked (it worked for me atleast, not sure how useful that would be for you). Also, if you copy the said vdisk image to another windows machine, you can try to use a zip client to extract it, even with errors, you might still have some luck salvaging some config/setting files etc that might be critical (for me, it was my plex database files and sonarr/couchpotato databases).

  • Author

Thanks for the help,

 

The SSD was unable to be mounted as a cache drive or an unassigned device. I think the filesystem was screwed up pretty badly.

 

In the end I was able to use BTRFS restore to get my docker img and ServerApps share off of the SSD, but the 400gb Windows VM wasn't recoverable. I stored all my actual files and documents in the array itself so nothing too big has been lost. Thanks for the help though.

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.