Finally found some time to finish the compilation of the requested
kernel and accomplish the required test - s. below.
2019-04-12 12:50, Qu Wenruo:
On 2019/4/12 下午6:44, Nik. wrote:
2019-04-08 23:22, Nik.:
2019-04-08 15:09, Qu Wenruo:
Unfortunately, I didn't receive the last mail from Nik.
So I'm using the content from lore.kernel.org.
[122293.101782] BTRFS critical (device md0): corrupt leaf: root=1
block=1894009225216 slot=82, bad key order, prev (2034321682432 168
262144) current (2034318143488 168 962560)
Root=1 means it's root tree, 168 means EXTENT_ITEM, which should only
occur in extent tree, not in root tree.
This means either the leaf owner, or some tree blocks get totally
screwed up.
This is not easy to fix, if possible.
Would you please try this kernel branch and mount it with
"rescue=skip_bg,ro"?
https://github.com/adam900710/linux/tree/rescue_options
# uname -a
Linux bach 5.1.0-rc4_Bach_+ #2 SMP Sun May 5 22:28:03 CEST 2019 i686
i686 i686 GNU/Linux
# mount -t btrfs -o rescue=skip_bg,ro /dev/md0 /mnt/tmp/
# dmesg |tail
[ 265.410408] BTRFS info (device md0): skip mount time block group
searching
[ 265.410417] BTRFS info (device md0): disk space caching is enabled
[ 265.763877] BTRFS info (device md0): bdev /dev/md0 errs: wr 0, rd 0,
flush 0, corrupt 2181, gen 0
It took about 18 hours to compare the mounted volume with the backup
(used rsync, without the "--checksum" option, because it was too slow; I
can run it again with it, if you wish). Only about 300kB were not in my
backup. Given the backup is also on a btrfs system, is there a more
"intelligent" way to compare this huge tree with the backup? Optimally
the fs would keep the check-sums and compare only them?
The thing which gave me tho think was the reported free space on the
disk, I thought you should have a look at it, too:
# df -hT /mnt/*
Filesystem Type Size Used Avail Use% Mounted on
/dev/sdb btrfs 3.7T 3.2T 452G 88% /mnt/btraid #backup
/dev/md0 btrfs 3.7T 3.1T 11P 1% /mnt/tmp #original fs
I wish I had the reported disk space really :-D
Should I try something else (e.g., btrfs fsck) before reformat?
Best,
Nik.
[snip]