Menu

Restored Btrfs partition not mountable

Help
arnogon
2023-12-20
2023-12-23
  • arnogon

    arnogon - 2023-12-20

    I backuped my memory card which contained 1 non-boot Btrfs partition with clonezilla-live-20230426-lunar-amd64, and later restored it to the same card. After the restoration the partition is unmountable. I did all the checks before and after backup and restoration and didn't notice any error (device turned off afterwards as usual).

    user@debian:~$ sudo mount /dev/mmcblk0p1 /media/user/mmcblk0p1
    mount: /media/user/mmcblk0p1: can't read superblock on /dev/mmcblk0p1.
           dmesg(1) may have more information after failed mount system call.
    
     

    Last edit: arnogon 2023-12-22
  • Steven Shiau

    Steven Shiau - 2023-12-21

    The version you used was is old. Please give the latest stable one a try. E.g., 3.1.1-27 or 20231102-mantic:
    https://clonezilla.org/downloads.php

    Steven

     
  • arnogon

    arnogon - 2023-12-21

    My memory card has already been overwritten by the restored image, so I can't backup again. I did try to restore with 20231218-noble and the same problem persisted.

     
  • Steven Shiau

    Steven Shiau - 2023-12-22

    Btrfs changes very quickly, so....
    Partclone 0.3.27 supports Btrfs 6.5 IIRC. Next time when you save an image, do remember to use the latest Clonezilla live, even testing Clonezilla live.

    Steven

     
  • arnogon

    arnogon - 2023-12-22

    The source Btrfs partition was created last year so it couldn't be that new... Anyway, I'm more concerned about recovering the data. Is there anyway to fix the errors and get my data back?

     
  • Steven Shiau

    Steven Shiau - 2023-12-22

    Not sure. However, maybe you can try to use the Clonezilla live version you saved the image to restore it.
    You should be able to find the version info in the plain text file "Clonezilla-img" in your image.

    Steven

     
  • arnogon

    arnogon - 2023-12-22

    Yes, that would be 20230426-lunar. I used both that and 20231218-noble to try to restore my backup, but had the same problem (unmountable partition).

     
  • Steven Shiau

    Steven Shiau - 2023-12-22

    In that case, have you tried btrfsck?

    Steven

     
  • arnogon

    arnogon - 2023-12-22

    I got a bunch of errors with btrfsck.

    ref mismatch on [590504206336 131072] extent item 1, found 0
    data extent[590504206336, 131072] bytenr mimsmatch, extent item bytenr 590504206336 file item bytenr 0
    data extent[590504206336, 131072] referencer count mismatch (root 256 owner 1193734 offset 134012928) wanted 1 have 0
    backpointer mismatch on [590504206336 131072]
    owner ref check failed [590504206336 131072]
    ref mismatch on [590504337408 126976] extent item 1, found 0
    data extent[590504337408, 126976] bytenr mimsmatch, extent item bytenr 590504337408 file item bytenr 0
    data extent[590504337408, 126976] referencer count mismatch (root 256 owner 1193734 offset 140697600) wanted 1 have 0
    backpointer mismatch on [590504337408 126976]
    owner ref check failed [590504337408 126976]
    ref mismatch on [590504464384 126976] extent item 1, found 0
    data extent[590504464384, 126976] bytenr mimsmatch, extent item bytenr 590504464384 file item bytenr 0
    data extent[590504464384, 126976] referencer count mismatch (root 256 owner 1193734 offset 140828672) wanted 1 have 0
    backpointer mismatch on [590504464384 126976]
    owner ref check failed [590504464384 126976]
    ref mismatch on [590504591360 135168] extent item 1, found 0
    data extent[590504591360, 135168] bytenr mimsmatch, extent item bytenr 590504591360 file item bytenr 0
    data extent[590504591360, 135168] referencer count mismatch (root 256 owner 1193734 offset 142213120) wanted 1 have 0
    backpointer mismatch on [590504591360 135168]
    owner ref check failed [590504591360 135168]
    ERROR: errors found in extent allocation tree or chunk allocation
    [3/7] checking free space tree
    [4/7] checking fs roots
    parent transid verify failed on 192339574784 wanted 23952 found 23989
    Ignoring transid failure
    ERROR: root [256 0] level 0 does not match 2
    
    ERROR: errors found in fs roots
    Opening filesystem to check...
    Checking filesystem on /dev/mmcblk0p1
    UUID: 5690ec67-0e23-4592-a381-01432a8abbb0
    found 386806038528 bytes used, error(s) found
    total csum bytes: 376931744
    total tree bytes: 509050880
    total fs tree bytes: 81920
    total extent tree bytes: 100974592
    btree space waste bytes: 34763056
    file data blocks allocated: 5087232
     referenced 9916416
    
     
  • arnogon

    arnogon - 2023-12-22

    And this was with --repair

    [1/7] checking root items
    Fixed 0 roots.
    [2/7] checking extents
    ref mismatch on [13631488 12288] extent item 1, found 0
    data extent[13631488, 12288] bytenr mimsmatch, extent item bytenr 13631488 file item bytenr 0
    data extent[13631488, 12288] referencer count mismatch (root 256 owner 414370 offset 0) wanted 1 have 0
    backpointer mismatch on [13631488 12288]
    owner ref check failed [13631488 12288]
    parent transid verify failed on 192339574784 wanted 23952 found 23989
    Ignoring transid failure
    ERROR: root [256 0] level 0 does not match 2
    
    failed to repair damaged filesystem, aborting
    
     
  • Steven Shiau

    Steven Shiau - 2023-12-23

    In that case, I believe when saving, the image was broken.
    Sorry for that. Btrfs does change very fast, so...

    Steven

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.