Hello,
I'm running a fully updated Manjaro install on kernel
5.5.13-1-MANJARO, but this problem occurs on other kernel versions as
well. I believe I tried 5.4 and 5.6.
I have a btrfs filesystem that looks like this:
Overall:
Device size: 14.55TiB
Device allocated: 10.75TiB
Device unallocated: 3.80TiB
Device missing: 0.00B
Used: 10.74TiB
Free (estimated): 3.81TiB (min: 1.91TiB)
Data ratio: 1.00
Metadata ratio: 2.00
Global reserve: 512.00MiB (used: 0.00B)
Data,single: Size:10.71TiB, Used:10.70TiB (99.92%)
/dev/sda 5.35TiB
/dev/sdb 5.36TiB
Metadata,RAID1: Size:21.00GiB, Used:20.12GiB (95.82%)
/dev/sda 21.00GiB
/dev/sdb 21.00GiB
System,RAID1: Size:32.00MiB, Used:1.22MiB (3.81%)
/dev/sda 32.00MiB
/dev/sdb 32.00MiB
Unallocated:
/dev/sda 1.90TiB
/dev/sdb 1.90TiB
Label: 'data' uuid: 3b1f936a-62d0-4d5e-a5e3-e751ce332100
Total devices 2 FS bytes used 10.72TiB
devid 2 size 7.28TiB used 5.37TiB path /dev/sda
devid 3 size 7.28TiB used 5.38TiB path /dev/sdb
Data, single: total=10.71TiB, used=10.70TiB
System, RAID1: total=32.00MiB, used=1.22MiB
Metadata, RAID1: total=21.00GiB, used=20.12GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
And a fstab entry that looks like this:
UUID=3b1f936a-62d0-4d5e-a5e3-e751ce332100 /data btrfs
noatime,nofail,nossd,autodefrag,compress-force=lzo 0 0
When the system was at only a couple terabytes of usage, everything
was fine. But, as it got progressively filled with more data, it
started to take longer to mount during bootup. At one point it
extrapolated the 90 second limit and the system failed to boot because
of that; I then added nofail to the fstab entry so boot would continue
while the system mounted.
However, even after taking around two minutes to mount, it still fails:
[ 4.446819] BTRFS: device label data devid 2 transid 66582 /dev/sda
scanned by systemd-udevd (444)
[ 4.446864] BTRFS: device label data devid 3 transid 66582 /dev/sdb
scanned by systemd-udevd (417)
[ 4.590357] BTRFS info (device sda): enabling auto defrag
[ 4.590365] BTRFS info (device sda): force lzo compression, level 0
[ 4.590372] BTRFS info (device sda): using free space tree
[ 4.590375] BTRFS info (device sda): has skinny extents
[ 129.164306] BTRFS error (device sda): open_ctree failed
After this happens, I issue a sudo mount -a command. It takes another
two minutes to run, but the filesystem mounts successfully this time.
This shows up as soon as I issue the mount -a command, and about two
minutes later the filesystem is available.
[ 241.330917] BTRFS info (device sda): enabling auto defrag
[ 241.330920] BTRFS info (device sda): force lzo compression, level 0
[ 241.330922] BTRFS info (device sda): using free space tree
[ 241.330922] BTRFS info (device sda): has skinny extents
I have run full balance operations (-musage=95 -dusage=95), a couple
full scrubs and even a full defrag with absolutely no problems or
errors. All the data is there and working properly and I have no
issues accessing it. If I unmount the filesystem and try to mount it
again it takes another two minutes to finish again, but works fine
otherwise.
Is there anything I can do to fix this? Other than running balances,
scrubs and defrags I also tried converting my free space cache to v2
(space_cache=v2) but nothing changed. I don't have a problem with the
filesystem taking a long time to mount (even though it is annoying)
since I only do that once per boot up, but I'd prefer it didn't and
specially don't like to have to mount it manually after the automatic
mount fails.
Any ideas?