Rescue btrfs rootfs after crash











up vote
0
down vote

favorite












After a forced shutdown due to low battery, I can not boot into my arch linux anymore.



I use a btrfs for the rootfs on top of a luks-encrypted partition. The luks layer seems to be ok, as I can open it with cryptsetup open --type luks.



After reading this btrfs error unknown - root fs will not mount, I did the following:



> cryptsetup open --type luks /dev/nvme0n1p2 cryptroot
> mount -t btrfs -o recovery,ssd,compress=lzo /dev/mapper/cryptroot /mnt/sys
mount: /mnt/sys: wrong fs type, bad option, bad superblock on /dev/mapper/cryptroot, missing codepage or helper program, or other error.


dmesg lists:



[  700.781173] BTRFS warning (device dm-0): 'recovery' is deprecated, use 'usebackuproot' instead
[ 700.781177] BTRFS info (device dm-0): trying to use backup root at mount time
[ 700.781183] BTRFS info (device dm-0): enabling ssd optimizations
[ 700.781189] BTRFS info (device dm-0): use lzo compression, level 0
[ 700.781191] BTRFS info (device dm-0): disk space caching is enabled
[ 700.781194] BTRFS info (device dm-0): has skinny extents
[ 700.788032] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
[ 700.788124] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
[ 700.788453] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
[ 700.791280] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
[ 700.792913] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
[ 700.795402] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
[ 700.796891] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
[ 700.799348] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
[ 700.800851] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
[ 700.803280] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
[ 700.829419] BTRFS error (device dm-0): open_ctree failed


btrfs check /dev/mapper/cryptroot prints:



parent transid verify failed on 23773184 wanted 43323 found 45381
parent transid verify failed on 23773184 wanted 43323 found 45381
Ignoring transid failure
[1/7] checking root items
[2/7] checking extents
Chunk[256, 228, 1048576] stripe[1, 1048576] is not found in dev extent
...
... ~ 500 similar lines
...
Chunk[256, 228, 557294026752] stripe[1, 499311968256] is not found in dev extent
owner ref check failed [23773184 16384]
ref mismatch on [23805952 16384] extent item 1, found 0
backref 23805952 root 4 not referenced back 0x55d8debb5f60
incorrect global backref count on 23805952 found 1 wanted 0
backpointer mismatch on [23805952 16384]
owner ref check failed [23805952 16384]
ref mismatch on [44125224960 16384] extent item 1, found 0
backref 44125224960 root 4 not referenced back 0x55d8ddcc35a0
incorrect global backref count on 44125224960 found 1 wanted 0
backpointer mismatch on [44125224960 16384]
owner ref check failed [44125224960 16384]
ref mismatch on [454268846080 16384] extent item 1, found 0
backref 454268846080 root 4 not referenced back 0x55d8d8347070
incorrect global backref count on 454268846080 found 1 wanted 0
backpointer mismatch on [454268846080 16384]
owner ref check failed [454268846080 16384]
ERROR: errors found in extent allocation tree or chunk allocation
[3/7] checking free space cache
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
ERROR: transid errors in file system
Opening filesystem to check...
Checking filesystem on /dev/mapper/cryptroot
UUID: 4de4742a-fb24-441d-a27c-286818f50584
found 491272515584 bytes used, error(s) found
total csum bytes: 475302656
total tree bytes: 2986147840
total fs tree bytes: 2303967232
total extent tree bytes: 145833984
btree space waste bytes: 416351691
file data blocks allocated: 704560472064
referenced 613534547968


I tried btrfs rescue zero-log /dev/mapper/cryptroot...



parent transid verify failed on 23773184 wanted 43323 found 45381
parent transid verify failed on 23773184 wanted 43323 found 45381
Ignoring transid failure
Clearing log on /dev/mapper/cryptroot, previous log_root 0, level 0


... and btrfs check --repair /dev/mapper/cryptroot which fails with a core dump



