Please!, Need help! with btrfs -if you could -

Hi All,
Thanks for OpenSUSE and their team for the big efforts on developing this nice disro and for this nice forums to contacting with other users and professionals for support each others.

For being new user with OpenSUSE at all sepically TUMBLEWEED now.So I’m facing a fatal problem with btrfs as I think after tried all known solousions that’s I know for OpenSUSE Docs and searching on web.that regard to btrfs root doesn’t mount ‘from couple of daily was mount with high cache size , btrfs process transaction and cleaner then not with readonly when trying ’

-o recovery

’ but not unmount at all’

This is the current result for OpenSUSE gnome live cd terminal

localhost:~ # sudo btrfs fi show
Label: none  uuid: f88e07bf-5ec4-4cf9-a89c-b17506f4a732
    Total devices 1 FS bytes used 127.88GiB
    devid    1 size 133.08GiB used 127.05GiB path /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647

localhost:~ # sudo mount  /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647 /mnt/root
mount: /mnt/root: wrong fs type, bad option, bad superblock on /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647, missing codepage or helper program, or other error.

localhost:~ # sudo mount -o /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647 /mnt/root
mount: /mnt/root: can't find in /etc/fstab.

localhost:~ # sudo mount -o recovery /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647 /mnt/root
mount: /mnt/root: wrong fs type, bad option, bad superblock on /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647, missing codepage or helper program, or other error.

localhost:~ # sudo btrfs rescue zero-log /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647
Clearing log on /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647, previous log_root 0, level 0

localhost:~ # sudo mount -o recovery /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647 /mnt/root
mount: /mnt/root: wrong fs type, bad option, bad superblock on /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647, missing codepage or helper program, or other error.

localhost:~ # sudo btrfs rescue super-recover /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647
All supers are valid, no need to recover

localhost:~ # sudo btrfs rescue chunk-recover -y /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647
Scanning: DONE in dev0                        
Chunk tree recovered successfully

localhost:~ # dmesg | tail
  551.552179] BTRFS error (device dm-0): open_ctree failed
  596.844850] BTRFS warning (device dm-0): 'recovery' is deprecated, use 'usebackuproot' instead
  596.844854] BTRFS info (device dm-0): trying to use backup root at mount time
  596.844856] BTRFS info (device dm-0): disk space caching is enabled
  596.844857] BTRFS info (device dm-0): has skinny extents
  596.850565] BTRFS info (device dm-0): bdev /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647 errs: wr 0, rd 0, flush 0, corrupt 0, gen 2
  596.851395] BTRFS info (device dm-0): enabling ssd optimizations
  596.851400] BTRFS error (device dm-0): qgroup generation mismatch, marked as inconsistent
  596.851777] BTRFS error (device dm-0): parent transid verify failed on 594734563328 wanted 561824 found 561843
  596.868283] BTRFS error (device dm-0): open_ctree failed

localhost:~ # sudo mount -o usebackuproot /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647 /mnt/root
mount: /mnt/root: wrong fs type, bad option, bad superblock on /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647, missing codepage or helper program, or other error.

localhost:~ # sudo btrfs rescue zero-log /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647
Clearing log on /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647, previous log_root 0, level 0

localhost:~ # dmesg | tail
 1037.207584] BTRFS error (device dm-0): parent transid verify failed on 594734563328 wanted 561824 found 561845
 1037.228144] BTRFS error (device dm-0): open_ctree failed
 1060.363886] BTRFS info (device dm-0): trying to use backup root at mount time
 1060.363890] BTRFS info (device dm-0): disk space caching is enabled
 1060.363893] BTRFS info (device dm-0): has skinny extents
 1060.368245] BTRFS info (device dm-0): bdev /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647 errs: wr 0, rd 0, flush 0, corrupt 0, gen 2
 1060.369117] BTRFS info (device dm-0): enabling ssd optimizations
 1060.369123] BTRFS error (device dm-0): qgroup generation mismatch, marked as inconsistent
 1060.369541] BTRFS error (device dm-0): parent transid verify failed on 594734563328 wanted 561824 found 561845
 1060.388219] BTRFS error (device dm-0): open_ctree failed

