KarstenV
(Karsten Vinding)
December 6, 2024, 7:28pm
1
During boot my Rockstor displays this:
BTRFS warning (device sdf): space cache v1 is being deprecated and will be removed in a future release, please use -o space_cache=v2
Is this something I should worry about getting changed?
And if so, how do I do it?
1 Like
Hooverdan
(Dan W.)
December 6, 2024, 10:11pm
2
Hello again.
I don’t think you have to worry about it yet. The v2 version was apparently introduced with kernel 5.15. Short of creating a new pool (which by default on the newer OpenSUSE Rockstor builds should now be created with the space cache v2), you can also force the switch on your existing pool.
Following this:
Btrfs's Space Cache and Free Space Tree | Forza's Ramblings .
I added this as a mount option via the WebUI:
I then unmounted the pool and ran (since I already had a btrfs-prog version of higher than 6.6) on one of the devices of the pool, e.g.:
btrfs rescue clear-space-cache v1 /dev/sdb
option described in the btrfs docs:
https://btrfs.readthedocs.io/en/latest/btrfs-rescue.html
After that I did a reboot, and the system came back up.
For btrfs programs >= 6.6 one would use this command:
btrfs check --clear-space-cache v1 /dev/device
The remount didn’t take very long for my 18TB array, but according to the website mentioned above it might take longer for biggish setups.
In every day use I can’t tell whether it made much of a difference, though it’s supposed to be more efficient …
1 Like
KarstenV
(Karsten Vinding)
December 6, 2024, 10:35pm
3
OK.
I think I’ll leave it be for now.
It also seems that my Rockstor root drive has V1, it gives the same warning during boot.
Would it be the same procedure to convert the root drive?
AFAIK you cannot unmount the boot drive?
Edit: Found the answer in the article. For a linux amateur like me its a bit overwhelming, but I’ll try to get it done.
1 Like
just as an addendum to determine whether Rockstor Root Drive (or any other pool) still has space_cache=v1
, you can run
btrfs inspect-internal dump-super /dev/sde
where you replace /dev/sde
with one of the device names from the pool you’re investigating (can be found on the detailed pool page).
and then look for the compat_ro_flags
section. For a pool that’s using V2, it would display this:
compat_ro_flags 0x3
( FREE_SPACE_TREE |
FREE_SPACE_TREE_VALID )
On a pool that uses V1 (like the root pool), the output would be:
compat_ro_flags 0x0
The one thing I don’t know is, whether for the non-root pools, after having added the additional mount option for v2 and cleared the v1 cache, whether the additional mount option can be removed again, because btrfs will now use it by default.
1 Like