parent transid verify failed on 23773184 wanted 43323 found 45381
parent transid verify failed on 23773184 wanted 43323 found 45381
Ignoring transid failure
[1/7] checking root items
Fixed 0 roots.
[2/7] checking extents
Chunk[256, 228, 1048576] stripe[1, 1048576] is not found in dev extent
...
... ~ 500 similar lines
...
Chunk[256, 228, 557294026752] stripe[1, 499311968256] is not found in dev extent
owner ref check failed [23773184 16384]
repair deleting extent record: key [23773184,169,1]
adding new tree backref on start 23773184 len 16384 parent 0 root 4
Repaired extent references for 23773184
ref mismatch on [23805952 16384] extent item 1, found 0
backref 23805952 root 4 not referenced back 0x55794af21f60
incorrect global backref count on 23805952 found 1 wanted 0
backpointer mismatch on [23805952 16384]
owner ref check failed [23805952 16384]
repair deleting extent record: key [23805952,169,0]
Repaired extent references for 23805952
ref mismatch on [44125224960 16384] extent item 1, found 0
backref 44125224960 root 4 not referenced back 0x55794a02f5a0
incorrect global backref count on 44125224960 found 1 wanted 0
backpointer mismatch on [44125224960 16384]
owner ref check failed [44125224960 16384]
repair deleting extent record: key [44125224960,169,0]
Repaired extent references for 44125224960
ref mismatch on [454268846080 16384] extent item 1, found 0
backref 454268846080 root 4 not referenced back 0x557944543240
incorrect global backref count on 454268846080 found 1 wanted 0
backpointer mismatch on [454268846080 16384]
owner ref check failed [454268846080 16384]
repair deleting extent record: key [454268846080,169,0]
Repaired extent references for 454268846080
btrfs unable to find ref byte nr 517566136320 parent 0 root 2 owner 0 offset 0
transaction.c:195: btrfs_commit_transaction: BUG_ON `ret` triggered, value -5
btrfs(+0x46c37)[0x55793a4f5c37]
btrfs(btrfs_commit_transaction+0x1be)[0x55793a4f625e]
btrfs(+0x66bd5)[0x55793a515bd5]
btrfs(cmd_check+0x1384)[0x55793a518e04]
btrfs(main+0x88)[0x55793a4c20b8]
/usr/lib/libc.so.6(__libc_start_main+0xf3)[0x7f6779bec223]
btrfs(_start+0x2e)[0x55793a4c21de]


Do you have any suggestions what I could try?



P.S.: I backed up the whole decrypted drive, so I can revert to the state directly after the crash.










share|improve this question









New contributor




