Inheriting ZFS Properties
All settable properties, with the exception of quotas and reservations, inherit their value from the parent file system, unless a quota or reservation is explicitly set on the descendent file system. If no ancestor has an explicit value set for an inherited property, the default value for the property is used. You can use the zfs inherit command to clear a property value, thus causing the value to be inherited from the parent file system.
The following example uses the zfs set command to turn on compression for the tank/home/sueb file system. Then, zfs inherit is used to clear the compression property, thus causing the property to inherit the default value of off. Because neither home nor tank has the compression property set locally, the default value is used. If both had compression enabled, the value set in the most immediate ancestor would be used (home in this example).
$ zfs set compression=on tank/home/sueb $ zfs get -r compression tank/home NAME PROPERTY VALUE SOURCE tank/home compression off default tank/home/glori compression off default tank/home/glori@today compression - - tank/home/sueb compression on local $ zfs inherit compression tank/home/sueb $ zfs get -r compression tank/home NAME PROPERTY VALUE SOURCE tank/home compression off default tank/home/glori compression off default tank/home/glori@today compression - - tank/home/sueb compression off default
The inherit subcommand is applied recursively when the -r option is specified. In the following example, the command causes the value for the compression property to be inherited by tank/home and any descendents it might have:
$ zfs inherit -r compression tank/home
Note:
Be aware that the use of the-r option clears the current property setting for all descendent file systems.
For more information about the zfs inherit command, see the see
zfs(8) man page.