ZFS pool and filesystem properties
This is not how ZFS (or any modern filesystem for that matter) works. All properties in ZFS is stored as metadata in the filesystem itself.
Use this command to get all Zpool properties: (in total 29 properties and 34 feature flags for ZFS 2.1.4)
zpool get all
Use this command to get all filesystem properties: (in total 74 properties for ZFS 2.1.4 for each filesystem/snapshot)
zfs get all
To get compression properties use:
zfs get compression [Zpool-name]
Similarly, properties are set with zfs set
instead of zfs get
.
So to enable lz4
compression on a Zpool use:
zfs set compression=lz4 [Zpool-name]
This compression setting will be inherited on any underlying datasets in the Zpool by default.
ZFS kernel parameters
There are a number of ZFS kernel module parameters that are controlled elsewhere.
These options are set in /etc/modprobe.d/zfs.conf
. A common option would be to set the ZFS ARC size here, for instance:
# Setting up ZFS ARC size on Ubuntu as per our needs
# Set Max ARC size => 2GB == 2147483648 Bytes
options zfs zfs_arc_max=2147483648
# Set Min ARC size => 1GB == 1073741824
options zfs zfs_arc_min=1073741824
These setting will be applied after a reboot with the next kernel update, or if you update the initramfs
manually:
sudo update-initramfs -u -k all
The full list of tunable ZFS kernel parameters (291 kernel parameters for ZFS 2.1.4).