Properties are the main mechanism that you use to control the behavior of file systems, volumes, snapshots, and clones. Unless stated otherwise, the properties defined in the section apply to all the dataset types.
Properties are either read-only statistics or settable properties. Most settable properties are also inheritable. An inheritable property is a property that, when set on a parent, is propagated down to all of its descendants.
All inheritable properties have an associated source. The source indicates how a property was obtained. The source of a property can have the following values:
local
A local
source indicates that the property
was explicitly set on the dataset by using the zfs set command
as described in Setting ZFS Properties.
inherited from
dataset-name
A value of inherited from
dataset-name
means that the property was inherited from the named ancestor.
default
A value of default
means that the property
setting was not inherited or set locally. This source is a result of no ancestor
having the property as source local
.
The following table identifies both read-only and settable ZFS file system properties. Read-only properties are identified as such. All other properties are settable.
Table 5.1. ZFS Property Descriptions
Read-only properties are properties that can be retrieved but cannot be set. Read-only properties are not inherited. Some properties are specific to a particular type of dataset. In such cases, the particular dataset type is mentioned in the description.
The read-only properties are listed here and are described in Table 5–1.
available
creation
mounted
origin
compressratio
referenced
type
used
For detailed information, see The used Property.
For more information on space accounting, including the used, referenced, and available properties, see ZFS Space Accounting.
The amount of space consumed by this dataset and all its descendants. This value is checked against the dataset's quota and reservation. The space used does not include the dataset's reservation, but does consider the reservation of any descendant datasets. The amount of space that a dataset consumes from its parent, as well as the amount of space that is freed if the dataset is recursively destroyed, is the greater of its space used and its reservation.
When snapshots are created, their space is initially shared between the snapshot and the file system, and possibly with previous snapshots. As the file system changes, space that was previously shared becomes unique to the snapshot, and counted in the snapshot's space used. Additionally, deleting snapshots can increase the amount of space unique to (and used by) other snapshots. For more information about snapshots and space issues, see Out of Space Behavior.
The amount of space used, available, or referenced does not take into
account pending changes. Pending changes are generally accounted for within
a few seconds. Committing a change to a disk using fsync(3c)
or O_SYNC
does not necessarily guarantee that the space usage information
will be updated immediately.
Settable properties are properties whose values can be both retrieved and set. Settable properties are set by using the zfs set command, as described in Setting ZFS Properties. With the exceptions of quotas and reservations, settable properties are inherited. For more information about quotas and reservations, see ZFS Quotas and Reservations.
Some settable properties are specific to a particular type of dataset. In such cases, the particular dataset type is mentioned in the description. If not specifically mentioned, a property applies to all dataset types: file systems, volumes, clones, and snapshots.
The settable properties are listed here and are described in Table 5–1.
aclinherit
For a detailed description, see ACL Property Modes.
aclmode
For a detailed description, see ACL Property Modes.
atime
checksum
compression
devices
exec
mountpoint
quota
readonly
recordsize
For a detailed description, see The recordsize Property.
reservation
sharenfs
setuid
snapdir
volsize
For a detailed description, see The volsize Property.
volblocksize
zoned
Specifies a suggested block size for files in the file system.
This property is designed solely for use with database workloads that
access files in fixed-size records. ZFS automatically adjust block sizes according
to internal algorithms optimized for typical access patterns. For databases
that create very large files but access the files in small random chunks,
these algorithms may be suboptimal. Specifying a recordsize greater
than or equal to the record size of the database can result in significant
performance gains. Use of this property for general purpose file systems is
strongly discouraged, and may adversely affect performance. The size specified
must be a power of two greater than or equal to 512 and less than or equal
to 128 Kbytes. Changing the file system's recordsize
only
affects files created afterward. Existing files are unaffected.
This property can also be referred to by its shortened column name, recsize.
The logical size of the volume. By default, creating a volume establishes a reservation for the same amount. Any changes to volsize are reflected in an equivalent change to the reservation. These checks are used to prevent unexpected behavior for users. A volume that contains less space than it claims is available can result in undefined behavior or data corruption, depending on how the volume is used. These effects can also occur when the volume size is changed while it is in use, particularly when you shrink the size. Extreme care should be used when adjusting the volume size.
Though not recommended, you can create a sparse volume by specifying
the
s
flag to zfs create -V, or by changing
the reservation once the volume has been created. A sparse volume is
defined as a volume where the reservation is not equal to the volume size.
For a sparse volume, changes to volsize are not reflected
in the reservation.
For more information about using volumes, see Emulated Volumes.