Failed to import any pool on this device(5) caused by space_cache

Brief description of the problem

Cant import mdraid5 with btrfs on top

Detailed step by step instructions to reproduce the problem

The import cant be done cause the btrfs is using space_cache=v2. After cleaning space cache the import works!
we’re at kernel 4.12@rockstor right now. Imho space_cache=v2 is mature enough to be used. So plz add support for the space_cache=v2 mount option! Even make it default for new installs.

Web-UI screenshot

Error Traceback provided on the Web-UI

Traceback (most recent call last):
File “/opt/rockstor/src/rockstor/storageadmin/views/”, line 679, in _btrfs_disk_import
p_info = get_pool_info(disk_name)
File “/opt/rockstor/src/rockstor/fs/”, line 110, in get_pool_info
run_command([BTRFS, ‘fi’, ‘label’, dpath, label])
File “/opt/rockstor/src/rockstor/system/”, line 119, in run_command
raise CommandException(cmd, out, err, rc)
CommandException: Error running a command. cmd = /sbin/btrfs fi label /dev/disk/by-id/md-uuid-43120cf2:0a85a0ba:dfde4ac7:9a94f66c dbf8037d-875f-49f3-bcfd-80fc4e2ec5bc. rc = 255. stdout = [‘’]. stderr = [“couldn’t open RDWR because of unsupported option features (3).”, ‘’]

@g6094199 Hello again.

Nice find, thanks for posting.

We are only just at 4.12 kernel as of current testing channel release:

But I agree that the inclusion of space_cache=v2 is a good idea:

This is something I can’t agree with however. We essentially follow the lead re btrfs devs on all defaults so upon our elrepo kernel-ml version adopting this by default then as do we. I don’t think it is wise to deviate from the developer ascribed defaults. Apologies if I have the wrong end of the stick here.

Hope that helps and thanks for your ongoing contribution.

1 Like

he phill,

i cant understand to follow mainline…i can live with that :wink:

THX 4 adding!


another suggestion: How about giving the user the opportunity to choose with space_cache option to use?

a dropdown like for the compression option. the dropdown must have at least 3 settings space_cache, space_cache=v2 and clear_cache (this must be set with option no_space_cache, so users can safely switch from space_cache=v1 to space_cache=v2 without breaking anything)