Space cache v1 is being deprecated

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?

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 older than 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

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