localhost:~ # sudo btrfs check --repair --init-extent-tree /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647
enabling repair mode
Checking filesystem on /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647
UUID: f88e07bf-5ec4-4cf9-a89c-b17506f4a732
Creating a new extent tree
Failed to find [594734497792, 168, 16384]
btrfs unable to find ref byte nr 594734514176 parent 0 root 1  owner 1 offset 0
Failed to find [599063003136, 168, 16384]
btrfs unable to find ref byte nr 599063019520 parent 0 root 1  owner 0 offset 1
parent transid verify failed on 599063035904 wanted 561835 found 561847
Ignoring transid failure
Failed to find [594734497792, 168, 16384]
btrfs unable to find ref byte nr 594734546944 parent 0 root 1  owner 0 offset 1
checking extents
parent transid verify failed on 594734563328 wanted 561824 found 561845
Ignoring transid failure
ERROR: child eb corrupted: parent bytenr=594734612480 item=1 parent level=1 child level=1
parent transid verify failed on 594734563328 wanted 561824 found 561845
Ignoring transid failure
bad block 594734563328
ERROR: errors found in extent allocation tree or chunk allocation
checking free space cache
cache and super generation don't match, space cache will be invalidated
checking fs roots
root 5 missing its root dir, recreating
Failed to find [594734628864, 168, 16384]
btrfs unable to find ref byte nr 594999951360 parent 0 root 4  owner 0 offset 0
Failed to find [594734628864, 168, 16384]
btrfs unable to find ref byte nr 594751602688 parent 0 root 5  owner 0 offset 0
check/main.c:2679: check_inode_recs: BUG_ON `ret` triggered, value -17
btrfs(+0x58256)[0x55f603c9f256]
btrfs(+0x5f502)[0x55f603ca6502]
btrfs(cmd_check+0x2b40)[0x55f603caeb90]
btrfs(main+0x84)[0x55f603c5b474]
/lib64/libc.so.6(__libc_start_main+0xeb)[0x7f69144e2feb]
btrfs(_start+0x2a)[0x55f603c5b58a]
Aborted

localhost:~ # sudo btrfs rescue zero-log /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647
Clearing log on /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647, previous log_root 0, level 0

localhost:~ # sudo mount -o usebackuproot /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647 /mnt/root
mount: /mnt/root: wrong fs type, bad option, bad superblock on /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647, missing codepage or helper program, or other error.

localhost:~ # dmesg | tail
 1187.144204] BTRFS info (device dm-0): enabling ssd optimizations
 1187.144211] BTRFS error (device dm-0): qgroup generation mismatch, marked as inconsistent
 1187.144632] BTRFS error (device dm-0): parent transid verify failed on 594734563328 wanted 561824 found 561845
 1187.168177] BTRFS error (device dm-0): open_ctree failed
 1197.905447] BTRFS info (device dm-0): trying to use backup root at mount time
 1197.905450] BTRFS info (device dm-0): disk space caching is enabled
 1197.905452] BTRFS info (device dm-0): has skinny extents
 1197.909091] BTRFS error (device dm-0): parent transid verify failed on 594734481408 wanted 561837 found 561848
 1197.909101] BTRFS warning (device dm-0): failed to read root (objectid=7): -5
 1197.936198] BTRFS error (device dm-0): open_ctree failed

localhost:~ # sudo btrfs restore -o /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647 /mnt/root
parent transid verify failed on 594734481408 wanted 561837 found 561848
Ignoring transid failure
parent transid verify failed on 599063003136 wanted 105886 found 561838
parent transid verify failed on 599063003136 wanted 105886 found 561838
Ignoring transid failure
leaf parent key incorrect 599063003136
ERROR: searching extent data returned -1
Error copying data for /mnt/root/@/usr/local/webadmin/useradmin/help/gmembers.zh_TW.UTF-8.html
Error searching /mnt/root/@/usr/local/webadmin/useradmin/help/gmembers.zh_TW.UTF-8.html
Error searching /mnt/root/@/usr/local/webadmin/useradmin/help/gmembers.zh_TW.UTF-8.html

localhost:~ # sudo badblocks -v /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647 > badsectors.txt
Checking blocks 0 to 139541503
Checking for bad blocks (read-only test): done                                                 
Pass completed, 0 bad blocks found. (0/0/0 errors)
localhost:~ # sudo btrfs device stats /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647
ERROR: '/dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647' is not a mounted btrfs device

localhost:~ # sudo btrfs check /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647
parent transid verify failed on 594734481408 wanted 561837 found 561848
Ignoring transid failure
Checking filesystem on /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647
UUID: f88e07bf-5ec4-4cf9-a89c-b17506f4a732
Error: could not find extent items for root 257
ERROR: failed to repair root items: No such file or directory

localhost:~ # sudo btrfs check --repair /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647
enabling repair mode
parent transid verify failed on 594734481408 wanted 561837 found 561848
Ignoring transid failure
Checking filesystem on /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647
UUID: f88e07bf-5ec4-4cf9-a89c-b17506f4a732
Error: could not find extent items for root 257
ERROR: failed to repair root items: No such file or directory



