Am 12.10.2018 01:56, schrieb Qu Wenruo:
On 2018/10/12 上午4:30, Jürgen Herrmann wrote:
Hi!

I just did a btrfs check on my laptop's btrfs filesystem while i was
on the usb stick rescue system.

the following errors where reported:
root@mint:/home/mint# btrfs check /dev/mapper/sda3crypt
Checking filesystem on /dev/mapper/sda3crypt
UUID: a914c141-72bf-448b-847f-d64ee82d8b7b
checking extents
checking free space cache
checking fs roots
root 258 inode 3082368 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 258 inode 3082370 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 258 inode 3082371 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 258 inode 3082373 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 258 inode 3082414 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 258 inode 3082415 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 258 inode 3082421 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 4096
root 1387 inode 3082368 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 1387 inode 3082370 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 1387 inode 3082371 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 1387 inode 3082372 errors 100, file extent discount
Found file extent holes:
    start: 8192, len: 4096
    start: 16384, len: 4096
    start: 24576, len: 4096
    start: 32768, len: 4096
    start: 40960, len: 4096
    start: 49152, len: 20480
    start: 73728, len: 4096
    start: 81920, len: 4096
    start: 90112, len: 8192
root 1387 inode 3082373 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 1387 inode 3082374 errors 100, file extent discount
Found file extent holes:
    start: 8192, len: 4096
    start: 16384, len: 20480
    start: 40960, len: 12288
    start: 57344, len: 4096
    start: 65536, len: 8192
root 1387 inode 3082380 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 233472
root 1387 inode 3082386 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 4096
root 1387 inode 3082398 errors 100, file extent discount
Found file extent holes:
    start: 20480, len: 16384
root 1387 inode 3082414 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 1387 inode 3082415 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 1387 inode 3082421 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 4096
root 1391 inode 3082368 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 1391 inode 3082370 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 1391 inode 3082371 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 1391 inode 3082373 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 1391 inode 3082386 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 4096
root 1391 inode 3082414 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 1391 inode 3082415 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 1391 inode 3082421 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 4096
root 1394 inode 3082368 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 1394 inode 3082370 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 1394 inode 3082371 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 1394 inode 3082373 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 1394 inode 3082386 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 4096
root 1394 inode 3082414 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 1394 inode 3082415 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 8192
root 1394 inode 3082421 errors 100, file extent discount
Found file extent holes:
    start: 0, len: 4096
ERROR: errors found in fs roots
found 469458231296 bytes used, error(s) found
total csum bytes: 451180560
total tree bytes: 4558831616
total fs tree bytes: 3802955776
total extent tree bytes: 245055488
btree space waste bytes: 842802897
file data blocks allocated: 9656815640576
 referenced 929225080832

Scrub completes ok though.

I'm prepared to wipe the fs if needed, more than one backup is ready :)

No need. File extent discount is not a big problem.

It only means btrfs lacks some hole file extent to fill the hole.

It can be "fixed" easily by enabling no_holes features:

# btrfstune -n <device>


I wanted to ask here first if I should attempt a repair.

And of course, btrfs check --repair should be able to fix it.

Thanks,
Qu


Best regards,
Jürgen

Hi there!

I ran btrfs check --repair on the filesystem. I dont' have this log anymore,
as it was then sitting on the repaired fs), which is now dead.
after repairing it I could still mount the fs.

as my btrfs send problem still persists (another thread), I decided to run check again... this time i saved the logs to a different partition as it was more
convenient at that time. here's the output:

Checking filesystem on /dev/mapper/sda3c
UUID: a914c141-72bf-448b-847f-d64ee82d8b7b
[1/7] checking root items
Fixed 0 roots.
[2/7] checking extents
No device size related problem found
[3/7] checking free space cache
cache and super generation don't match, space cache will be invalidated
[4/7] checking fs roots
root 1387 inode 3082380 errors 100, file extent discount
Found file extent holes:
        start: 0, len: 233472
ERROR: errors found in fs roots
found 470636822528 bytes used, error(s) found
total csum bytes: 452176524
total tree bytes: 4579753984
total fs tree bytes: 3822665728
total extent tree bytes: 245301248
btree space waste bytes: 847442809
file data blocks allocated: 9670623588352
 referenced 932405829632

I did a repair once again but the error did not go away.

after rebooting the fs is no longer mountable:
mint@mint:/tmp$ sudo /tmp/btrfs check /dev/mapper/sda3c
Opening filesystem to check...
parent transid verify failed on 166475366400 wanted 127054 found 127060
parent transid verify failed on 166475366400 wanted 127054 found 127060
Ignoring transid failure
ERROR: child eb corrupted: parent bytenr=166456229888 item=22 parent level=2 child level=0
ERROR: cannot open file system

If anyone wants me to help debugging this issue you will have to respond
fast, because i need my laptop back in working condition and will soon
nuke the fs. after all I will try one more time with a freshly formatted
btrfs partition. if i still get these kinds of errors i will have to move back to
the tried and true xfs :/

best regards,
Jürgen
--
Jürgen Herrmann
https://t-5.eu
ALbertstraße 2
94327 Bogen

Reply via email to