Results 1 to 7 of 7

Thread: Can't read superblock but btrfs super-recover says all supers are valid

  1. #1

    Default Can't read superblock but btrfs super-recover says all supers are valid

    I have a luks encrypted system with a btrfs root fs that is having some issues.

    Previously, from a Tumbleweed recovery CD, I was able to do the following and the final mount command would succeed, granting access to the file system.

    Given dmesg was showing btrfs verify errors, I attempted a btrfs scrub which was aborting immediately after starting. A btrfs repair was not run.

    After I reboot I started getting 'can't read superblock on /dev/mapper/system-root' though btrfs rescue super-recover 'All supers are valid, no need to recover'

    Is this a matter of the lvm superblock not being found, but the btrfs supers are? Any suggestions how to recover this partition so as to be able to mount again?

    smartctrl on the ssd shows no issues, pending or bad sectors, or other health issues.

    Interestingly, mount -t btrfs -o recovery /dev/mapper/system-root /tmp/root does work and presents the filesystem contents. But I'd like, if possible, to be able to recover the LV so it mounts directly again if possible.

    Thanks for any tips.

    Cheers,


    Code:
    0:rescue:~ # lsblk 
    NAME                 MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
    loop0                  7:0    0  58.9M  1 loop  /parts/mp_0000
    loop1                  7:1    0    14M  1 loop  /parts/mp_0001
    loop2                  7:2    0  33.3M  1 loop  /mounts/mp_0000
    loop3                  7:3    0  46.1M  1 loop  /mounts/mp_0001
    loop4                  7:4    0   4.1M  1 loop  /mounts/mp_0002
    sda                    8:0    0 232.9G  0 disk  
    ├─sda1                 8:1    0   399M  0 part  
    └─sda2                 8:2    0 232.5G  0 part  
      └─encrypted_device 254:0    0 232.5G  0 crypt 
        ├─system-root    254:1    0 228.5G  0 lvm   
        └─system-swap    254:2    0     4G  0 lvm   
    sr0                   11:0    1     4G  0 rom
    
    
    0:rescue:~ # file -s /dev/sda2
    /dev/sda2: LUKS encrypted file, ver 1 [aes, xts-plain64, sha1] UUID: d5702fad-4d29-4b8a-9662-3b1fe32a7c71
    
    
    
    
    0:rescue:~ # cryptsetup luksOpen /dev/sda2 encrypted_device
    Enter passphrase for /dev/sda2:
    
    
    0:rescue:~ # lvscan 
            ACTIVE            '/dev/system/root' [228.49 GiB] inherit
            ACTIVE            '/dev/system/swap' [4.00 GiB] inherit
    
    
    0:rescue:~ # mount /dev/mapper/system-root /tmp/root
    mount.bin: /tmp/root: can't read superblock on /dev/mapper/system-root.
    
    
    0:rescue:~ # mount -t btrfs -o recovery /dev/mapper/system-root /tmp/root
    mount.bin: /tmp/root: can't read superblock on /dev/mapper/system-root.
    
    
    0:rescue:~ # btrfs rescue super-recover /dev/mapper/system-root 
    All supers are valid, no need to recover

  2. #2

    Default Re: Can't read superblock but btrfs super-recover says all supers are valid

    dmesg output when running mount command:

    Code:
    2017-11-29T14:26:48.223752+00:00 [localhost] kernel: [52234.618093] BTRFS warning (device dm-1): 'recovery' i
    s deprecated, use 'usebackuproot' instead
    2017-11-29T14:26:48.223774+00:00 [localhost] kernel: [52234.618098] BTRFS info (device dm-1): trying to use b
    ackup root at mount time
    2017-11-29T14:26:48.223776+00:00 [localhost] kernel: [52234.618101] BTRFS info (device dm-1): disk space cach
    ing is enabled
    2017-11-29T14:26:48.828634+00:00 [localhost] kernel: [52235.224050] BTRFS info (device dm-1): detected SSD de
    vices, enabling SSD mode
    2017-11-29T14:26:48.952618+00:00 [localhost] kernel: [52235.347910] BTRFS warning (device dm-1): dm-1 checksu
    m verify failed on 771489792 wanted 6C120A11 found B6DD8CD6 level 0
    2017-11-29T14:26:48.956618+00:00 [localhost] kernel: [52235.349304] BTRFS warning (device dm-1): dm-1 checksu
    m verify failed on 771489792 wanted 6C120A11 found BA263A4 level 0
    2017-11-29T14:26:48.956629+00:00 [localhost] kernel: [52235.349324] BTRFS: error (device dm-1) in __btrfs_fre
    e_extent:6945: errno=-5 IO failure
    2017-11-29T14:26:48.956631+00:00 [localhost] kernel: [52235.349329] BTRFS: error (device dm-1) in btrfs_run_d
    elayed_refs:2961: errno=-5 IO failure
    2017-11-29T14:26:49.287703+00:00 [localhost] kernel: [52235.681114] BTRFS error (device dm-1): pending csums 
    is 655360
    2017-11-29T14:26:49.287759+00:00 [localhost] kernel: [52235.681122] BTRFS: error (device dm-1) in btrfs_repla
    y_log:2489: errno=-5 IO failure (Failed to recover log tree)
    2017-11-29T14:26:49.287801+00:00 [localhost] kernel: [52235.681289] BTRFS error (device dm-1): cleaner transa
    ction attach returned -30
    2017-11-29T14:26:49.868657+00:00 [localhost] kernel: [52236.260335] BTRFS error (device dm-1): open_ctree fai
    led

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,721

    Default Re: Can't read superblock but btrfs super-recover says all supers are valid

    You choose for OTHER VERSION. That should have triggered you to mention the openSUSE version as one of the first things in your thread. I can not find it. Please do not let people guess.
    Henk van Velden

  4. #4

    Default Re: Can't read superblock but btrfs super-recover says all supers are valid

    13.2 base system

    Tumbleweed 20170629 recovery environment




  5. #5

    Default Re: Can't read superblock but btrfs super-recover says all supers are valid

    0:rescue:~ # btrfs --version
    btrfs-progs v4.10.2+20170406

  6. #6

    Default Re: Can't read superblock but btrfs super-recover says all supers are valid

    btrfs restore run and most files recovered.

    I'd like to still recover if possible, but repair core dumps:

    Code:
    0:rescue:~ # btrfs check --repair /dev/mapper/system-root 
    ...
    Csum didn't match
    checksum verify failed on 771301376 found C8D5C662 wanted 45D60E5E
    checksum verify failed on 771301376 found C8D5C662 wanted 45D60E5E
    checksum verify failed on 771301376 found 20BE7B36 wanted 45D60E5E
    checksum verify failed on 771301376 found C8D5C662 wanted 45D60E5E
    Csum didn't match
    extent-tree.c:2727: alloc_reserved_tree_block: BUG_ON `ret` triggered, value -17
    btrfs[0x423e46]
    btrfs[0x424efc]
    btrfs[0x424fb6]
    btrfs(btrfs_alloc_free_block+0xc4)[0x429474]
    btrfs(__btrfs_cow_block+0x182)[0x419af2]
    btrfs(btrfs_cow_block+0x10a)[0x41a2fa]
    btrfs[0x41f9f7]
    btrfs(btrfs_commit_transaction+0x98)[0x421728]
    btrfs(cmd_check+0xa26)[0x45df36]
    btrfs(main+0x84)[0x4186b4]
    /lib64/libc.so.6(__libc_start_main+0xea)[0x7fb463e2646a]
    btrfs(_start+0x2a)[0x4187ca]
    Aborted (core dumped)
    And

    Code:
    1:rescue:~ # btrfs check --init-csum-tree /dev/mapper/system-root       
    Creating a new CRC tree
    Csum didn't match
    checksum verify failed on 771301376 found C8D5C662 wanted 45D60E5E
    checksum verify failed on 771301376 found C8D5C662 wanted 45D60E5E
    checksum verify failed on 771301376 found 20BE7B36 wanted 45D60E5E
    checksum verify failed on 771301376 found C8D5C662 wanted 45D60E5E
    Csum didn't match
    extent-tree.c:2727: alloc_reserved_tree_block: BUG_ON `ret` triggered, value -17
    btrfs[0x423e46]
    btrfs[0x424efc]
    btrfs[0x424fb6]
    btrfs(btrfs_alloc_free_block+0xc4)[0x429474]
    btrfs(__btrfs_cow_block+0x182)[0x419af2]
    btrfs(btrfs_cow_block+0x10a)[0x41a2fa]
    btrfs[0x41f9f7]
    btrfs(btrfs_commit_transaction+0x98)[0x421728]
    btrfs(cmd_check+0xa26)[0x45df36]
    btrfs(main+0x84)[0x4186b4]
    /lib64/libc.so.6(__libc_start_main+0xea)[0x7f0ad1c5a46a]
    btrfs(_start+0x2a)[0x4187ca]
    Aborted (core dumped)

  7. #7
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    170

    Default Re: Can't read superblock but btrfs super-recover says all supers are valid

    Not sure if it works, if you dare to try, worked for me on 42.2 https://forums.opensuse.org/showthre...79#post2845679
    ASUS G46VW running openSUSE LEAP 42.1, Windows 8
    Samsung NP300V3A running openSUSE LEAP 42.1 Windows 7
    Some EEEPC running openSUSE LEAP 42.1, "Server" running sshfs, (mini)DLNA, NFS
    Raspberry Pi, Weezy, openSUSE 13.1 (two different SD-cards)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •