btrfs Unmountable: No file system


Recommended Posts

Disk 2 went to "Device is disabled, contents emulated" and although it lists the btrfs filesystem, it says 'Unmountable: No file system'. Checking the filesystem status results in 'checksum verify failed on 1312205111296 found 7723BE85 wanted 5C832EA0' and 'bad tree block 1312205111296, bytenr mismatch, want=1312205111296, have=15350558693598887749'. It's a very old drive and it might be failing. The error occurred when trying to run a VM which failed, the system locked and libvirt is located on the same drive. What would be the best steps forward for recovering the drive or the data on it?

Link to comment
Jul 24 15:06:30 helion unassigned.devices: Adding disk '/dev/sdd1'...
Jul 24 15:06:30 helion unassigned.devices: Mount drive command: /sbin/mount -t btrfs -o auto,async,noatime,nodiratime '/dev/sdd1' '/mnt/disks/WDC_WD1001FALS-XXX_WD-XXX'
Jul 24 15:06:30 helion kernel: BTRFS info (device sdd1): disk space caching is enabled
Jul 24 15:06:30 helion kernel: BTRFS info (device sdd1): has skinny extents
Jul 24 15:06:33 helion kernel: BTRFS error (device sdd1): bad tree block start, want 1312205111296 have 1312204832768
Jul 24 15:06:33 helion kernel: BTRFS warning (device sdd1): failed to read log tree
Jul 24 15:06:33 helion kernel: BTRFS error (device sdd1): open_ctree failed
Jul 24 15:06:33 helion unassigned.devices: Mount of '/dev/sdd1' failed. Error message: mount: /mnt/disks/WDC_WD1001FALS-XXX_WD-XXX: can't read superblock on /dev/sdd1. 
Jul 24 15:06:33 helion unassigned.devices: Partition 'WDC_WD1001FALS-XXX_WD-XXX' could not be mounted...

 

Edited by realies
Link to comment

I've also got these suggestions, which I am not sure would interfere with what unRAID expects, @limetech might have an idea?
 

Quote

since you can reconstruct the data I'd just mkfs the fs and reconstruct it, and convert metadata profile to DUP on those discs with "btrfs balance start -mconvert=dup <mountpoint>"

so space usage for metadata on the devices will double, but since it's 5 GiB, it'll become 10 GiB

but btrfs will be much more robust to such failures

and will be able to fix it automatically

 

Link to comment

The metadata should be using the DUP profile, I've been requesting that for some time and it was finally added on v6.7, but for new filesystems only, older ones need to be converted manually, you should do that for any exiting single profile metadata btrfs filesytem, though can't see how that helps for current problem, only for future ones.

Link to comment

Only shares from the failed disk are not visible which makes me think the filesystem is not corrupted. I remember that i have killed wget that was downloading virtio iso drivers and that caused cd /mnt/user to return 'Transport endpoint is not connected'. Rebooting the system made everything work, but later the disk wget was downloading the virtio drivers died.

 

Getting other suggestions from the #btrfs channel that it could also be a kernel bug considering the above.

Edited by realies
Link to comment
19 minutes ago, realies said:

Is 'btrfs restore' the only hope? 

Most likely, there could be more advanced recovery options but you'd need to ask for help on the btrfs mailing list.

 

20 minutes ago, realies said:

Why is the emulated disk not showing the missing data?

Like already mentioned, the emulated disk emulates the missing disk, but this includes emulating any existing filesystem corruption, parity can't help with that.

Link to comment
19 minutes ago, realies said:

it seems 'btrfs check --repair /dev/sdX1' managed to restore everything.

That's good to hear, btrfs fsck is constantly being improved, but still good to try other tools first as it can still make things worse.

 

As for data integrity you can just run a scrub, and don't forget to convert metadata do DUP.

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.