After power outage one of my btrfs USB drives does not mount

  • Hi,

    After a recent power outage one of my BTRFS USB drives does not mount anymore. OMV sees it but I can't mount it as an existing file system.


    Syslog says:

    Code
    monit[509]: 'filesystem_srv_dev-disk-by-uuid-359cd817-936a-4451-9dc7-e8ee7910a448' unable to read filesystem '/srv/dev-disk-by-uuid-359cd817-936a-4451-9dc7-e8ee7910a448' state
    
    monit[509]: 'filesystem_srv_dev-disk-by-uuid-359cd817-936a-4451-9dc7-e8ee7910a448' trying to restart
    
    monit[509]: 'mountpoint_srv_dev-disk-by-uuid-359cd817-936a-4451-9dc7-e8ee7910a448' status failed (1) -- /srv/dev-disk-by-uuid-359cd817-936a-4451-9dc7-e8ee7910a448 is not a mountpoint

    dmesg:

    Code
    [   94.706092] BTRFS: device fsid 359cd817-936a-4451-9dc7-e8ee7910a448 devid 1 transid 444227 /dev/sdb scanned by mount (5351)
    [   94.707858] BTRFS info (device sdb): using crc32c (crc32c-intel) checksum algorithm
    [   94.707865] BTRFS info (device sdb): disk space caching is enabled
    [   94.762953] BTRFS warning (device sdb): checksum verify failed on logical 2896434544640 mirror 1 wanted 0x49cf072e found 0x3837717b level 0
    [   94.762963] BTRFS error (device sdb): failed to read block groups: -5
    [   94.764358] BTRFS error (device sdb): open_ctree failed

    I can't scrub because the drive is not mounted obviously.


    Before I run something more destructive I thought I should ask here what the best move going forward would be.


    Thank you

  • Assuming that you don't have a recent backup to restore: I would dd image the entire drive now, and work on a copy of that image.

    btrfs-check would be the first thing I would throw at it.

    [CoolerMaster ELITE 110] [J1900I-C] [4GB RAM] [Samsung 2xHD103UJ + Hitachi 5K3000 2TB + 2xToshiba P300 HDWD130 3TB]

  • quick update:

    I've got it mounted ro with rescue=all and am currently dding everything onto another HDD (and that will take another day or 2). Big thanks to the btrfs mailing list. After dd I'll check if I can restore the HDD completely. Everything is here, it seems the only thing is that the checksum for the filetree(?) is not correct. I should have gone with ext4. I have to admit I have no clue with btrfs.

  • Just a final update:

    It was impossible to restore the HDD, I wiped it and copied over the backed up data. It was a strange case I have to admit. Later I got the drive to mount and I could access the data via SMB shares but for the system the drive was empty. I was told by some helpful person on the btrfs mailinglist that something must have happened with the btrfs space cache and something bad was written into it on first write after power recovery.


    Anyway. System is running again and APC sold another UPS.

  • Rossi

    Added the Label resolved
    • Official Post

    I should have gone with ext4. I have to admit I have no clue with btrfs.

    This is one of the problems with BTRFS. There seems to be very little available info for correcting file system issues or even knowledge of BTRFS' various CLI tools. This is why I didn't comment, earlier, in this thread.

    Because BTRFS is a COW file system that should do fine with dirty shut downs, originally, I was using it as a "traveling" data drive filesystem. That didn't work out as BTRFS seemed to be sensitive to power outages. I managed to fix one issue but, in two other cases, the solution was to format and start over. (To be fair, that was years ago - things may have changed.)

    Anyway. System is running again and APC sold another UPS.

    While I don't know for sure; I'm guessing the reason why I haven't had problems lately is because the external drive where BTRFS is being used is now on an UPS.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!