I have tried setting compression just in pool options and also in share options and in both cases the shares don’t get mounted with compression.
From what I can see compression is a filesystem-wide option and all subvolumes take on the last option used.
In btrfs.py the compression option isn’t getting passed through to mount_share. If I manually add ‘,compress=lzo’ to subvol_str then the shares get mounted with compression.
Thanks for another useful discussion! There are a couple of points worth mentioning here.
1. If compression is enabled only at the Share level or if the algorithm is different at the Share level, compression is enabled by setting the compression property on the Share/subvol. So it doesn’t show up as a mount option.
2. You are right about compression being filesystem-wide option(except for the above point). So, if compression is enabled at the pool level, the pool and all it’s shares shall be mounted with compress=algo option. I found a bug due to which compression is not persistent after reboot/remount.
I’ve created an issue to fix this bug: https://github.com/rockstor/rockstor-core/issues/559
I’ll post any more findings as the issue is fixed. Thanks again!
Ah, I didn’t realise there was a compression property in addition to the mount option and c attribute.
On a related note, can we get the ability to set arbitrary mount options at the share level since some such as noatime are mount-specific.
Absolutely. I’ve thought about doing that too.
Just want to close the loop on this. The issue has been fixed on Jan 7th. For details: https://github.com/rockstor/rockstor-core/issues/559