How do I change the default options for zfs filesystems on an existing zpool?
The zpool manual tells me how to set such options on creation (note the -O instead of -o to distinguish filesystem options from pool options):
zpool create -O atime=off -O compression=on ...
That way, future filesystem creation commands can be shortened from:
zfs create -o atime=off -o compression=on ...
to:
zfs create ...
However, what if I didn't set the -O on pool creation? How can I set or change them for an existing pool?
You can set them on the top-level dataset in the pool, like this:
zfs set compression=on <name of pool>
After that, all child datasets you create inside that will inherit those properties.
Most properties are propagated to child datasets on creation, so you may have to run it on each pre-created filesystem / zvol manually to make the whole pool have the same properties. You can use the same command for that, just substitute in the dataset name you need to update the property for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With