4

The man zpool create page states

-O file-system-property = value
Sets the given file system properties in the root file system of the pool. See the Sx Properties section of zfs(8) for a list of valid properties that can be set.

Searching the man zfs page for Sx Properties leads me to

set property = value [property = value ... ] filesystem | volume | snapshot ...

Sets the property or list of properties to the given value(s) for each dataset.
Only some properties can be edited. See the Sx Properties section for more information on what properties can be set and acceptable values.
[...]

I saw this on the alpinelinux wiki when I was looking for how to do something similar on ubuntu 18.04 with zfs 0.8.4 (self-built).

What do the big-O options actually do?

I have experimented and created a new pool with -O compression=lz4 and tested a few hypotheses of what they might do, but:

  • zfs get compression tank does not show that compression is enabled

  • zfs create tank/ds does not create a dataset with compression activated by default.

So what do the file-system-property arguments to zpool create actually impact?


Edit

I have tried again and this time everything behaved as I expected.

Creating a pool with -O compression=lz4 does have the effect that zfs get compression mypool shows lz4. And it is inherited to future created child datasets.

2

It should be doing what you expect, or at least it does for me. Did you do zpool create with -d, perchance, or created the pool with version below 5000 (disables all feature flags)? For compression=lz4 to work you have to have feature@lz4_compress feature flag enabled.

  • 1
    I have now tried to reproduce this behaviour again, after rebuilding zfs for other reasons, and now it is behaving as I expected it would. I guess I'll have to write this off to black magic or me doing something wrong. Thank you – lucidbrot May 14 '20 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.