Announcement

Collapse
No announcement yet.

BTRFS backup drive not mounting - filesystem damage?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    BTRFS backup drive not mounting - filesystem damage?

    Hi fellow BTRFS users!

    I've been using BTRFS for a few years now and really appreciate the convenient backup functionality! However, as of recently I suddenly can't mount my backup drive anymore.
    This is the error I am getting (in Dolphin):

    "An error occurred while accessing 'Home', the system responded: The requested operation has failed: Error mounting /dev/dm-2 at /media/me/AndreBackup: wrong fs type, bad option, bad superblock on /dev/mapper/luks-78a13171-516a-43bb-aa3b-d89c1c245765, missing codepage or helper program, or other error"

    I should also add that the filesystem resides in an encrypted LUKS volume; the unencrypted ext4 volume on the same physical external drive sill mounts fine.

    I did not do anything recently on the drive, except regular daily backups; I did travel with the drive a while ago, but it was working after my return (that was several weeks ago).

    Any idea what might be wrong here? or how to diagnose and fix it?
    Thanks!


    #2
    Also, I just ran `btrfs check` and I got:
    ```
    btrfs check --mode lowmem /dev/mapper/luks-78a13171-516a-43bb-aa3b-d89c1c245765
    Opening filesystem to check...
    parent transid verify failed on 2211042131968 wanted 19238 found 19240
    parent transid verify failed on 2211042131968 wanted 19238 found 19240
    parent transid verify failed on 2211042131968 wanted 19238 found 19240
    Ignoring transid failure
    Checking filesystem on /dev/mapper/luks-78a13171-516a-43bb-aa3b-d89c1c245765
    UUID: f41f3fe5-8ab0-4c77-aafe-60222203158d
    [1/7] checking root items
    [2/7] checking extents
    ERROR: invalid root generation for root 2, have 19240 expect (0, 19239)
    ERROR: extent[1453491757056, 6844416] referencer count mismatch (root: 2951, owner: 7782896, offset: 0) wanted: 69, have: 288
    ERROR: invalid generation for extent 2207356280832, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2207357067264, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2210881748992, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2210882011136, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2210882273280, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2210882535424, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211042131968, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211042295808, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211042328576, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211042476032, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211042541568, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211042607104, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211042869248, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211043246080, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211043262464, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211043491840, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211043524608, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211043590144, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211044261888, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211044671488, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211044687872, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211044753408, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211044802560, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211044884480, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211044917248, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211044950016, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211044999168, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211045048320, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211045097472, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211045146624, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211045195776, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211045359616, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211045392384, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211045539840, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211045588992, have 19240 expect (0, 19239]
    ERROR: invalid generation for extent 2211045752832, have 19240 expect (0, 19239]
    ERROR: invalid root generation for root 7, have 19240 expect (0, 19239)


    ```
    I've been running this over night, and it is still running - any idea how long this can take? the volume is about 2TB.
    Last edited by Chopstick; Dec 04, 2023, 09:11 AM.

    Comment


      #3
      Is it a S.M.A.R.T drive? If so, you can install smartmontools and use "sudo smartctl -i /dev/whatever" to check the hardware.
      If the drive hardware is OK you can use "btrfs rescue".

      Disclaimer: I've never used any BTRFS recovery tools because since I began using BTRFS in 2016 I've never had a failure.
      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
      – John F. Kennedy, February 26, 1962.

      Comment


        #4
        Thanks for the suggestion, GreyGeek! It's a bit late now... but I ended up just making a new LUKS-BTRFS partition on a different drive and started the back-ups from scratch. Seemed like the fastest solution.

        Comment

        Working...
        X