localhost:~ # btrfs check --repair /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647  2>&1 | tee /tmp/repair
parent transid verify failed on 594734481408 wanted 561837 found 561848
Ignoring transid failure
Error: could not find extent items for root 257
ERROR: failed to repair root items: No such file or directory
enabling repair mode
Checking filesystem on /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647
UUID: f88e07bf-5ec4-4cf9-a89c-b17506f4a732

localhost:~ # dmesg | tail
 1187.144204] BTRFS info (device dm-0): enabling ssd optimizations
 1187.144211] BTRFS error (device dm-0): qgroup generation mismatch, marked as inconsistent
 1187.144632] BTRFS error (device dm-0): parent transid verify failed on 594734563328 wanted 561824 found 561845
 1187.168177] BTRFS error (device dm-0): open_ctree failed
 1197.905447] BTRFS info (device dm-0): trying to use backup root at mount time
 1197.905450] BTRFS info (device dm-0): disk space caching is enabled
 1197.905452] BTRFS info (device dm-0): has skinny extents

localhost:~ # sudo btrfs rescue zero-log /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647
parent transid verify failed on 594734481408 wanted 561837 found 561848
Ignoring transid failure
Clearing log on /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647, previous log_root 0, level 0
localhost:~ # sudo mount -o /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647 /mnt/root
mount: /mnt/root: can't find in /etc/fstab.
localhost:~ # sudo mount -t btrfs -o subvol=@/.snapshots/784/snapshot /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647 /mnt/root/
mount: /mnt/root: wrong fs type, bad option, bad superblock on /dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647, missing codepage or helper program, or other error.

localhost:~ # dmesg | tail
 1197.905450] BTRFS info (device dm-0): disk space caching is enabled
 1197.905452] BTRFS info (device dm-0): has skinny extents
 1197.909091] BTRFS error (device dm-0): parent transid verify failed on 594734481408 wanted 561837 found 561848
 1197.909101] BTRFS warning (device dm-0): failed to read root (objectid=7): -5
 1197.936198] BTRFS error (device dm-0): open_ctree failed
 2250.570829] BTRFS info (device dm-0): disk space caching is enabled
 2250.570833] BTRFS info (device dm-0): has skinny extents

localhost:~ # journalctl | egrep btrfs
Jul 19 22:53:33 localhost systemd-tmpfiles[838]: [/etc/tmpfiles.d/btrfs-control.conf:1] Can't parse device file major/minor '10 234'.
Jul 19 22:53:38 localhost systemd-tmpfiles[1064]: [/etc/tmpfiles.d/btrfs-control.conf:1] Can't parse device file major/minor '10 234'.
Jul 19 23:08:43 localhost.localdomain systemd-tmpfiles[3935]: [/etc/tmpfiles.d/btrfs-control.conf:1] Can't parse device file major/minor '10 234'.


########

SO it’s will be very gratfull .if there any this could help with this. or what you recommend in this situation?

Thanks for all

I’m not an expert of “btrfs” (I use “ext4”).

Could you clarify whether this is an encrypted root partition? Or are you using an encrypted LVM?

And maybe you can give the output from


ls /dev/mapper
blkid

localhost:/home/linux # ls /dev/mapper
control
localhost:/home/linux # blkid
/dev/sda1: SEC_TYPE="msdos" UUID="BAA0-A48C" TYPE="vfat" PARTUUID="84fc7d45-52d7-443f-b31c-4824c6f89eff"
/dev/sda2: UUID="5636962a-42e4-40b1-ae45-4df48f198647" TYPE="crypto_LUKS" PARTUUID="b0720d68-18e2-479a-b9ea-059e92797714"
/dev/sda3: UUID="f0159a0b-b2f9-4ce0-b318-b7502f3b62c8" TYPE="crypto_LUKS" PARTUUID="a4bce005-6539-4fc6-bfb4-caf9ebfc9c0f"
/dev/sda4: UUID="12274bca-23eb-4b42-a332-4b07e9b44478" TYPE="crypto_LUKS" PARTUUID="d0ab076d-1f1d-4e1b-b2d5-ccbe323fb6eb"
/dev/loop0: TYPE="squashfs"
/dev/loop1: UUID="083c28b3-da47-4de5-9195-dae68b6628a7" TYPE="ext4"
/dev/sdb1: UUID="2018-07-13-04-04-07-00" LABEL="openSUSE_Tumbleweed_GNOME_Live" TYPE="iso9660" PARTUUID="79b37637-01"
/dev/sdb2: SEC_TYPE="msdos" LABEL="BOOT" UUID="437F-37CE" TYPE="vfat" PARTUUID="79b37637-02"
/dev/sdb3: LABEL="cow" UUID="a1f69a39-63d9-4dff-9aca-05e7b427a954" TYPE="ext4" PARTUUID="79b37637-03"

