Setting ZFS Properties
You can use the zfs set command to modify any settable dataset property. Or, you can use the zfs create command to set properties when a dataset is created. For a list of settable dataset properties, see Settable ZFS Native Properties.
The zfs set command takes a property/value sequence in the format of property=value followed by a dataset name. Only one property can be set or modified during each zfs set invocation.
The following example sets the atime property to off for tank/home.
$ zfs set atime=off tank/home
In addition, any file system property can be set when a file system is created. For example:
$ zfs create -o atime=off tank/home
You can specify numeric property values by using the following easy-to-understand
suffixes (in increasing sizes): BKMGTPEZ. Any of these suffixes
can be followed by an optional b, indicating bytes, with the
exception of the B suffix, which already indicates bytes. The
following four invocations of zfs set are equivalent numeric
expressions that set the quota property be set to the value of
20GB on the users/home/mork file system:
$ zfs set quota=20G users/home/mork $ zfs set quota=20g users/home/mork $ zfs set quota=20GB users/home/mork $ zfs set quota=20gb users/home/mork
If you attempt to set a property on a file system that is 100% full, you will see a message similar to the following:
$ zfs set quota=20gb users/home/mork
cannot set property for '/users/home/mork': out of spaceThe values of non-numeric properties are case-sensitive and must be in lowercase letters, with the exception of mountpoint. The values of this property can have mixed upper and lower case letters.
For more information about the zfs set command, see the
zfs(8) man page.