gug9sch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    up vote
    0
    down vote

    favorite












    After a forced shutdown due to low battery, I can not boot into my arch linux anymore.



    I use a btrfs for the rootfs on top of a luks-encrypted partition. The luks layer seems to be ok, as I can open it with cryptsetup open --type luks.



    After reading this btrfs error unknown - root fs will not mount, I did the following:



    > cryptsetup open --type luks /dev/nvme0n1p2 cryptroot
    > mount -t btrfs -o recovery,ssd,compress=lzo /dev/mapper/cryptroot /mnt/sys
    mount: /mnt/sys: wrong fs type, bad option, bad superblock on /dev/mapper/cryptroot, missing codepage or helper program, or other error.


    dmesg lists:



    [  700.781173] BTRFS warning (device dm-0): 'recovery' is deprecated, use 'usebackuproot' instead
    [ 700.781177] BTRFS info (device dm-0): trying to use backup root at mount time
    [ 700.781183] BTRFS info (device dm-0): enabling ssd optimizations
    [ 700.781189] BTRFS info (device dm-0): use lzo compression, level 0
    [ 700.781191] BTRFS info (device dm-0): disk space caching is enabled
    [ 700.781194] BTRFS info (device dm-0): has skinny extents
    [ 700.788032] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
    [ 700.788124] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
    [ 700.788453] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
    [ 700.791280] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
    [ 700.792913] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
    [ 700.795402] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
    [ 700.796891] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
    [ 700.799348] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
    [ 700.800851] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
    [ 700.803280] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
    [ 700.829419] BTRFS error (device dm-0): open_ctree failed


    btrfs check /dev/mapper/cryptroot prints:



    parent transid verify failed on 23773184 wanted 43323 found 45381
    parent transid verify failed on 23773184 wanted 43323 found 45381
    Ignoring transid failure
    [1/7] checking root items
    [2/7] checking extents
    Chunk[256, 228, 1048576] stripe[1, 1048576] is not found in dev extent
    ...
    ... ~ 500 similar lines
    ...
    Chunk[256, 228, 557294026752] stripe[1, 499311968256] is not found in dev extent
    owner ref check failed [23773184 16384]
    ref mismatch on [23805952 16384] extent item 1, found 0
    backref 23805952 root 4 not referenced back 0x55d8debb5f60
    incorrect global backref count on 23805952 found 1 wanted 0
    backpointer mismatch on [23805952 16384]
    owner ref check failed [23805952 16384]
    ref mismatch on [44125224960 16384] extent item 1, found 0
    backref 44125224960 root 4 not referenced back 0x55d8ddcc35a0
    incorrect global backref count on 44125224960 found 1 wanted 0
    backpointer mismatch on [44125224960 16384]
    owner ref check failed [44125224960 16384]
    ref mismatch on [454268846080 16384] extent item 1, found 0
    backref 454268846080 root 4 not referenced back 0x55d8d8347070
    incorrect global backref count on 454268846080 found 1 wanted 0
    backpointer mismatch on [454268846080 16384]
    owner ref check failed [454268846080 16384]
    ERROR: errors found in extent allocation tree or chunk allocation
    [3/7] checking free space cache
    [4/7] checking fs roots
    [5/7] checking only csums items (without verifying data)
    [6/7] checking root refs
    [7/7] checking quota groups skipped (not enabled on this FS)
    ERROR: transid errors in file system
    Opening filesystem to check...
    Checking filesystem on /dev/mapper/cryptroot
    UUID: 4de4742a-fb24-441d-a27c-286818f50584
    found 491272515584 bytes used, error(s) found
    total csum bytes: 475302656
    total tree bytes: 2986147840
    total fs tree bytes: 2303967232
    total extent tree bytes: 145833984
    btree space waste bytes: 416351691
    file data blocks allocated: 704560472064
    referenced 613534547968


    I tried btrfs rescue zero-log /dev/mapper/cryptroot...



    parent transid verify failed on 23773184 wanted 43323 found 45381
    parent transid verify failed on 23773184 wanted 43323 found 45381
    Ignoring transid failure
    Clearing log on /dev/mapper/cryptroot, previous log_root 0, level 0


    ... and btrfs check --repair /dev/mapper/cryptroot which fails with a core dump



    parent transid verify failed on 23773184 wanted 43323 found 45381
    parent transid verify failed on 23773184 wanted 43323 found 45381
    Ignoring transid failure
    [1/7] checking root items
    Fixed 0 roots.
    [2/7] checking extents
    Chunk[256, 228, 1048576] stripe[1, 1048576] is not found in dev extent
    ...
    ... ~ 500 similar lines
    ...
    Chunk[256, 228, 557294026752] stripe[1, 499311968256] is not found in dev extent
    owner ref check failed [23773184 16384]
    repair deleting extent record: key [23773184,169,1]
    adding new tree backref on start 23773184 len 16384 parent 0 root 4
    Repaired extent references for 23773184
    ref mismatch on [23805952 16384] extent item 1, found 0
    backref 23805952 root 4 not referenced back 0x55794af21f60
    incorrect global backref count on 23805952 found 1 wanted 0
    backpointer mismatch on [23805952 16384]
    owner ref check failed [23805952 16384]
    repair deleting extent record: key [23805952,169,0]
    Repaired extent references for 23805952
    ref mismatch on [44125224960 16384] extent item 1, found 0
    backref 44125224960 root 4 not referenced back 0x55794a02f5a0
    incorrect global backref count on 44125224960 found 1 wanted 0
    backpointer mismatch on [44125224960 16384]
    owner ref check failed [44125224960 16384]
    repair deleting extent record: key [44125224960,169,0]
    Repaired extent references for 44125224960
    ref mismatch on [454268846080 16384] extent item 1, found 0
    backref 454268846080 root 4 not referenced back 0x557944543240
    incorrect global backref count on 454268846080 found 1 wanted 0
    backpointer mismatch on [454268846080 16384]
    owner ref check failed [454268846080 16384]
    repair deleting extent record: key [454268846080,169,0]
    Repaired extent references for 454268846080
    btrfs unable to find ref byte nr 517566136320 parent 0 root 2 owner 0 offset 0
    transaction.c:195: btrfs_commit_transaction: BUG_ON `ret` triggered, value -5
    btrfs(+0x46c37)[0x55793a4f5c37]
    btrfs(btrfs_commit_transaction+0x1be)[0x55793a4f625e]
    btrfs(+0x66bd5)[0x55793a515bd5]
    btrfs(cmd_check+0x1384)[0x55793a518e04]
    btrfs(main+0x88)[0x55793a4c20b8]
    /usr/lib/libc.so.6(__libc_start_main+0xf3)[0x7f6779bec223]
    btrfs(_start+0x2e)[0x55793a4c21de]


    Do you have any suggestions what I could try?



    P.S.: I backed up the whole decrypted drive, so I can revert to the state directly after the crash.










    share|improve this question









    New contributor




    gug9sch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      After a forced shutdown due to low battery, I can not boot into my arch linux anymore.



      I use a btrfs for the rootfs on top of a luks-encrypted partition. The luks layer seems to be ok, as I can open it with cryptsetup open --type luks.



      After reading this btrfs error unknown - root fs will not mount, I did the following:



      > cryptsetup open --type luks /dev/nvme0n1p2 cryptroot
      > mount -t btrfs -o recovery,ssd,compress=lzo /dev/mapper/cryptroot /mnt/sys
      mount: /mnt/sys: wrong fs type, bad option, bad superblock on /dev/mapper/cryptroot, missing codepage or helper program, or other error.


      dmesg lists:



      [  700.781173] BTRFS warning (device dm-0): 'recovery' is deprecated, use 'usebackuproot' instead
      [ 700.781177] BTRFS info (device dm-0): trying to use backup root at mount time
      [ 700.781183] BTRFS info (device dm-0): enabling ssd optimizations
      [ 700.781189] BTRFS info (device dm-0): use lzo compression, level 0
      [ 700.781191] BTRFS info (device dm-0): disk space caching is enabled
      [ 700.781194] BTRFS info (device dm-0): has skinny extents
      [ 700.788032] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
      [ 700.788124] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
      [ 700.788453] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
      [ 700.791280] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
      [ 700.792913] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
      [ 700.795402] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
      [ 700.796891] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
      [ 700.799348] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
      [ 700.800851] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
      [ 700.803280] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
      [ 700.829419] BTRFS error (device dm-0): open_ctree failed


      btrfs check /dev/mapper/cryptroot prints:



      parent transid verify failed on 23773184 wanted 43323 found 45381
      parent transid verify failed on 23773184 wanted 43323 found 45381
      Ignoring transid failure
      [1/7] checking root items
      [2/7] checking extents
      Chunk[256, 228, 1048576] stripe[1, 1048576] is not found in dev extent
      ...
      ... ~ 500 similar lines
      ...
      Chunk[256, 228, 557294026752] stripe[1, 499311968256] is not found in dev extent
      owner ref check failed [23773184 16384]
      ref mismatch on [23805952 16384] extent item 1, found 0
      backref 23805952 root 4 not referenced back 0x55d8debb5f60
      incorrect global backref count on 23805952 found 1 wanted 0
      backpointer mismatch on [23805952 16384]
      owner ref check failed [23805952 16384]
      ref mismatch on [44125224960 16384] extent item 1, found 0
      backref 44125224960 root 4 not referenced back 0x55d8ddcc35a0
      incorrect global backref count on 44125224960 found 1 wanted 0
      backpointer mismatch on [44125224960 16384]
      owner ref check failed [44125224960 16384]
      ref mismatch on [454268846080 16384] extent item 1, found 0
      backref 454268846080 root 4 not referenced back 0x55d8d8347070
      incorrect global backref count on 454268846080 found 1 wanted 0
      backpointer mismatch on [454268846080 16384]
      owner ref check failed [454268846080 16384]
      ERROR: errors found in extent allocation tree or chunk allocation
      [3/7] checking free space cache
      [4/7] checking fs roots
      [5/7] checking only csums items (without verifying data)
      [6/7] checking root refs
      [7/7] checking quota groups skipped (not enabled on this FS)
      ERROR: transid errors in file system
      Opening filesystem to check...
      Checking filesystem on /dev/mapper/cryptroot
      UUID: 4de4742a-fb24-441d-a27c-286818f50584
      found 491272515584 bytes used, error(s) found
      total csum bytes: 475302656
      total tree bytes: 2986147840
      total fs tree bytes: 2303967232
      total extent tree bytes: 145833984
      btree space waste bytes: 416351691
      file data blocks allocated: 704560472064
      referenced 613534547968


      I tried btrfs rescue zero-log /dev/mapper/cryptroot...



      parent transid verify failed on 23773184 wanted 43323 found 45381
      parent transid verify failed on 23773184 wanted 43323 found 45381
      Ignoring transid failure
      Clearing log on /dev/mapper/cryptroot, previous log_root 0, level 0


      ... and btrfs check --repair /dev/mapper/cryptroot which fails with a core dump



      parent transid verify failed on 23773184 wanted 43323 found 45381
      parent transid verify failed on 23773184 wanted 43323 found 45381
      Ignoring transid failure
      [1/7] checking root items
      Fixed 0 roots.
      [2/7] checking extents
      Chunk[256, 228, 1048576] stripe[1, 1048576] is not found in dev extent
      ...
      ... ~ 500 similar lines
      ...
      Chunk[256, 228, 557294026752] stripe[1, 499311968256] is not found in dev extent
      owner ref check failed [23773184 16384]
      repair deleting extent record: key [23773184,169,1]
      adding new tree backref on start 23773184 len 16384 parent 0 root 4
      Repaired extent references for 23773184
      ref mismatch on [23805952 16384] extent item 1, found 0
      backref 23805952 root 4 not referenced back 0x55794af21f60
      incorrect global backref count on 23805952 found 1 wanted 0
      backpointer mismatch on [23805952 16384]
      owner ref check failed [23805952 16384]
      repair deleting extent record: key [23805952,169,0]
      Repaired extent references for 23805952
      ref mismatch on [44125224960 16384] extent item 1, found 0
      backref 44125224960 root 4 not referenced back 0x55794a02f5a0
      incorrect global backref count on 44125224960 found 1 wanted 0
      backpointer mismatch on [44125224960 16384]
      owner ref check failed [44125224960 16384]
      repair deleting extent record: key [44125224960,169,0]
      Repaired extent references for 44125224960
      ref mismatch on [454268846080 16384] extent item 1, found 0
      backref 454268846080 root 4 not referenced back 0x557944543240
      incorrect global backref count on 454268846080 found 1 wanted 0
      backpointer mismatch on [454268846080 16384]
      owner ref check failed [454268846080 16384]
      repair deleting extent record: key [454268846080,169,0]
      Repaired extent references for 454268846080
      btrfs unable to find ref byte nr 517566136320 parent 0 root 2 owner 0 offset 0
      transaction.c:195: btrfs_commit_transaction: BUG_ON `ret` triggered, value -5
      btrfs(+0x46c37)[0x55793a4f5c37]
      btrfs(btrfs_commit_transaction+0x1be)[0x55793a4f625e]
      btrfs(+0x66bd5)[0x55793a515bd5]
      btrfs(cmd_check+0x1384)[0x55793a518e04]
      btrfs(main+0x88)[0x55793a4c20b8]
      /usr/lib/libc.so.6(__libc_start_main+0xf3)[0x7f6779bec223]
      btrfs(_start+0x2e)[0x55793a4c21de]


      Do you have any suggestions what I could try?



      P.S.: I backed up the whole decrypted drive, so I can revert to the state directly after the crash.










      share|improve this question









      New contributor




      gug9sch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      After a forced shutdown due to low battery, I can not boot into my arch linux anymore.



      I use a btrfs for the rootfs on top of a luks-encrypted partition. The luks layer seems to be ok, as I can open it with cryptsetup open --type luks.



      After reading this btrfs error unknown - root fs will not mount, I did the following:



      > cryptsetup open --type luks /dev/nvme0n1p2 cryptroot
      > mount -t btrfs -o recovery,ssd,compress=lzo /dev/mapper/cryptroot /mnt/sys
      mount: /mnt/sys: wrong fs type, bad option, bad superblock on /dev/mapper/cryptroot, missing codepage or helper program, or other error.


      dmesg lists:



      [  700.781173] BTRFS warning (device dm-0): 'recovery' is deprecated, use 'usebackuproot' instead
      [ 700.781177] BTRFS info (device dm-0): trying to use backup root at mount time
      [ 700.781183] BTRFS info (device dm-0): enabling ssd optimizations
      [ 700.781189] BTRFS info (device dm-0): use lzo compression, level 0
      [ 700.781191] BTRFS info (device dm-0): disk space caching is enabled
      [ 700.781194] BTRFS info (device dm-0): has skinny extents
      [ 700.788032] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
      [ 700.788124] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
      [ 700.788453] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
      [ 700.791280] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
      [ 700.792913] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
      [ 700.795402] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
      [ 700.796891] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
      [ 700.799348] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
      [ 700.800851] BTRFS error (device dm-0): parent transid verify failed on 23773184 wanted 43323 found 45381
      [ 700.803280] BTRFS warning (device dm-0): failed to read root (objectid=4): -5
      [ 700.829419] BTRFS error (device dm-0): open_ctree failed


      btrfs check /dev/mapper/cryptroot prints:



      parent transid verify failed on 23773184 wanted 43323 found 45381
      parent transid verify failed on 23773184 wanted 43323 found 45381
      Ignoring transid failure
      [1/7] checking root items
      [2/7] checking extents
      Chunk[256, 228, 1048576] stripe[1, 1048576] is not found in dev extent
      ...
      ... ~ 500 similar lines
      ...
      Chunk[256, 228, 557294026752] stripe[1, 499311968256] is not found in dev extent
      owner ref check failed [23773184 16384]
      ref mismatch on [23805952 16384] extent item 1, found 0
      backref 23805952 root 4 not referenced back 0x55d8debb5f60
      incorrect global backref count on 23805952 found 1 wanted 0
      backpointer mismatch on [23805952 16384]
      owner ref check failed [23805952 16384]
      ref mismatch on [44125224960 16384] extent item 1, found 0
      backref 44125224960 root 4 not referenced back 0x55d8ddcc35a0
      incorrect global backref count on 44125224960 found 1 wanted 0
      backpointer mismatch on [44125224960 16384]
      owner ref check failed [44125224960 16384]
      ref mismatch on [454268846080 16384] extent item 1, found 0
      backref 454268846080 root 4 not referenced back 0x55d8d8347070
      incorrect global backref count on 454268846080 found 1 wanted 0
      backpointer mismatch on [454268846080 16384]
      owner ref check failed [454268846080 16384]
      ERROR: errors found in extent allocation tree or chunk allocation
      [3/7] checking free space cache
      [4/7] checking fs roots
      [5/7] checking only csums items (without verifying data)
      [6/7] checking root refs
      [7/7] checking quota groups skipped (not enabled on this FS)
      ERROR: transid errors in file system
      Opening filesystem to check...
      Checking filesystem on /dev/mapper/cryptroot
      UUID: 4de4742a-fb24-441d-a27c-286818f50584
      found 491272515584 bytes used, error(s) found
      total csum bytes: 475302656
      total tree bytes: 2986147840
      total fs tree bytes: 2303967232
      total extent tree bytes: 145833984
      btree space waste bytes: 416351691
      file data blocks allocated: 704560472064
      referenced 613534547968


      I tried btrfs rescue zero-log /dev/mapper/cryptroot...



      parent transid verify failed on 23773184 wanted 43323 found 45381
      parent transid verify failed on 23773184 wanted 43323 found 45381
      Ignoring transid failure
      Clearing log on /dev/mapper/cryptroot, previous log_root 0, level 0


      ... and btrfs check --repair /dev/mapper/cryptroot which fails with a core dump



      parent transid verify failed on 23773184 wanted 43323 found 45381
      parent transid verify failed on 23773184 wanted 43323 found 45381
      Ignoring transid failure
      [1/7] checking root items
      Fixed 0 roots.
      [2/7] checking extents
      Chunk[256, 228, 1048576] stripe[1, 1048576] is not found in dev extent
      ...
      ... ~ 500 similar lines
      ...
      Chunk[256, 228, 557294026752] stripe[1, 499311968256] is not found in dev extent
      owner ref check failed [23773184 16384]
      repair deleting extent record: key [23773184,169,1]
      adding new tree backref on start 23773184 len 16384 parent 0 root 4
      Repaired extent references for 23773184
      ref mismatch on [23805952 16384] extent item 1, found 0
      backref 23805952 root 4 not referenced back 0x55794af21f60
      incorrect global backref count on 23805952 found 1 wanted 0
      backpointer mismatch on [23805952 16384]
      owner ref check failed [23805952 16384]
      repair deleting extent record: key [23805952,169,0]
      Repaired extent references for 23805952
      ref mismatch on [44125224960 16384] extent item 1, found 0
      backref 44125224960 root 4 not referenced back 0x55794a02f5a0
      incorrect global backref count on 44125224960 found 1 wanted 0
      backpointer mismatch on [44125224960 16384]
      owner ref check failed [44125224960 16384]
      repair deleting extent record: key [44125224960,169,0]
      Repaired extent references for 44125224960
      ref mismatch on [454268846080 16384] extent item 1, found 0
      backref 454268846080 root 4 not referenced back 0x557944543240
      incorrect global backref count on 454268846080 found 1 wanted 0
      backpointer mismatch on [454268846080 16384]
      owner ref check failed [454268846080 16384]
      repair deleting extent record: key [454268846080,169,0]
      Repaired extent references for 454268846080
      btrfs unable to find ref byte nr 517566136320 parent 0 root 2 owner 0 offset 0
      transaction.c:195: btrfs_commit_transaction: BUG_ON `ret` triggered, value -5
      btrfs(+0x46c37)[0x55793a4f5c37]
      btrfs(btrfs_commit_transaction+0x1be)[0x55793a4f625e]
      btrfs(+0x66bd5)[0x55793a515bd5]
      btrfs(cmd_check+0x1384)[0x55793a518e04]
      btrfs(main+0x88)[0x55793a4c20b8]
      /usr/lib/libc.so.6(__libc_start_main+0xf3)[0x7f6779bec223]
      btrfs(_start+0x2e)[0x55793a4c21de]


      Do you have any suggestions what I could try?



      P.S.: I backed up the whole decrypted drive, so I can revert to the state directly after the crash.







      encryption btrfs corruption






      share|improve this question









      New contributor




      gug9sch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      gug9sch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 2 days ago









      jasonwryan

      48.8k14134184




      48.8k14134184






      New contributor




      gug9sch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 2 days ago









      gug9sch

      11




      11




      New contributor




      gug9sch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      gug9sch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      gug9sch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.



























          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          gug9sch is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f486767%2frescue-btrfs-rootfs-after-crash%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          gug9sch is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          gug9sch is a new contributor. Be nice, and check out our Code of Conduct.













          gug9sch is a new contributor. Be nice, and check out our Code of Conduct.












          gug9sch is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f486767%2frescue-btrfs-rootfs-after-crash%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Accessing regular linux commands in Huawei's Dopra Linux

          Can't connect RFCOMM socket: Host is down

          Kernel panic - not syncing: Fatal Exception in Interrupt