-
Notifications
You must be signed in to change notification settings - Fork 268
Description
I recently converted a ext4 FS inside a LVM2 container into btrfs (as part of #1064, but that issue is unrelated to this). Upon mounting it I got the following kernel warning:
[ +0.000271] BTRFS warning (device dm-13): tree block not nodesize aligned, start 285174702080 nodesize 16384, can be resolved by a full metadata balance
This warning was originally added here by @adam900710 it seems, to prepare for some future scenario that I don't understand.
The problem persists even after I tried the following, in sequence:
- btrfs balance (full)
- btrfs balance -m, about 20 times
- manually defragmenting my LVM container so that all LVs are contiguous and aligned with each other, using
pvmove(and lvm2defrag even though that is buggy and only gets the job half-done, the remainder done manually) - subsequent shrinking, growing, btrfs check, btrfs scrub, balance (full) and balance -m all over yet again
btrfs scrub gives no errors, btrfs check gives the following:
...
WARNING: tree block [362473218048, 362473234432) is not nodesize aligned, may cause problem for 64K page system
WARNING: tree block [362473234432, 362473250816) is not nodesize aligned, may cause problem for 64K page system
WARNING: tree block [362473250816, 362473267200) is not nodesize aligned, may cause problem for 64K page system
WARNING: chunk[359127375872 360201117696) is not fully aligned to BTRFS_STRIPE_LEN (65536)
WARNING: chunk[360201117696 361274859520) is not fully aligned to BTRFS_STRIPE_LEN (65536)
WARNING: chunk[361274859520 362348601344) is not fully aligned to BTRFS_STRIPE_LEN (65536)
WARNING: chunk[362348601344 363422343168) is not fully aligned to BTRFS_STRIPE_LEN (65536)
WARNING: chunk[363422343168 364496084992) is not fully aligned to BTRFS_STRIPE_LEN (65536)
...
Also, every time I run a balance the numbers go up, e.g. the kernel warnings now say:
[ +0.000254] BTRFS warning (device dm-13): tree block not nodesize aligned, start 364497592320 nodesize 16384, can be resolved by a full metadata balance
I do not have this issue with any of my other btrfs filesystems that I also converted with btrfs-convert, although those were done using a version from a few years ago. After manual defrag, the LVM container has the following device-mapper tables:
# logical start, size, type, "physical" start
0 2147483648 linear 9:1 2048
0 3221225472 linear 9:1 2147485696
0 167772160 linear 9:1 5368711168
0 67108864 linear 9:1 5536483328
The offending LV is the 3rd one that starts at 5368711168. But all of these LVs have a physical start that = 2048 (mod 16384) (my nodesize), so I don't understand why only the 3rd LV is (still) giving these kernel warnings.
>>> [(x - 2048) / 16384 for x in [2048, 2147485696, 5368711168, 5536483328]]
[0.0, 131072.0, 327680.0, 337920.0]
Should I just ignore these warnings? Is it a false positive? Is it fixable?