Frankly, I’m not advanced linux-distros user not as I remmembered at setup the TUMBLWEED it’s not LVM but encrypt with LUKS.

Apparently you have three encrypted partitions. I assume those are “/”, “/home” and swap.

Your root partition seems badly messed up.

I’m assuming that before you tried recovery, you used “cryptsetup” to open access to those partitions.

A few years ago, I got errors booting my computer. So I did something similar to what you are doing (booted live system). And I ran “fsck” on the root partition (which was “ext4”). Everything failed. I’ve used “fsck” before, and this looked very different from the usual situation.

So I went to a local computer store, purchased a new hard drive and reinstalled. I have not had a problem since. I think my disk had totally failed – probably the disk electronics were failing.

I don’t know whether you have a serious disk failure. But it does look like a possibility. If I were in your situation, I would use cryptsetup to access “/home”, and then see if I could do a backup of that to an external drive – just in case you have to replace the drive. And if you have serious problems also with “/home” then the drive is probably dead. If “/home” is good, maybe a reinstall (keeping the existing “/home”) would be an option.

But don’t do anything yet, except trying that backup. Wait for a day and see if somebody with more “btrfs” experience can offer better suggestions.

Sorry for previous post but it look like this

localhost:/home/linux # ls /dev/mapper
control  luks-12274bca-23eb-4b42-a332-4b07e9b44478  luks-5636962a-42e4-40b1-ae45-4df48f198647  luks-f0159a0b-b2f9-4ce0-b318-b7502f3b62c8
localhost:/home/linux # blkid
/dev/sda1: SEC_TYPE="msdos" UUID="BAA0-A48C" TYPE="vfat" PARTUUID="84fc7d45-52d7-443f-b31c-4824c6f89eff"
/dev/sda2: UUID="5636962a-42e4-40b1-ae45-4df48f198647" TYPE="crypto_LUKS" PARTUUID="b0720d68-18e2-479a-b9ea-059e92797714"
/dev/sda3: UUID="f0159a0b-b2f9-4ce0-b318-b7502f3b62c8" TYPE="crypto_LUKS" PARTUUID="a4bce005-6539-4fc6-bfb4-caf9ebfc9c0f"
/dev/sda4: UUID="12274bca-23eb-4b42-a332-4b07e9b44478" TYPE="crypto_LUKS" PARTUUID="d0ab076d-1f1d-4e1b-b2d5-ccbe323fb6eb"
/dev/loop0: TYPE="squashfs"
/dev/loop1: UUID="083c28b3-da47-4de5-9195-dae68b6628a7" TYPE="ext4"
/dev/sdb1: UUID="2018-07-13-04-04-07-00" LABEL="openSUSE_Tumbleweed_GNOME_Live" TYPE="iso9660" PARTUUID="79b37637-01"
/dev/sdb2: SEC_TYPE="msdos" LABEL="BOOT" UUID="437F-37CE" TYPE="vfat" PARTUUID="79b37637-02"
/dev/sdb3: LABEL="cow" UUID="a1f69a39-63d9-4dff-9aca-05e7b427a954" TYPE="ext4" PARTUUID="79b37637-03"
/dev/mapper/luks-f0159a0b-b2f9-4ce0-b318-b7502f3b62c8: UUID="dc40b269-a3ce-42c8-b470-09b0c3b26381" TYPE="xfs"
/dev/mapper/luks-5636962a-42e4-40b1-ae45-4df48f198647: UUID="f88e07bf-5ec4-4cf9-a89c-b17506f4a732" UUID_SUB="fa60f198-d6b0-43fd-8537-13c0f9b6e086" TYPE="btrfs"
/dev/mapper/luks-12274bca-23eb-4b42-a332-4b07e9b44478: UUID="1d4f87b1-8fb4-42b9-85de-5064309f546b" TYPE="swap"

Okay, thanks. I figured that you had not run “cryptsetup” for your previous post. This confirms my guesses about the way you are using your partitions.

This does not change my overall assessment. There’s a serious possibility of a failed disk, so it would be wise to backup what you can – mostly the “/home” partition.