2019-11-12 22:17:40 +03:00
|
|
|
.\"
|
|
|
|
.\" CDDL HEADER START
|
|
|
|
.\"
|
|
|
|
.\" The contents of this file are subject to the terms of the
|
|
|
|
.\" Common Development and Distribution License (the "License").
|
|
|
|
.\" You may not use this file except in compliance with the License.
|
|
|
|
.\"
|
|
|
|
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
2022-07-12 00:16:13 +03:00
|
|
|
.\" or https://opensource.org/licenses/CDDL-1.0.
|
2019-11-12 22:17:40 +03:00
|
|
|
.\" See the License for the specific language governing permissions
|
|
|
|
.\" and limitations under the License.
|
|
|
|
.\"
|
|
|
|
.\" When distributing Covered Code, include this CDDL HEADER in each
|
|
|
|
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
|
|
|
.\" If applicable, add the following below this CDDL HEADER, with the
|
|
|
|
.\" fields enclosed by brackets "[]" replaced with your own identifying
|
|
|
|
.\" information: Portions Copyright [yyyy] [name of copyright owner]
|
|
|
|
.\"
|
|
|
|
.\" CDDL HEADER END
|
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
|
|
|
|
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
|
|
|
|
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
|
2019-12-11 22:58:37 +03:00
|
|
|
.\" Copyright (c) 2011, Pawel Jakub Dawidek <pjd@FreeBSD.org>
|
|
|
|
.\" Copyright (c) 2012, Glen Barber <gjb@FreeBSD.org>
|
|
|
|
.\" Copyright (c) 2012, Bryan Drewery <bdrewery@FreeBSD.org>
|
|
|
|
.\" Copyright (c) 2013, Steven Hartland <smh@FreeBSD.org>
|
2019-11-12 22:17:40 +03:00
|
|
|
.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
|
|
|
|
.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
|
|
|
|
.\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
|
|
|
|
.\" Copyright (c) 2014 Integros [integros.com]
|
2019-12-11 22:58:37 +03:00
|
|
|
.\" Copyright (c) 2016 Nexenta Systems, Inc. All Rights Reserved.
|
|
|
|
.\" Copyright (c) 2014, Xin LI <delphij@FreeBSD.org>
|
|
|
|
.\" Copyright (c) 2014-2015, The FreeBSD Foundation, All Rights Reserved.
|
2019-11-12 22:17:40 +03:00
|
|
|
.\" Copyright 2019 Richard Laager. All rights reserved.
|
|
|
|
.\" Copyright 2018 Nexenta Systems, Inc.
|
|
|
|
.\" Copyright 2019 Joyent, Inc.
|
Add zstd support to zfs
This PR adds two new compression types, based on ZStandard:
- zstd: A basic ZStandard compression algorithm Available compression.
Levels for zstd are zstd-1 through zstd-19, where the compression
increases with every level, but speed decreases.
- zstd-fast: A faster version of the ZStandard compression algorithm
zstd-fast is basically a "negative" level of zstd. The compression
decreases with every level, but speed increases.
Available compression levels for zstd-fast:
- zstd-fast-1 through zstd-fast-10
- zstd-fast-20 through zstd-fast-100 (in increments of 10)
- zstd-fast-500 and zstd-fast-1000
For more information check the man page.
Implementation details:
Rather than treat each level of zstd as a different algorithm (as was
done historically with gzip), the block pointer `enum zio_compress`
value is simply zstd for all levels, including zstd-fast, since they all
use the same decompression function.
The compress= property (a 64bit unsigned integer) uses the lower 7 bits
to store the compression algorithm (matching the number of bits used in
a block pointer, as the 8th bit was borrowed for embedded block
pointers). The upper bits are used to store the compression level.
It is necessary to be able to determine what compression level was used
when later reading a block back, so the concept used in LZ4, where the
first 32bits of the on-disk value are the size of the compressed data
(since the allocation is rounded up to the nearest ashift), was
extended, and we store the version of ZSTD and the level as well as the
compressed size. This value is returned when decompressing a block, so
that if the block needs to be recompressed (L2ARC, nop-write, etc), that
the same parameters will be used to result in the matching checksum.
All of the internal ZFS code ( `arc_buf_hdr_t`, `objset_t`,
`zio_prop_t`, etc.) uses the separated _compress and _complevel
variables. Only the properties ZAP contains the combined/bit-shifted
value. The combined value is split when the compression_changed_cb()
callback is called, and sets both objset members (os_compress and
os_complevel).
The userspace tools all use the combined/bit-shifted value.
Additional notes:
zdb can now also decode the ZSTD compression header (flag -Z) and
inspect the size, version and compression level saved in that header.
For each record, if it is ZSTD compressed, the parameters of the decoded
compression header get printed.
ZSTD is included with all current tests and new tests are added
as-needed.
Per-dataset feature flags now get activated when the property is set.
If a compression algorithm requires a feature flag, zfs activates the
feature when the property is set, rather than waiting for the first
block to be born. This is currently only used by zstd but can be
extended as needed.
Portions-Sponsored-By: The FreeBSD Foundation
Co-authored-by: Allan Jude <allanjude@freebsd.org>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Co-authored-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Co-authored-by: Michael Niewöhner <foss@mniewoehner.de>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Signed-off-by: Allan Jude <allanjude@freebsd.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes #6247
Closes #9024
Closes #10277
Closes #10278
2020-08-18 20:10:17 +03:00
|
|
|
.\" Copyright (c) 2019, Kjeld Schouten-Lebbing
|
2022-10-20 03:07:51 +03:00
|
|
|
.\" Copyright (c) 2022 Hewlett Packard Enterprise Development LP.
|
2019-11-12 22:17:40 +03:00
|
|
|
.\"
|
2024-07-24 02:38:19 +03:00
|
|
|
.Dd June 29, 2024
|
2021-06-04 23:29:26 +03:00
|
|
|
.Dt ZFSPROPS 7
|
2020-08-21 21:55:47 +03:00
|
|
|
.Os
|
2021-05-27 03:46:40 +03:00
|
|
|
.
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sh NAME
|
|
|
|
.Nm zfsprops
|
2021-05-27 03:46:40 +03:00
|
|
|
.Nd native and user-defined properties of ZFS datasets
|
|
|
|
.
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
Properties are divided into two types, native properties and user-defined
|
|
|
|
.Po or
|
|
|
|
.Qq user
|
|
|
|
.Pc
|
|
|
|
properties.
|
|
|
|
Native properties either export internal statistics or control ZFS behavior.
|
|
|
|
In addition, native properties are either editable or read-only.
|
|
|
|
User properties have no effect on ZFS behavior, but you can use them to annotate
|
|
|
|
datasets in a way that is meaningful in your environment.
|
|
|
|
For more information about user properties, see the
|
|
|
|
.Sx User Properties
|
|
|
|
section, below.
|
2021-05-27 03:46:40 +03:00
|
|
|
.
|
2019-11-12 22:17:40 +03:00
|
|
|
.Ss Native Properties
|
|
|
|
Every dataset has a set of properties that export statistics about the dataset
|
|
|
|
as well as control various behaviors.
|
|
|
|
Properties are inherited from the parent unless overridden by the child.
|
|
|
|
Some properties apply only to certain types of datasets
|
|
|
|
.Pq file systems, volumes, or snapshots .
|
|
|
|
.Pp
|
|
|
|
The values of numeric properties can be specified using human-readable suffixes
|
|
|
|
.Po for example,
|
|
|
|
.Sy k ,
|
|
|
|
.Sy KB ,
|
|
|
|
.Sy M ,
|
|
|
|
.Sy Gb ,
|
|
|
|
and so forth, up to
|
|
|
|
.Sy Z
|
|
|
|
for zettabyte
|
|
|
|
.Pc .
|
|
|
|
The following are all valid
|
|
|
|
.Pq and equal
|
|
|
|
specifications:
|
2023-04-19 19:03:42 +03:00
|
|
|
.Li 1536M ,
|
|
|
|
.Li 1.5g ,
|
|
|
|
.Li 1.50GB .
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pp
|
|
|
|
The values of non-numeric properties are case sensitive and must be lowercase,
|
|
|
|
except for
|
|
|
|
.Sy mountpoint ,
|
|
|
|
.Sy sharenfs ,
|
|
|
|
and
|
|
|
|
.Sy sharesmb .
|
|
|
|
.Pp
|
|
|
|
The following native properties consist of read-only statistics about the
|
|
|
|
dataset.
|
|
|
|
These properties can be neither set, nor inherited.
|
|
|
|
Native properties apply to all dataset types unless otherwise noted.
|
|
|
|
.Bl -tag -width "usedbyrefreservation"
|
|
|
|
.It Sy available
|
|
|
|
The amount of space available to the dataset and all its children, assuming that
|
|
|
|
there is no other activity in the pool.
|
|
|
|
Because space is shared within a pool, availability can be limited by any number
|
|
|
|
of factors, including physical pool size, quotas, reservations, or other
|
|
|
|
datasets within the pool.
|
|
|
|
.Pp
|
|
|
|
This property can also be referred to by its shortened column name,
|
|
|
|
.Sy avail .
|
|
|
|
.It Sy compressratio
|
|
|
|
For non-snapshots, the compression ratio achieved for the
|
|
|
|
.Sy used
|
|
|
|
space of this dataset, expressed as a multiplier.
|
|
|
|
The
|
|
|
|
.Sy used
|
|
|
|
property includes descendant datasets, and, for clones, does not include the
|
|
|
|
space shared with the origin snapshot.
|
|
|
|
For snapshots, the
|
|
|
|
.Sy compressratio
|
|
|
|
is the same as the
|
|
|
|
.Sy refcompressratio
|
|
|
|
property.
|
|
|
|
Compression can be turned on by running:
|
|
|
|
.Nm zfs Cm set Sy compression Ns = Ns Sy on Ar dataset .
|
|
|
|
The default value is
|
|
|
|
.Sy off .
|
|
|
|
.It Sy createtxg
|
2021-05-27 03:46:40 +03:00
|
|
|
The transaction group (txg) in which the dataset was created.
|
|
|
|
Bookmarks have the same
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy createtxg
|
2021-05-27 03:46:40 +03:00
|
|
|
as the snapshot they are initially tied to.
|
|
|
|
This property is suitable for ordering a list of snapshots,
|
|
|
|
e.g. for incremental send and receive.
|
2019-11-12 22:17:40 +03:00
|
|
|
.It Sy creation
|
|
|
|
The time this dataset was created.
|
|
|
|
.It Sy clones
|
|
|
|
For snapshots, this property is a comma-separated list of filesystems or volumes
|
|
|
|
which are clones of this snapshot.
|
|
|
|
The clones'
|
|
|
|
.Sy origin
|
|
|
|
property is this snapshot.
|
|
|
|
If the
|
|
|
|
.Sy clones
|
|
|
|
property is not empty, then this snapshot can not be destroyed
|
|
|
|
.Po even with the
|
|
|
|
.Fl r
|
|
|
|
or
|
|
|
|
.Fl f
|
|
|
|
options
|
|
|
|
.Pc .
|
|
|
|
The roles of origin and clone can be swapped by promoting the clone with the
|
|
|
|
.Nm zfs Cm promote
|
|
|
|
command.
|
|
|
|
.It Sy defer_destroy
|
|
|
|
This property is
|
|
|
|
.Sy on
|
|
|
|
if the snapshot has been marked for deferred destroy by using the
|
|
|
|
.Nm zfs Cm destroy Fl d
|
|
|
|
command.
|
|
|
|
Otherwise, the property is
|
|
|
|
.Sy off .
|
|
|
|
.It Sy encryptionroot
|
|
|
|
For encrypted datasets, indicates where the dataset is currently inheriting its
|
2021-05-27 03:46:40 +03:00
|
|
|
encryption key from.
|
|
|
|
Loading or unloading a key for the
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy encryptionroot
|
|
|
|
will implicitly load / unload the key for any inheriting datasets (see
|
|
|
|
.Nm zfs Cm load-key
|
|
|
|
and
|
|
|
|
.Nm zfs Cm unload-key
|
|
|
|
for details).
|
|
|
|
Clones will always share an
|
2021-05-27 03:46:40 +03:00
|
|
|
encryption key with their origin.
|
|
|
|
See the
|
|
|
|
.Sx Encryption
|
2019-11-12 22:17:40 +03:00
|
|
|
section of
|
|
|
|
.Xr zfs-load-key 8
|
|
|
|
for details.
|
|
|
|
.It Sy filesystem_count
|
|
|
|
The total number of filesystems and volumes that exist under this location in
|
|
|
|
the dataset tree.
|
|
|
|
This value is only available when a
|
|
|
|
.Sy filesystem_limit
|
|
|
|
has been set somewhere in the tree under which the dataset resides.
|
|
|
|
.It Sy keystatus
|
2021-05-27 03:46:40 +03:00
|
|
|
Indicates if an encryption key is currently loaded into ZFS.
|
|
|
|
The possible values are
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy none ,
|
|
|
|
.Sy available ,
|
|
|
|
and
|
|
|
|
.Sy unavailable .
|
|
|
|
See
|
|
|
|
.Nm zfs Cm load-key
|
|
|
|
and
|
|
|
|
.Nm zfs Cm unload-key .
|
|
|
|
.It Sy guid
|
|
|
|
The 64 bit GUID of this dataset or bookmark which does not change over its
|
2021-05-27 03:46:40 +03:00
|
|
|
entire lifetime.
|
2022-11-12 15:23:30 +03:00
|
|
|
When a snapshot is sent to another pool, the received snapshot has the same
|
|
|
|
GUID.
|
2021-05-27 03:46:40 +03:00
|
|
|
Thus, the
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy guid
|
|
|
|
is suitable to identify a snapshot across pools.
|
|
|
|
.It Sy logicalreferenced
|
|
|
|
The amount of space that is
|
|
|
|
.Qq logically
|
|
|
|
accessible by this dataset.
|
|
|
|
See the
|
|
|
|
.Sy referenced
|
|
|
|
property.
|
|
|
|
The logical space ignores the effect of the
|
|
|
|
.Sy compression
|
|
|
|
and
|
|
|
|
.Sy copies
|
|
|
|
properties, giving a quantity closer to the amount of data that applications
|
|
|
|
see.
|
|
|
|
However, it does include space consumed by metadata.
|
|
|
|
.Pp
|
|
|
|
This property can also be referred to by its shortened column name,
|
|
|
|
.Sy lrefer .
|
|
|
|
.It Sy logicalused
|
|
|
|
The amount of space that is
|
|
|
|
.Qq logically
|
|
|
|
consumed by this dataset and all its descendents.
|
|
|
|
See the
|
|
|
|
.Sy used
|
|
|
|
property.
|
|
|
|
The logical space ignores the effect of the
|
|
|
|
.Sy compression
|
|
|
|
and
|
|
|
|
.Sy copies
|
|
|
|
properties, giving a quantity closer to the amount of data that applications
|
|
|
|
see.
|
|
|
|
However, it does include space consumed by metadata.
|
|
|
|
.Pp
|
|
|
|
This property can also be referred to by its shortened column name,
|
|
|
|
.Sy lused .
|
|
|
|
.It Sy mounted
|
|
|
|
For file systems, indicates whether the file system is currently mounted.
|
|
|
|
This property can be either
|
|
|
|
.Sy yes
|
|
|
|
or
|
|
|
|
.Sy no .
|
|
|
|
.It Sy objsetid
|
2021-05-27 03:46:40 +03:00
|
|
|
A unique identifier for this dataset within the pool.
|
|
|
|
Unlike the dataset's
|
|
|
|
.Sy guid , No the Sy objsetid
|
2019-11-12 22:17:40 +03:00
|
|
|
of a dataset is not transferred to other pools when the snapshot is copied
|
|
|
|
with a send/receive operation.
|
|
|
|
The
|
|
|
|
.Sy objsetid
|
|
|
|
can be reused (for a new dataset) after the dataset is deleted.
|
|
|
|
.It Sy origin
|
|
|
|
For cloned file systems or volumes, the snapshot from which the clone was
|
|
|
|
created.
|
|
|
|
See also the
|
|
|
|
.Sy clones
|
|
|
|
property.
|
|
|
|
.It Sy receive_resume_token
|
|
|
|
For filesystems or volumes which have saved partially-completed state from
|
2021-05-26 19:41:20 +03:00
|
|
|
.Nm zfs Cm receive Fl s ,
|
2019-11-12 22:17:40 +03:00
|
|
|
this opaque token can be provided to
|
2021-05-26 19:41:20 +03:00
|
|
|
.Nm zfs Cm send Fl t
|
2019-11-12 22:17:40 +03:00
|
|
|
to resume and complete the
|
2021-05-26 19:41:20 +03:00
|
|
|
.Nm zfs Cm receive .
|
2019-11-12 22:17:40 +03:00
|
|
|
.It Sy redact_snaps
|
2022-11-12 15:23:30 +03:00
|
|
|
For bookmarks, this is the list of snapshot guids the bookmark contains a
|
|
|
|
redaction
|
2019-11-12 22:17:40 +03:00
|
|
|
list for.
|
|
|
|
For snapshots, this is the list of snapshot guids the snapshot is redacted with
|
|
|
|
respect to.
|
|
|
|
.It Sy referenced
|
|
|
|
The amount of data that is accessible by this dataset, which may or may not be
|
|
|
|
shared with other datasets in the pool.
|
|
|
|
When a snapshot or clone is created, it initially references the same amount of
|
|
|
|
space as the file system or snapshot it was created from, since its contents are
|
|
|
|
identical.
|
|
|
|
.Pp
|
|
|
|
This property can also be referred to by its shortened column name,
|
|
|
|
.Sy refer .
|
|
|
|
.It Sy refcompressratio
|
|
|
|
The compression ratio achieved for the
|
|
|
|
.Sy referenced
|
|
|
|
space of this dataset, expressed as a multiplier.
|
|
|
|
See also the
|
|
|
|
.Sy compressratio
|
|
|
|
property.
|
|
|
|
.It Sy snapshot_count
|
|
|
|
The total number of snapshots that exist under this location in the dataset
|
|
|
|
tree.
|
|
|
|
This value is only available when a
|
|
|
|
.Sy snapshot_limit
|
|
|
|
has been set somewhere in the tree under which the dataset resides.
|
|
|
|
.It Sy type
|
|
|
|
The type of dataset:
|
|
|
|
.Sy filesystem ,
|
|
|
|
.Sy volume ,
|
2020-06-11 03:53:07 +03:00
|
|
|
.Sy snapshot ,
|
2019-11-12 22:17:40 +03:00
|
|
|
or
|
2020-06-11 03:53:07 +03:00
|
|
|
.Sy bookmark .
|
2019-11-12 22:17:40 +03:00
|
|
|
.It Sy used
|
|
|
|
The amount of space consumed by this dataset and all its descendents.
|
|
|
|
This is the value that is checked against this dataset's quota and reservation.
|
|
|
|
The space used does not include this dataset's reservation, but does take into
|
|
|
|
account the reservations of any descendent datasets.
|
|
|
|
The amount of space that a dataset consumes from its parent, as well as the
|
|
|
|
amount of space that is freed if this dataset is recursively destroyed, is the
|
|
|
|
greater of its space used and its reservation.
|
|
|
|
.Pp
|
|
|
|
The used space of a snapshot
|
|
|
|
.Po see the
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sx Snapshots
|
2019-11-12 22:17:40 +03:00
|
|
|
section of
|
2021-06-04 23:29:26 +03:00
|
|
|
.Xr zfsconcepts 7
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pc
|
|
|
|
is space that is referenced exclusively by this snapshot.
|
|
|
|
If this snapshot is destroyed, the amount of
|
|
|
|
.Sy used
|
|
|
|
space will be freed.
|
|
|
|
Space that is shared by multiple snapshots isn't accounted for in this metric.
|
|
|
|
When a snapshot is destroyed, space that was previously shared with this
|
|
|
|
snapshot can become unique to snapshots adjacent to it, thus changing the used
|
|
|
|
space of those snapshots.
|
|
|
|
The used space of the latest snapshot can also be affected by changes in the
|
|
|
|
file system.
|
|
|
|
Note that the
|
|
|
|
.Sy used
|
|
|
|
space of a snapshot is a subset of the
|
|
|
|
.Sy written
|
|
|
|
space of the snapshot.
|
|
|
|
.Pp
|
|
|
|
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
|
|
|
|
.Xr fsync 2
|
|
|
|
or
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy O_SYNC
|
2019-11-12 22:17:40 +03:00
|
|
|
does not necessarily guarantee that the space usage information is updated
|
|
|
|
immediately.
|
|
|
|
.It Sy usedby*
|
|
|
|
The
|
|
|
|
.Sy usedby*
|
|
|
|
properties decompose the
|
|
|
|
.Sy used
|
|
|
|
properties into the various reasons that space is used.
|
|
|
|
Specifically,
|
|
|
|
.Sy used No =
|
|
|
|
.Sy usedbychildren No +
|
|
|
|
.Sy usedbydataset No +
|
|
|
|
.Sy usedbyrefreservation No +
|
|
|
|
.Sy usedbysnapshots .
|
|
|
|
These properties are only available for datasets created on
|
|
|
|
.Nm zpool
|
|
|
|
.Qo version 13 Qc
|
|
|
|
pools.
|
|
|
|
.It Sy usedbychildren
|
|
|
|
The amount of space used by children of this dataset, which would be freed if
|
|
|
|
all the dataset's children were destroyed.
|
|
|
|
.It Sy usedbydataset
|
|
|
|
The amount of space used by this dataset itself, which would be freed if the
|
|
|
|
dataset were destroyed
|
|
|
|
.Po after first removing any
|
|
|
|
.Sy refreservation
|
|
|
|
and destroying any necessary snapshots or descendents
|
|
|
|
.Pc .
|
|
|
|
.It Sy usedbyrefreservation
|
|
|
|
The amount of space used by a
|
|
|
|
.Sy refreservation
|
|
|
|
set on this dataset, which would be freed if the
|
|
|
|
.Sy refreservation
|
|
|
|
was removed.
|
|
|
|
.It Sy usedbysnapshots
|
|
|
|
The amount of space consumed by snapshots of this dataset.
|
|
|
|
In particular, it is the amount of space that would be freed if all of this
|
|
|
|
dataset's snapshots were destroyed.
|
|
|
|
Note that this is not simply the sum of the snapshots'
|
|
|
|
.Sy used
|
|
|
|
properties because space can be shared by multiple snapshots.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy userused Ns @ Ns Ar user
|
2019-11-12 22:17:40 +03:00
|
|
|
The amount of space consumed by the specified user in this dataset.
|
|
|
|
Space is charged to the owner of each file, as displayed by
|
|
|
|
.Nm ls Fl l .
|
|
|
|
The amount of space charged is displayed by
|
2021-05-27 03:46:40 +03:00
|
|
|
.Nm du No and Nm ls Fl s .
|
2019-11-12 22:17:40 +03:00
|
|
|
See the
|
|
|
|
.Nm zfs Cm userspace
|
2021-05-27 03:46:40 +03:00
|
|
|
command for more information.
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pp
|
|
|
|
Unprivileged users can access only their own space usage.
|
|
|
|
The root user, or a user who has been granted the
|
|
|
|
.Sy userused
|
|
|
|
privilege with
|
|
|
|
.Nm zfs Cm allow ,
|
|
|
|
can access everyone's usage.
|
|
|
|
.Pp
|
|
|
|
The
|
2022-03-24 22:14:25 +03:00
|
|
|
.Sy userused Ns @ Ns Ar …
|
2019-11-12 22:17:40 +03:00
|
|
|
properties are not displayed by
|
|
|
|
.Nm zfs Cm get Sy all .
|
2021-05-27 03:46:40 +03:00
|
|
|
The user's name must be appended after the
|
|
|
|
.Sy @
|
|
|
|
symbol, using one of the following forms:
|
|
|
|
.Bl -bullet -compact -offset 4n
|
2019-11-12 22:17:40 +03:00
|
|
|
.It
|
2021-05-27 03:46:40 +03:00
|
|
|
POSIX name
|
|
|
|
.Pq Qq joe
|
2019-11-12 22:17:40 +03:00
|
|
|
.It
|
2021-05-27 03:46:40 +03:00
|
|
|
POSIX numeric ID
|
|
|
|
.Pq Qq 789
|
2019-11-12 22:17:40 +03:00
|
|
|
.It
|
2021-05-27 03:46:40 +03:00
|
|
|
SID name
|
|
|
|
.Pq Qq joe.smith@mydomain
|
2019-11-12 22:17:40 +03:00
|
|
|
.It
|
2021-05-27 03:46:40 +03:00
|
|
|
SID numeric ID
|
|
|
|
.Pq Qq S-1-123-456-789
|
2019-11-12 22:17:40 +03:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Files created on Linux always have POSIX owners.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy userobjused Ns @ Ns Ar user
|
2019-11-12 22:17:40 +03:00
|
|
|
The
|
|
|
|
.Sy userobjused
|
|
|
|
property is similar to
|
|
|
|
.Sy userused
|
2021-05-27 03:46:40 +03:00
|
|
|
but instead it counts the number of objects consumed by a user.
|
|
|
|
This property counts all objects allocated on behalf of the user,
|
|
|
|
it may differ from the results of system tools such as
|
2019-11-12 22:17:40 +03:00
|
|
|
.Nm df Fl i .
|
|
|
|
.Pp
|
|
|
|
When the property
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy xattr Ns = Ns Sy on
|
2019-11-12 22:17:40 +03:00
|
|
|
is set on a file system additional objects will be created per-file to store
|
2021-05-27 03:46:40 +03:00
|
|
|
extended attributes.
|
|
|
|
These additional objects are reflected in the
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy userobjused
|
|
|
|
value and are counted against the user's
|
|
|
|
.Sy userobjquota .
|
|
|
|
When a file system is configured to use
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy xattr Ns = Ns Sy sa
|
2019-11-12 22:17:40 +03:00
|
|
|
no additional internal objects are normally required.
|
|
|
|
.It Sy userrefs
|
|
|
|
This property is set to the number of user holds on this snapshot.
|
|
|
|
User holds are set by using the
|
|
|
|
.Nm zfs Cm hold
|
|
|
|
command.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy groupused Ns @ Ns Ar group
|
2019-11-12 22:17:40 +03:00
|
|
|
The amount of space consumed by the specified group in this dataset.
|
|
|
|
Space is charged to the group of each file, as displayed by
|
|
|
|
.Nm ls Fl l .
|
|
|
|
See the
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy userused Ns @ Ns Ar user
|
2019-11-12 22:17:40 +03:00
|
|
|
property for more information.
|
|
|
|
.Pp
|
|
|
|
Unprivileged users can only access their own groups' space usage.
|
|
|
|
The root user, or a user who has been granted the
|
|
|
|
.Sy groupused
|
|
|
|
privilege with
|
|
|
|
.Nm zfs Cm allow ,
|
|
|
|
can access all groups' usage.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy groupobjused Ns @ Ns Ar group
|
2019-11-12 22:17:40 +03:00
|
|
|
The number of objects consumed by the specified group in this dataset.
|
|
|
|
Multiple objects may be charged to the group for each file when extended
|
2021-05-27 03:46:40 +03:00
|
|
|
attributes are in use.
|
|
|
|
See the
|
|
|
|
.Sy userobjused Ns @ Ns Ar user
|
2019-11-12 22:17:40 +03:00
|
|
|
property for more information.
|
|
|
|
.Pp
|
|
|
|
Unprivileged users can only access their own groups' space usage.
|
|
|
|
The root user, or a user who has been granted the
|
|
|
|
.Sy groupobjused
|
|
|
|
privilege with
|
|
|
|
.Nm zfs Cm allow ,
|
|
|
|
can access all groups' usage.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy projectused Ns @ Ns Ar project
|
|
|
|
The amount of space consumed by the specified project in this dataset.
|
|
|
|
Project is identified via the project identifier (ID) that is object-based
|
|
|
|
numeral attribute.
|
|
|
|
An object can inherit the project ID from its parent object (if the
|
2019-11-12 22:17:40 +03:00
|
|
|
parent has the flag of inherit project ID that can be set and changed via
|
|
|
|
.Nm chattr Fl /+P
|
|
|
|
or
|
|
|
|
.Nm zfs project Fl s )
|
2021-05-27 03:46:40 +03:00
|
|
|
when being created.
|
|
|
|
The privileged user can set and change object's project
|
2019-11-12 22:17:40 +03:00
|
|
|
ID via
|
|
|
|
.Nm chattr Fl p
|
|
|
|
or
|
|
|
|
.Nm zfs project Fl s
|
2021-05-27 03:46:40 +03:00
|
|
|
anytime.
|
|
|
|
Space is charged to the project of each file, as displayed by
|
2019-11-12 22:17:40 +03:00
|
|
|
.Nm lsattr Fl p
|
|
|
|
or
|
|
|
|
.Nm zfs project .
|
|
|
|
See the
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy userused Ns @ Ns Ar user
|
2019-11-12 22:17:40 +03:00
|
|
|
property for more information.
|
|
|
|
.Pp
|
|
|
|
The root user, or a user who has been granted the
|
|
|
|
.Sy projectused
|
|
|
|
privilege with
|
|
|
|
.Nm zfs allow ,
|
|
|
|
can access all projects' usage.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy projectobjused Ns @ Ns Ar project
|
2019-11-12 22:17:40 +03:00
|
|
|
The
|
|
|
|
.Sy projectobjused
|
|
|
|
is similar to
|
|
|
|
.Sy projectused
|
2021-05-27 03:46:40 +03:00
|
|
|
but instead it counts the number of objects consumed by project.
|
|
|
|
When the property
|
|
|
|
.Sy xattr Ns = Ns Sy on
|
2019-11-12 22:17:40 +03:00
|
|
|
is set on a fileset, ZFS will create additional objects per-file to store
|
2021-05-27 03:46:40 +03:00
|
|
|
extended attributes.
|
|
|
|
These additional objects are reflected in the
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy projectobjused
|
|
|
|
value and are counted against the project's
|
|
|
|
.Sy projectobjquota .
|
|
|
|
When a filesystem is configured to use
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy xattr Ns = Ns Sy sa
|
|
|
|
no additional internal objects are required.
|
|
|
|
See the
|
|
|
|
.Sy userobjused Ns @ Ns Ar user
|
2019-11-12 22:17:40 +03:00
|
|
|
property for more information.
|
|
|
|
.Pp
|
|
|
|
The root user, or a user who has been granted the
|
|
|
|
.Sy projectobjused
|
|
|
|
privilege with
|
|
|
|
.Nm zfs allow ,
|
|
|
|
can access all projects' objects usage.
|
2022-08-03 02:45:30 +03:00
|
|
|
.It Sy snapshots_changed
|
|
|
|
Provides a mechanism to quickly determine whether snapshot list has
|
|
|
|
changed without having to mount a dataset or iterate the snapshot list.
|
|
|
|
Specifies the time at which a snapshot for a dataset was last
|
|
|
|
created or deleted.
|
|
|
|
.Pp
|
|
|
|
This allows us to be more efficient how often we query snapshots.
|
2022-08-25 00:20:43 +03:00
|
|
|
The property is persistent across mount and unmount operations only if the
|
|
|
|
.Sy extensible_dataset
|
|
|
|
feature is enabled.
|
2019-11-12 22:17:40 +03:00
|
|
|
.It Sy volblocksize
|
|
|
|
For volumes, specifies the block size of the volume.
|
|
|
|
The
|
|
|
|
.Sy blocksize
|
|
|
|
cannot be changed once the volume has been written, so it should be set at
|
|
|
|
volume creation time.
|
|
|
|
The default
|
|
|
|
.Sy blocksize
|
2021-08-17 18:59:46 +03:00
|
|
|
for volumes is 16 Kbytes.
|
2019-11-12 22:17:40 +03:00
|
|
|
Any power of 2 from 512 bytes to 128 Kbytes is valid.
|
|
|
|
.Pp
|
|
|
|
This property can also be referred to by its shortened column name,
|
|
|
|
.Sy volblock .
|
|
|
|
.It Sy written
|
|
|
|
The amount of space
|
|
|
|
.Sy referenced
|
|
|
|
by this dataset, that was written since the previous snapshot
|
|
|
|
.Pq i.e. that is not referenced by the previous snapshot .
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy written Ns @ Ns Ar snapshot
|
2019-11-12 22:17:40 +03:00
|
|
|
The amount of
|
|
|
|
.Sy referenced
|
|
|
|
space written to this dataset since the specified snapshot.
|
|
|
|
This is the space that is referenced by this dataset but was not referenced by
|
|
|
|
the specified snapshot.
|
|
|
|
.Pp
|
|
|
|
The
|
2021-05-27 03:46:40 +03:00
|
|
|
.Ar snapshot
|
2019-11-12 22:17:40 +03:00
|
|
|
may be specified as a short snapshot name
|
2021-05-27 03:46:40 +03:00
|
|
|
.Pq just the part after the Sy @ ,
|
2019-11-12 22:17:40 +03:00
|
|
|
in which case it will be interpreted as a snapshot in the same filesystem as
|
|
|
|
this dataset.
|
|
|
|
The
|
2021-05-27 03:46:40 +03:00
|
|
|
.Ar snapshot
|
2019-11-12 22:17:40 +03:00
|
|
|
may be a full snapshot name
|
2021-05-27 03:46:40 +03:00
|
|
|
.Pq Ar filesystem Ns @ Ns Ar snapshot ,
|
2019-11-12 22:17:40 +03:00
|
|
|
which for clones may be a snapshot in the origin's filesystem
|
|
|
|
.Pq or the origin of the origin's filesystem, etc.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The following native properties can be used to change the behavior of a ZFS
|
|
|
|
dataset.
|
|
|
|
.Bl -tag -width ""
|
|
|
|
.It Xo
|
|
|
|
.Sy aclinherit Ns = Ns Sy discard Ns | Ns Sy noallow Ns | Ns
|
|
|
|
.Sy restricted Ns | Ns Sy passthrough Ns | Ns Sy passthrough-x
|
|
|
|
.Xc
|
|
|
|
Controls how ACEs are inherited when files and directories are created.
|
2021-05-27 03:46:40 +03:00
|
|
|
.Bl -tag -compact -offset 4n -width "passthrough-x"
|
2019-11-12 22:17:40 +03:00
|
|
|
.It Sy discard
|
|
|
|
does not inherit any ACEs.
|
|
|
|
.It Sy noallow
|
|
|
|
only inherits inheritable ACEs that specify
|
|
|
|
.Qq deny
|
|
|
|
permissions.
|
|
|
|
.It Sy restricted
|
|
|
|
default, removes the
|
|
|
|
.Sy write_acl
|
|
|
|
and
|
|
|
|
.Sy write_owner
|
|
|
|
permissions when the ACE is inherited.
|
|
|
|
.It Sy passthrough
|
|
|
|
inherits all inheritable ACEs without any modifications.
|
|
|
|
.It Sy passthrough-x
|
|
|
|
same meaning as
|
|
|
|
.Sy passthrough ,
|
|
|
|
except that the
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy owner@ , group@ , No and Sy everyone@
|
2019-11-12 22:17:40 +03:00
|
|
|
ACEs inherit the execute permission only if the file creation mode also requests
|
|
|
|
the execute bit.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
When the property value is set to
|
|
|
|
.Sy passthrough ,
|
|
|
|
files are created with a mode determined by the inheritable ACEs.
|
|
|
|
If no inheritable ACEs exist that affect the mode, then the mode is set in
|
|
|
|
accordance to the requested mode from the application.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Sy aclinherit
|
|
|
|
property does not apply to POSIX ACLs.
|
2019-12-05 03:35:18 +03:00
|
|
|
.It Xo
|
|
|
|
.Sy aclmode Ns = Ns Sy discard Ns | Ns Sy groupmask Ns | Ns
|
2019-12-05 03:45:14 +03:00
|
|
|
.Sy passthrough Ns | Ns Sy restricted Ns
|
2019-12-05 03:35:18 +03:00
|
|
|
.Xc
|
|
|
|
Controls how an ACL is modified during chmod(2) and how inherited ACEs
|
2021-05-27 03:46:40 +03:00
|
|
|
are modified by the file creation mode:
|
|
|
|
.Bl -tag -compact -offset 4n -width "passthrough"
|
2020-02-04 19:40:08 +03:00
|
|
|
.It Sy discard
|
|
|
|
default, deletes all
|
2019-12-05 03:35:18 +03:00
|
|
|
.Sy ACEs
|
|
|
|
except for those representing
|
|
|
|
the mode of the file or directory requested by
|
|
|
|
.Xr chmod 2 .
|
2020-02-04 19:40:08 +03:00
|
|
|
.It Sy groupmask
|
|
|
|
reduces permissions granted in all
|
2019-12-05 03:35:18 +03:00
|
|
|
.Sy ALLOW
|
|
|
|
entries found in the
|
|
|
|
.Sy ACL
|
2020-02-04 19:40:08 +03:00
|
|
|
such that they are no greater than the group permissions specified by
|
|
|
|
.Xr chmod 2 .
|
|
|
|
.It Sy passthrough
|
2021-05-27 03:46:40 +03:00
|
|
|
indicates that no changes are made to the ACL other than creating or updating
|
|
|
|
the necessary ACL entries to represent the new mode of the file or directory.
|
2020-02-04 19:40:08 +03:00
|
|
|
.It Sy restricted
|
|
|
|
will cause the
|
|
|
|
.Xr chmod 2
|
|
|
|
operation to return an error when used on any file or directory which has
|
2021-05-27 03:46:40 +03:00
|
|
|
a non-trivial ACL whose entries can not be represented by a mode.
|
2020-02-04 19:40:08 +03:00
|
|
|
.Xr chmod 2
|
|
|
|
is required to change the set user ID, set group ID, or sticky bits on a file
|
2021-05-27 03:46:40 +03:00
|
|
|
or directory, as they do not have equivalent ACL entries.
|
2020-02-04 19:40:08 +03:00
|
|
|
In order to use
|
|
|
|
.Xr chmod 2
|
2021-05-27 03:46:40 +03:00
|
|
|
on a file or directory with a non-trivial ACL when
|
2020-02-04 19:40:08 +03:00
|
|
|
.Sy aclmode
|
|
|
|
is set to
|
|
|
|
.Sy restricted ,
|
2021-05-27 03:46:40 +03:00
|
|
|
you must first remove all ACL entries which do not represent the current mode.
|
2020-02-04 19:40:08 +03:00
|
|
|
.El
|
2020-10-14 07:25:48 +03:00
|
|
|
.It Sy acltype Ns = Ns Sy off Ns | Ns Sy nfsv4 Ns | Ns Sy posix
|
2019-11-12 22:17:40 +03:00
|
|
|
Controls whether ACLs are enabled and if so what type of ACL to use.
|
2020-10-14 07:25:48 +03:00
|
|
|
When this property is set to a type of ACL not supported by the current
|
|
|
|
platform, the behavior is the same as if it were set to
|
|
|
|
.Sy off .
|
2021-05-27 03:46:40 +03:00
|
|
|
.Bl -tag -compact -offset 4n -width "posixacl"
|
2019-11-12 22:17:40 +03:00
|
|
|
.It Sy off
|
2020-10-14 07:25:48 +03:00
|
|
|
default on Linux, when a file system has the
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy acltype
|
|
|
|
property set to off then ACLs are disabled.
|
|
|
|
.It Sy noacl
|
|
|
|
an alias for
|
|
|
|
.Sy off
|
2020-10-14 07:25:48 +03:00
|
|
|
.It Sy nfsv4
|
2021-05-27 03:46:40 +03:00
|
|
|
default on
|
|
|
|
.Fx ,
|
|
|
|
indicates that NFSv4-style ZFS ACLs should be used.
|
2020-10-14 07:25:48 +03:00
|
|
|
These ACLs can be managed with the
|
|
|
|
.Xr getfacl 1
|
|
|
|
and
|
2021-05-27 03:46:40 +03:00
|
|
|
.Xr setfacl 1 .
|
|
|
|
The
|
2020-10-14 07:25:48 +03:00
|
|
|
.Sy nfsv4
|
|
|
|
ZFS ACL type is not yet supported on Linux.
|
2020-09-16 22:26:06 +03:00
|
|
|
.It Sy posix
|
2021-05-27 03:46:40 +03:00
|
|
|
indicates POSIX ACLs should be used.
|
|
|
|
POSIX ACLs are specific to Linux and are not functional on other platforms.
|
|
|
|
POSIX ACLs are stored as an extended
|
2019-11-12 22:17:40 +03:00
|
|
|
attribute and therefore will not overwrite any existing NFSv4 ACLs which
|
|
|
|
may be set.
|
2020-09-16 22:26:06 +03:00
|
|
|
.It Sy posixacl
|
|
|
|
an alias for
|
|
|
|
.Sy posix
|
2019-11-12 22:17:40 +03:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
To obtain the best performance when setting
|
2020-09-16 22:26:06 +03:00
|
|
|
.Sy posix
|
2019-11-12 22:17:40 +03:00
|
|
|
users are strongly encouraged to set the
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy xattr Ns = Ns Sy sa
|
|
|
|
property.
|
|
|
|
This will result in the POSIX ACL being stored more efficiently on disk.
|
|
|
|
But as a consequence, all new extended attributes will only be
|
2019-11-12 22:17:40 +03:00
|
|
|
accessible from OpenZFS implementations which support the
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy xattr Ns = Ns Sy sa
|
|
|
|
property.
|
|
|
|
See the
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy xattr
|
|
|
|
property for more details.
|
|
|
|
.It Sy atime Ns = Ns Sy on Ns | Ns Sy off
|
|
|
|
Controls whether the access time for files is updated when they are read.
|
|
|
|
Turning this property off avoids producing write traffic when reading files and
|
|
|
|
can result in significant performance gains, though it might confuse mailers
|
2021-05-27 03:46:40 +03:00
|
|
|
and other similar utilities.
|
|
|
|
The values
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy on
|
|
|
|
and
|
|
|
|
.Sy off
|
|
|
|
are equivalent to the
|
|
|
|
.Sy atime
|
|
|
|
and
|
|
|
|
.Sy noatime
|
2021-05-27 03:46:40 +03:00
|
|
|
mount options.
|
|
|
|
The default value is
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy on .
|
|
|
|
See also
|
|
|
|
.Sy relatime
|
|
|
|
below.
|
|
|
|
.It Sy canmount Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy noauto
|
|
|
|
If this property is set to
|
|
|
|
.Sy off ,
|
|
|
|
the file system cannot be mounted, and is ignored by
|
|
|
|
.Nm zfs Cm mount Fl a .
|
|
|
|
Setting this property to
|
|
|
|
.Sy off
|
|
|
|
is similar to setting the
|
|
|
|
.Sy mountpoint
|
|
|
|
property to
|
|
|
|
.Sy none ,
|
|
|
|
except that the dataset still has a normal
|
|
|
|
.Sy mountpoint
|
|
|
|
property, which can be inherited.
|
|
|
|
Setting this property to
|
|
|
|
.Sy off
|
|
|
|
allows datasets to be used solely as a mechanism to inherit properties.
|
|
|
|
One example of setting
|
|
|
|
.Sy canmount Ns = Ns Sy off
|
|
|
|
is to have two datasets with the same
|
|
|
|
.Sy mountpoint ,
|
|
|
|
so that the children of both datasets appear in the same directory, but might
|
|
|
|
have different inherited characteristics.
|
|
|
|
.Pp
|
|
|
|
When set to
|
|
|
|
.Sy noauto ,
|
|
|
|
a dataset can only be mounted and unmounted explicitly.
|
|
|
|
The dataset is not mounted automatically when the dataset is created or
|
|
|
|
imported, nor is it mounted by the
|
|
|
|
.Nm zfs Cm mount Fl a
|
|
|
|
command or unmounted by the
|
|
|
|
.Nm zfs Cm unmount Fl a
|
|
|
|
command.
|
|
|
|
.Pp
|
|
|
|
This property is not inherited.
|
|
|
|
.It Xo
|
|
|
|
.Sy checksum Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy fletcher2 Ns | Ns
|
|
|
|
.Sy fletcher4 Ns | Ns Sy sha256 Ns | Ns Sy noparity Ns | Ns
|
Introduce BLAKE3 checksums as an OpenZFS feature
This commit adds BLAKE3 checksums to OpenZFS, it has similar
performance to Edon-R, but without the caveats around the latter.
Homepage of BLAKE3: https://github.com/BLAKE3-team/BLAKE3
Wikipedia: https://en.wikipedia.org/wiki/BLAKE_(hash_function)#BLAKE3
Short description of Wikipedia:
BLAKE3 is a cryptographic hash function based on Bao and BLAKE2,
created by Jack O'Connor, Jean-Philippe Aumasson, Samuel Neves, and
Zooko Wilcox-O'Hearn. It was announced on January 9, 2020, at Real
World Crypto. BLAKE3 is a single algorithm with many desirable
features (parallelism, XOF, KDF, PRF and MAC), in contrast to BLAKE
and BLAKE2, which are algorithm families with multiple variants.
BLAKE3 has a binary tree structure, so it supports a practically
unlimited degree of parallelism (both SIMD and multithreading) given
enough input. The official Rust and C implementations are
dual-licensed as public domain (CC0) and the Apache License.
Along with adding the BLAKE3 hash into the OpenZFS infrastructure a
new benchmarking file called chksum_bench was introduced. When read
it reports the speed of the available checksum functions.
On Linux: cat /proc/spl/kstat/zfs/chksum_bench
On FreeBSD: sysctl kstat.zfs.misc.chksum_bench
This is an example output of an i3-1005G1 test system with Debian 11:
implementation 1k 4k 16k 64k 256k 1m 4m
edonr-generic 1196 1602 1761 1749 1762 1759 1751
skein-generic 546 591 608 615 619 612 616
sha256-generic 240 300 316 314 304 285 276
sha512-generic 353 441 467 476 472 467 426
blake3-generic 308 313 313 313 312 313 312
blake3-sse2 402 1289 1423 1446 1432 1458 1413
blake3-sse41 427 1470 1625 1704 1679 1607 1629
blake3-avx2 428 1920 3095 3343 3356 3318 3204
blake3-avx512 473 2687 4905 5836 5844 5643 5374
Output on Debian 5.10.0-10-amd64 system: (Ryzen 7 5800X)
implementation 1k 4k 16k 64k 256k 1m 4m
edonr-generic 1840 2458 2665 2719 2711 2723 2693
skein-generic 870 966 996 992 1003 1005 1009
sha256-generic 415 442 453 455 457 457 457
sha512-generic 608 690 711 718 719 720 721
blake3-generic 301 313 311 309 309 310 310
blake3-sse2 343 1865 2124 2188 2180 2181 2186
blake3-sse41 364 2091 2396 2509 2463 2482 2488
blake3-avx2 365 2590 4399 4971 4915 4802 4764
Output on Debian 5.10.0-9-powerpc64le system: (POWER 9)
implementation 1k 4k 16k 64k 256k 1m 4m
edonr-generic 1213 1703 1889 1918 1957 1902 1907
skein-generic 434 492 520 522 511 525 525
sha256-generic 167 183 187 188 188 187 188
sha512-generic 186 216 222 221 225 224 224
blake3-generic 153 152 154 153 151 153 153
blake3-sse2 391 1170 1366 1406 1428 1426 1414
blake3-sse41 352 1049 1212 1174 1262 1258 1259
Output on Debian 5.10.0-11-arm64 system: (Pi400)
implementation 1k 4k 16k 64k 256k 1m 4m
edonr-generic 487 603 629 639 643 641 641
skein-generic 271 299 303 308 309 309 307
sha256-generic 117 127 128 130 130 129 130
sha512-generic 145 165 170 172 173 174 175
blake3-generic 81 29 71 89 89 89 89
blake3-sse2 112 323 368 379 380 371 374
blake3-sse41 101 315 357 368 369 364 360
Structurally, the new code is mainly split into these parts:
- 1x cross platform generic c variant: blake3_generic.c
- 4x assembly for X86-64 (SSE2, SSE4.1, AVX2, AVX512)
- 2x assembly for ARMv8 (NEON converted from SSE2)
- 2x assembly for PPC64-LE (POWER8 converted from SSE2)
- one file for switching between the implementations
Note the PPC64 assembly requires the VSX instruction set and the
kfpu_begin() / kfpu_end() calls on PowerPC were updated accordingly.
Reviewed-by: Felix Dörre <felix@dogcraft.de>
Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Co-authored-by: Rich Ercolani <rincebrain@gmail.com>
Closes #10058
Closes #12918
2022-06-09 01:55:57 +03:00
|
|
|
.Sy sha512 Ns | Ns Sy skein Ns | Ns Sy edonr Ns | Ns Sy blake3
|
2019-11-12 22:17:40 +03:00
|
|
|
.Xc
|
|
|
|
Controls the checksum used to verify data integrity.
|
|
|
|
The default value is
|
|
|
|
.Sy on ,
|
|
|
|
which automatically selects an appropriate algorithm
|
|
|
|
.Po currently,
|
|
|
|
.Sy fletcher4 ,
|
|
|
|
but this may change in future releases
|
|
|
|
.Pc .
|
|
|
|
The value
|
|
|
|
.Sy off
|
|
|
|
disables integrity checking on user data.
|
|
|
|
The value
|
|
|
|
.Sy noparity
|
|
|
|
not only disables integrity but also disables maintaining parity for user data.
|
|
|
|
This setting is used internally by a dump device residing on a RAID-Z pool and
|
|
|
|
should not be used by any other dataset.
|
|
|
|
Disabling checksums is
|
2021-05-27 03:46:40 +03:00
|
|
|
.Em NOT
|
2019-11-12 22:17:40 +03:00
|
|
|
a recommended practice.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Sy sha512 ,
|
|
|
|
.Sy skein ,
|
Introduce BLAKE3 checksums as an OpenZFS feature
This commit adds BLAKE3 checksums to OpenZFS, it has similar
performance to Edon-R, but without the caveats around the latter.
Homepage of BLAKE3: https://github.com/BLAKE3-team/BLAKE3
Wikipedia: https://en.wikipedia.org/wiki/BLAKE_(hash_function)#BLAKE3
Short description of Wikipedia:
BLAKE3 is a cryptographic hash function based on Bao and BLAKE2,
created by Jack O'Connor, Jean-Philippe Aumasson, Samuel Neves, and
Zooko Wilcox-O'Hearn. It was announced on January 9, 2020, at Real
World Crypto. BLAKE3 is a single algorithm with many desirable
features (parallelism, XOF, KDF, PRF and MAC), in contrast to BLAKE
and BLAKE2, which are algorithm families with multiple variants.
BLAKE3 has a binary tree structure, so it supports a practically
unlimited degree of parallelism (both SIMD and multithreading) given
enough input. The official Rust and C implementations are
dual-licensed as public domain (CC0) and the Apache License.
Along with adding the BLAKE3 hash into the OpenZFS infrastructure a
new benchmarking file called chksum_bench was introduced. When read
it reports the speed of the available checksum functions.
On Linux: cat /proc/spl/kstat/zfs/chksum_bench
On FreeBSD: sysctl kstat.zfs.misc.chksum_bench
This is an example output of an i3-1005G1 test system with Debian 11:
implementation 1k 4k 16k 64k 256k 1m 4m
edonr-generic 1196 1602 1761 1749 1762 1759 1751
skein-generic 546 591 608 615 619 612 616
sha256-generic 240 300 316 314 304 285 276
sha512-generic 353 441 467 476 472 467 426
blake3-generic 308 313 313 313 312 313 312
blake3-sse2 402 1289 1423 1446 1432 1458 1413
blake3-sse41 427 1470 1625 1704 1679 1607 1629
blake3-avx2 428 1920 3095 3343 3356 3318 3204
blake3-avx512 473 2687 4905 5836 5844 5643 5374
Output on Debian 5.10.0-10-amd64 system: (Ryzen 7 5800X)
implementation 1k 4k 16k 64k 256k 1m 4m
edonr-generic 1840 2458 2665 2719 2711 2723 2693
skein-generic 870 966 996 992 1003 1005 1009
sha256-generic 415 442 453 455 457 457 457
sha512-generic 608 690 711 718 719 720 721
blake3-generic 301 313 311 309 309 310 310
blake3-sse2 343 1865 2124 2188 2180 2181 2186
blake3-sse41 364 2091 2396 2509 2463 2482 2488
blake3-avx2 365 2590 4399 4971 4915 4802 4764
Output on Debian 5.10.0-9-powerpc64le system: (POWER 9)
implementation 1k 4k 16k 64k 256k 1m 4m
edonr-generic 1213 1703 1889 1918 1957 1902 1907
skein-generic 434 492 520 522 511 525 525
sha256-generic 167 183 187 188 188 187 188
sha512-generic 186 216 222 221 225 224 224
blake3-generic 153 152 154 153 151 153 153
blake3-sse2 391 1170 1366 1406 1428 1426 1414
blake3-sse41 352 1049 1212 1174 1262 1258 1259
Output on Debian 5.10.0-11-arm64 system: (Pi400)
implementation 1k 4k 16k 64k 256k 1m 4m
edonr-generic 487 603 629 639 643 641 641
skein-generic 271 299 303 308 309 309 307
sha256-generic 117 127 128 130 130 129 130
sha512-generic 145 165 170 172 173 174 175
blake3-generic 81 29 71 89 89 89 89
blake3-sse2 112 323 368 379 380 371 374
blake3-sse41 101 315 357 368 369 364 360
Structurally, the new code is mainly split into these parts:
- 1x cross platform generic c variant: blake3_generic.c
- 4x assembly for X86-64 (SSE2, SSE4.1, AVX2, AVX512)
- 2x assembly for ARMv8 (NEON converted from SSE2)
- 2x assembly for PPC64-LE (POWER8 converted from SSE2)
- one file for switching between the implementations
Note the PPC64 assembly requires the VSX instruction set and the
kfpu_begin() / kfpu_end() calls on PowerPC were updated accordingly.
Reviewed-by: Felix Dörre <felix@dogcraft.de>
Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Co-authored-by: Rich Ercolani <rincebrain@gmail.com>
Closes #10058
Closes #12918
2022-06-09 01:55:57 +03:00
|
|
|
.Sy edonr ,
|
2019-11-12 22:17:40 +03:00
|
|
|
and
|
Introduce BLAKE3 checksums as an OpenZFS feature
This commit adds BLAKE3 checksums to OpenZFS, it has similar
performance to Edon-R, but without the caveats around the latter.
Homepage of BLAKE3: https://github.com/BLAKE3-team/BLAKE3
Wikipedia: https://en.wikipedia.org/wiki/BLAKE_(hash_function)#BLAKE3
Short description of Wikipedia:
BLAKE3 is a cryptographic hash function based on Bao and BLAKE2,
created by Jack O'Connor, Jean-Philippe Aumasson, Samuel Neves, and
Zooko Wilcox-O'Hearn. It was announced on January 9, 2020, at Real
World Crypto. BLAKE3 is a single algorithm with many desirable
features (parallelism, XOF, KDF, PRF and MAC), in contrast to BLAKE
and BLAKE2, which are algorithm families with multiple variants.
BLAKE3 has a binary tree structure, so it supports a practically
unlimited degree of parallelism (both SIMD and multithreading) given
enough input. The official Rust and C implementations are
dual-licensed as public domain (CC0) and the Apache License.
Along with adding the BLAKE3 hash into the OpenZFS infrastructure a
new benchmarking file called chksum_bench was introduced. When read
it reports the speed of the available checksum functions.
On Linux: cat /proc/spl/kstat/zfs/chksum_bench
On FreeBSD: sysctl kstat.zfs.misc.chksum_bench
This is an example output of an i3-1005G1 test system with Debian 11:
implementation 1k 4k 16k 64k 256k 1m 4m
edonr-generic 1196 1602 1761 1749 1762 1759 1751
skein-generic 546 591 608 615 619 612 616
sha256-generic 240 300 316 314 304 285 276
sha512-generic 353 441 467 476 472 467 426
blake3-generic 308 313 313 313 312 313 312
blake3-sse2 402 1289 1423 1446 1432 1458 1413
blake3-sse41 427 1470 1625 1704 1679 1607 1629
blake3-avx2 428 1920 3095 3343 3356 3318 3204
blake3-avx512 473 2687 4905 5836 5844 5643 5374
Output on Debian 5.10.0-10-amd64 system: (Ryzen 7 5800X)
implementation 1k 4k 16k 64k 256k 1m 4m
edonr-generic 1840 2458 2665 2719 2711 2723 2693
skein-generic 870 966 996 992 1003 1005 1009
sha256-generic 415 442 453 455 457 457 457
sha512-generic 608 690 711 718 719 720 721
blake3-generic 301 313 311 309 309 310 310
blake3-sse2 343 1865 2124 2188 2180 2181 2186
blake3-sse41 364 2091 2396 2509 2463 2482 2488
blake3-avx2 365 2590 4399 4971 4915 4802 4764
Output on Debian 5.10.0-9-powerpc64le system: (POWER 9)
implementation 1k 4k 16k 64k 256k 1m 4m
edonr-generic 1213 1703 1889 1918 1957 1902 1907
skein-generic 434 492 520 522 511 525 525
sha256-generic 167 183 187 188 188 187 188
sha512-generic 186 216 222 221 225 224 224
blake3-generic 153 152 154 153 151 153 153
blake3-sse2 391 1170 1366 1406 1428 1426 1414
blake3-sse41 352 1049 1212 1174 1262 1258 1259
Output on Debian 5.10.0-11-arm64 system: (Pi400)
implementation 1k 4k 16k 64k 256k 1m 4m
edonr-generic 487 603 629 639 643 641 641
skein-generic 271 299 303 308 309 309 307
sha256-generic 117 127 128 130 130 129 130
sha512-generic 145 165 170 172 173 174 175
blake3-generic 81 29 71 89 89 89 89
blake3-sse2 112 323 368 379 380 371 374
blake3-sse41 101 315 357 368 369 364 360
Structurally, the new code is mainly split into these parts:
- 1x cross platform generic c variant: blake3_generic.c
- 4x assembly for X86-64 (SSE2, SSE4.1, AVX2, AVX512)
- 2x assembly for ARMv8 (NEON converted from SSE2)
- 2x assembly for PPC64-LE (POWER8 converted from SSE2)
- one file for switching between the implementations
Note the PPC64 assembly requires the VSX instruction set and the
kfpu_begin() / kfpu_end() calls on PowerPC were updated accordingly.
Reviewed-by: Felix Dörre <felix@dogcraft.de>
Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Co-authored-by: Rich Ercolani <rincebrain@gmail.com>
Closes #10058
Closes #12918
2022-06-09 01:55:57 +03:00
|
|
|
.Sy blake3
|
2019-11-12 22:17:40 +03:00
|
|
|
checksum algorithms require enabling the appropriate features on the pool.
|
|
|
|
.Pp
|
|
|
|
Please see
|
2021-06-04 23:29:26 +03:00
|
|
|
.Xr zpool-features 7
|
2019-11-12 22:17:40 +03:00
|
|
|
for more information on these algorithms.
|
|
|
|
.Pp
|
|
|
|
Changing this property affects only newly-written data.
|
|
|
|
.It Xo
|
|
|
|
.Sy compression Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy gzip Ns | Ns
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy gzip- Ns Ar N Ns | Ns Sy lz4 Ns | Ns Sy lzjb Ns | Ns Sy zle Ns | Ns Sy zstd Ns | Ns
|
|
|
|
.Sy zstd- Ns Ar N Ns | Ns Sy zstd-fast Ns | Ns Sy zstd-fast- Ns Ar N
|
2019-11-12 22:17:40 +03:00
|
|
|
.Xc
|
|
|
|
Controls the compression algorithm used for this dataset.
|
|
|
|
.Pp
|
2022-03-03 21:43:38 +03:00
|
|
|
When set to
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy on
|
2022-11-12 15:23:30 +03:00
|
|
|
(the default), indicates that the current default compression algorithm should
|
|
|
|
be used.
|
2019-11-12 22:17:40 +03:00
|
|
|
The default balances compression and decompression speed, with compression ratio
|
|
|
|
and is expected to work well on a wide variety of workloads.
|
|
|
|
Unlike all other settings for this property,
|
|
|
|
.Sy on
|
|
|
|
does not select a fixed compression type.
|
|
|
|
As new compression algorithms are added to ZFS and enabled on a pool, the
|
|
|
|
default compression algorithm may change.
|
|
|
|
The current default compression algorithm is either
|
|
|
|
.Sy lzjb
|
|
|
|
or, if the
|
|
|
|
.Sy lz4_compress
|
|
|
|
feature is enabled,
|
|
|
|
.Sy lz4 .
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Sy lz4
|
|
|
|
compression algorithm is a high-performance replacement for the
|
|
|
|
.Sy lzjb
|
|
|
|
algorithm.
|
|
|
|
It features significantly faster compression and decompression, as well as a
|
|
|
|
moderately higher compression ratio than
|
|
|
|
.Sy lzjb ,
|
|
|
|
but can only be used on pools with the
|
|
|
|
.Sy lz4_compress
|
|
|
|
feature set to
|
|
|
|
.Sy enabled .
|
|
|
|
See
|
2021-06-04 23:29:26 +03:00
|
|
|
.Xr zpool-features 7
|
2019-11-12 22:17:40 +03:00
|
|
|
for details on ZFS feature flags and the
|
|
|
|
.Sy lz4_compress
|
|
|
|
feature.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Sy lzjb
|
|
|
|
compression algorithm is optimized for performance while providing decent data
|
|
|
|
compression.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Sy gzip
|
|
|
|
compression algorithm uses the same compression as the
|
|
|
|
.Xr gzip 1
|
|
|
|
command.
|
|
|
|
You can specify the
|
|
|
|
.Sy gzip
|
|
|
|
level by using the value
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy gzip- Ns Ar N ,
|
2019-11-12 22:17:40 +03:00
|
|
|
where
|
2021-05-27 03:46:40 +03:00
|
|
|
.Ar N
|
2019-11-12 22:17:40 +03:00
|
|
|
is an integer from 1
|
|
|
|
.Pq fastest
|
|
|
|
to 9
|
|
|
|
.Pq best compression ratio .
|
|
|
|
Currently,
|
|
|
|
.Sy gzip
|
|
|
|
is equivalent to
|
|
|
|
.Sy gzip-6
|
|
|
|
.Po which is also the default for
|
|
|
|
.Xr gzip 1
|
|
|
|
.Pc .
|
|
|
|
.Pp
|
|
|
|
The
|
Add zstd support to zfs
This PR adds two new compression types, based on ZStandard:
- zstd: A basic ZStandard compression algorithm Available compression.
Levels for zstd are zstd-1 through zstd-19, where the compression
increases with every level, but speed decreases.
- zstd-fast: A faster version of the ZStandard compression algorithm
zstd-fast is basically a "negative" level of zstd. The compression
decreases with every level, but speed increases.
Available compression levels for zstd-fast:
- zstd-fast-1 through zstd-fast-10
- zstd-fast-20 through zstd-fast-100 (in increments of 10)
- zstd-fast-500 and zstd-fast-1000
For more information check the man page.
Implementation details:
Rather than treat each level of zstd as a different algorithm (as was
done historically with gzip), the block pointer `enum zio_compress`
value is simply zstd for all levels, including zstd-fast, since they all
use the same decompression function.
The compress= property (a 64bit unsigned integer) uses the lower 7 bits
to store the compression algorithm (matching the number of bits used in
a block pointer, as the 8th bit was borrowed for embedded block
pointers). The upper bits are used to store the compression level.
It is necessary to be able to determine what compression level was used
when later reading a block back, so the concept used in LZ4, where the
first 32bits of the on-disk value are the size of the compressed data
(since the allocation is rounded up to the nearest ashift), was
extended, and we store the version of ZSTD and the level as well as the
compressed size. This value is returned when decompressing a block, so
that if the block needs to be recompressed (L2ARC, nop-write, etc), that
the same parameters will be used to result in the matching checksum.
All of the internal ZFS code ( `arc_buf_hdr_t`, `objset_t`,
`zio_prop_t`, etc.) uses the separated _compress and _complevel
variables. Only the properties ZAP contains the combined/bit-shifted
value. The combined value is split when the compression_changed_cb()
callback is called, and sets both objset members (os_compress and
os_complevel).
The userspace tools all use the combined/bit-shifted value.
Additional notes:
zdb can now also decode the ZSTD compression header (flag -Z) and
inspect the size, version and compression level saved in that header.
For each record, if it is ZSTD compressed, the parameters of the decoded
compression header get printed.
ZSTD is included with all current tests and new tests are added
as-needed.
Per-dataset feature flags now get activated when the property is set.
If a compression algorithm requires a feature flag, zfs activates the
feature when the property is set, rather than waiting for the first
block to be born. This is currently only used by zstd but can be
extended as needed.
Portions-Sponsored-By: The FreeBSD Foundation
Co-authored-by: Allan Jude <allanjude@freebsd.org>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Co-authored-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Co-authored-by: Michael Niewöhner <foss@mniewoehner.de>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Signed-off-by: Allan Jude <allanjude@freebsd.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes #6247
Closes #9024
Closes #10277
Closes #10278
2020-08-18 20:10:17 +03:00
|
|
|
.Sy zstd
|
2022-11-12 15:23:30 +03:00
|
|
|
compression algorithm provides both high compression ratios and good
|
|
|
|
performance.
|
2021-05-27 03:46:40 +03:00
|
|
|
You can specify the
|
Add zstd support to zfs
This PR adds two new compression types, based on ZStandard:
- zstd: A basic ZStandard compression algorithm Available compression.
Levels for zstd are zstd-1 through zstd-19, where the compression
increases with every level, but speed decreases.
- zstd-fast: A faster version of the ZStandard compression algorithm
zstd-fast is basically a "negative" level of zstd. The compression
decreases with every level, but speed increases.
Available compression levels for zstd-fast:
- zstd-fast-1 through zstd-fast-10
- zstd-fast-20 through zstd-fast-100 (in increments of 10)
- zstd-fast-500 and zstd-fast-1000
For more information check the man page.
Implementation details:
Rather than treat each level of zstd as a different algorithm (as was
done historically with gzip), the block pointer `enum zio_compress`
value is simply zstd for all levels, including zstd-fast, since they all
use the same decompression function.
The compress= property (a 64bit unsigned integer) uses the lower 7 bits
to store the compression algorithm (matching the number of bits used in
a block pointer, as the 8th bit was borrowed for embedded block
pointers). The upper bits are used to store the compression level.
It is necessary to be able to determine what compression level was used
when later reading a block back, so the concept used in LZ4, where the
first 32bits of the on-disk value are the size of the compressed data
(since the allocation is rounded up to the nearest ashift), was
extended, and we store the version of ZSTD and the level as well as the
compressed size. This value is returned when decompressing a block, so
that if the block needs to be recompressed (L2ARC, nop-write, etc), that
the same parameters will be used to result in the matching checksum.
All of the internal ZFS code ( `arc_buf_hdr_t`, `objset_t`,
`zio_prop_t`, etc.) uses the separated _compress and _complevel
variables. Only the properties ZAP contains the combined/bit-shifted
value. The combined value is split when the compression_changed_cb()
callback is called, and sets both objset members (os_compress and
os_complevel).
The userspace tools all use the combined/bit-shifted value.
Additional notes:
zdb can now also decode the ZSTD compression header (flag -Z) and
inspect the size, version and compression level saved in that header.
For each record, if it is ZSTD compressed, the parameters of the decoded
compression header get printed.
ZSTD is included with all current tests and new tests are added
as-needed.
Per-dataset feature flags now get activated when the property is set.
If a compression algorithm requires a feature flag, zfs activates the
feature when the property is set, rather than waiting for the first
block to be born. This is currently only used by zstd but can be
extended as needed.
Portions-Sponsored-By: The FreeBSD Foundation
Co-authored-by: Allan Jude <allanjude@freebsd.org>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Co-authored-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Co-authored-by: Michael Niewöhner <foss@mniewoehner.de>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Signed-off-by: Allan Jude <allanjude@freebsd.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes #6247
Closes #9024
Closes #10277
Closes #10278
2020-08-18 20:10:17 +03:00
|
|
|
.Sy zstd
|
|
|
|
level by using the value
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy zstd- Ns Ar N ,
|
Add zstd support to zfs
This PR adds two new compression types, based on ZStandard:
- zstd: A basic ZStandard compression algorithm Available compression.
Levels for zstd are zstd-1 through zstd-19, where the compression
increases with every level, but speed decreases.
- zstd-fast: A faster version of the ZStandard compression algorithm
zstd-fast is basically a "negative" level of zstd. The compression
decreases with every level, but speed increases.
Available compression levels for zstd-fast:
- zstd-fast-1 through zstd-fast-10
- zstd-fast-20 through zstd-fast-100 (in increments of 10)
- zstd-fast-500 and zstd-fast-1000
For more information check the man page.
Implementation details:
Rather than treat each level of zstd as a different algorithm (as was
done historically with gzip), the block pointer `enum zio_compress`
value is simply zstd for all levels, including zstd-fast, since they all
use the same decompression function.
The compress= property (a 64bit unsigned integer) uses the lower 7 bits
to store the compression algorithm (matching the number of bits used in
a block pointer, as the 8th bit was borrowed for embedded block
pointers). The upper bits are used to store the compression level.
It is necessary to be able to determine what compression level was used
when later reading a block back, so the concept used in LZ4, where the
first 32bits of the on-disk value are the size of the compressed data
(since the allocation is rounded up to the nearest ashift), was
extended, and we store the version of ZSTD and the level as well as the
compressed size. This value is returned when decompressing a block, so
that if the block needs to be recompressed (L2ARC, nop-write, etc), that
the same parameters will be used to result in the matching checksum.
All of the internal ZFS code ( `arc_buf_hdr_t`, `objset_t`,
`zio_prop_t`, etc.) uses the separated _compress and _complevel
variables. Only the properties ZAP contains the combined/bit-shifted
value. The combined value is split when the compression_changed_cb()
callback is called, and sets both objset members (os_compress and
os_complevel).
The userspace tools all use the combined/bit-shifted value.
Additional notes:
zdb can now also decode the ZSTD compression header (flag -Z) and
inspect the size, version and compression level saved in that header.
For each record, if it is ZSTD compressed, the parameters of the decoded
compression header get printed.
ZSTD is included with all current tests and new tests are added
as-needed.
Per-dataset feature flags now get activated when the property is set.
If a compression algorithm requires a feature flag, zfs activates the
feature when the property is set, rather than waiting for the first
block to be born. This is currently only used by zstd but can be
extended as needed.
Portions-Sponsored-By: The FreeBSD Foundation
Co-authored-by: Allan Jude <allanjude@freebsd.org>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Co-authored-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Co-authored-by: Michael Niewöhner <foss@mniewoehner.de>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Signed-off-by: Allan Jude <allanjude@freebsd.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes #6247
Closes #9024
Closes #10277
Closes #10278
2020-08-18 20:10:17 +03:00
|
|
|
where
|
2021-05-27 03:46:40 +03:00
|
|
|
.Ar N
|
Add zstd support to zfs
This PR adds two new compression types, based on ZStandard:
- zstd: A basic ZStandard compression algorithm Available compression.
Levels for zstd are zstd-1 through zstd-19, where the compression
increases with every level, but speed decreases.
- zstd-fast: A faster version of the ZStandard compression algorithm
zstd-fast is basically a "negative" level of zstd. The compression
decreases with every level, but speed increases.
Available compression levels for zstd-fast:
- zstd-fast-1 through zstd-fast-10
- zstd-fast-20 through zstd-fast-100 (in increments of 10)
- zstd-fast-500 and zstd-fast-1000
For more information check the man page.
Implementation details:
Rather than treat each level of zstd as a different algorithm (as was
done historically with gzip), the block pointer `enum zio_compress`
value is simply zstd for all levels, including zstd-fast, since they all
use the same decompression function.
The compress= property (a 64bit unsigned integer) uses the lower 7 bits
to store the compression algorithm (matching the number of bits used in
a block pointer, as the 8th bit was borrowed for embedded block
pointers). The upper bits are used to store the compression level.
It is necessary to be able to determine what compression level was used
when later reading a block back, so the concept used in LZ4, where the
first 32bits of the on-disk value are the size of the compressed data
(since the allocation is rounded up to the nearest ashift), was
extended, and we store the version of ZSTD and the level as well as the
compressed size. This value is returned when decompressing a block, so
that if the block needs to be recompressed (L2ARC, nop-write, etc), that
the same parameters will be used to result in the matching checksum.
All of the internal ZFS code ( `arc_buf_hdr_t`, `objset_t`,
`zio_prop_t`, etc.) uses the separated _compress and _complevel
variables. Only the properties ZAP contains the combined/bit-shifted
value. The combined value is split when the compression_changed_cb()
callback is called, and sets both objset members (os_compress and
os_complevel).
The userspace tools all use the combined/bit-shifted value.
Additional notes:
zdb can now also decode the ZSTD compression header (flag -Z) and
inspect the size, version and compression level saved in that header.
For each record, if it is ZSTD compressed, the parameters of the decoded
compression header get printed.
ZSTD is included with all current tests and new tests are added
as-needed.
Per-dataset feature flags now get activated when the property is set.
If a compression algorithm requires a feature flag, zfs activates the
feature when the property is set, rather than waiting for the first
block to be born. This is currently only used by zstd but can be
extended as needed.
Portions-Sponsored-By: The FreeBSD Foundation
Co-authored-by: Allan Jude <allanjude@freebsd.org>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Co-authored-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Co-authored-by: Michael Niewöhner <foss@mniewoehner.de>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Signed-off-by: Allan Jude <allanjude@freebsd.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes #6247
Closes #9024
Closes #10277
Closes #10278
2020-08-18 20:10:17 +03:00
|
|
|
is an integer from 1
|
|
|
|
.Pq fastest
|
|
|
|
to 19
|
|
|
|
.Pq best compression ratio .
|
|
|
|
.Sy zstd
|
|
|
|
is equivalent to
|
|
|
|
.Sy zstd-3 .
|
|
|
|
.Pp
|
|
|
|
Faster speeds at the cost of the compression ratio can be requested by
|
|
|
|
setting a negative
|
|
|
|
.Sy zstd
|
2021-05-27 03:46:40 +03:00
|
|
|
level.
|
|
|
|
This is done using
|
|
|
|
.Sy zstd-fast- Ns Ar N ,
|
Add zstd support to zfs
This PR adds two new compression types, based on ZStandard:
- zstd: A basic ZStandard compression algorithm Available compression.
Levels for zstd are zstd-1 through zstd-19, where the compression
increases with every level, but speed decreases.
- zstd-fast: A faster version of the ZStandard compression algorithm
zstd-fast is basically a "negative" level of zstd. The compression
decreases with every level, but speed increases.
Available compression levels for zstd-fast:
- zstd-fast-1 through zstd-fast-10
- zstd-fast-20 through zstd-fast-100 (in increments of 10)
- zstd-fast-500 and zstd-fast-1000
For more information check the man page.
Implementation details:
Rather than treat each level of zstd as a different algorithm (as was
done historically with gzip), the block pointer `enum zio_compress`
value is simply zstd for all levels, including zstd-fast, since they all
use the same decompression function.
The compress= property (a 64bit unsigned integer) uses the lower 7 bits
to store the compression algorithm (matching the number of bits used in
a block pointer, as the 8th bit was borrowed for embedded block
pointers). The upper bits are used to store the compression level.
It is necessary to be able to determine what compression level was used
when later reading a block back, so the concept used in LZ4, where the
first 32bits of the on-disk value are the size of the compressed data
(since the allocation is rounded up to the nearest ashift), was
extended, and we store the version of ZSTD and the level as well as the
compressed size. This value is returned when decompressing a block, so
that if the block needs to be recompressed (L2ARC, nop-write, etc), that
the same parameters will be used to result in the matching checksum.
All of the internal ZFS code ( `arc_buf_hdr_t`, `objset_t`,
`zio_prop_t`, etc.) uses the separated _compress and _complevel
variables. Only the properties ZAP contains the combined/bit-shifted
value. The combined value is split when the compression_changed_cb()
callback is called, and sets both objset members (os_compress and
os_complevel).
The userspace tools all use the combined/bit-shifted value.
Additional notes:
zdb can now also decode the ZSTD compression header (flag -Z) and
inspect the size, version and compression level saved in that header.
For each record, if it is ZSTD compressed, the parameters of the decoded
compression header get printed.
ZSTD is included with all current tests and new tests are added
as-needed.
Per-dataset feature flags now get activated when the property is set.
If a compression algorithm requires a feature flag, zfs activates the
feature when the property is set, rather than waiting for the first
block to be born. This is currently only used by zstd but can be
extended as needed.
Portions-Sponsored-By: The FreeBSD Foundation
Co-authored-by: Allan Jude <allanjude@freebsd.org>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Co-authored-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Co-authored-by: Michael Niewöhner <foss@mniewoehner.de>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Signed-off-by: Allan Jude <allanjude@freebsd.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes #6247
Closes #9024
Closes #10277
Closes #10278
2020-08-18 20:10:17 +03:00
|
|
|
where
|
2021-05-27 03:46:40 +03:00
|
|
|
.Ar N
|
2022-03-24 22:14:25 +03:00
|
|
|
is an integer in
|
|
|
|
.Bq Sy 1 Ns - Ns Sy 10 , 20 , 30 , No … , Sy 100 , 500 , 1000
|
|
|
|
which maps to a negative
|
Add zstd support to zfs
This PR adds two new compression types, based on ZStandard:
- zstd: A basic ZStandard compression algorithm Available compression.
Levels for zstd are zstd-1 through zstd-19, where the compression
increases with every level, but speed decreases.
- zstd-fast: A faster version of the ZStandard compression algorithm
zstd-fast is basically a "negative" level of zstd. The compression
decreases with every level, but speed increases.
Available compression levels for zstd-fast:
- zstd-fast-1 through zstd-fast-10
- zstd-fast-20 through zstd-fast-100 (in increments of 10)
- zstd-fast-500 and zstd-fast-1000
For more information check the man page.
Implementation details:
Rather than treat each level of zstd as a different algorithm (as was
done historically with gzip), the block pointer `enum zio_compress`
value is simply zstd for all levels, including zstd-fast, since they all
use the same decompression function.
The compress= property (a 64bit unsigned integer) uses the lower 7 bits
to store the compression algorithm (matching the number of bits used in
a block pointer, as the 8th bit was borrowed for embedded block
pointers). The upper bits are used to store the compression level.
It is necessary to be able to determine what compression level was used
when later reading a block back, so the concept used in LZ4, where the
first 32bits of the on-disk value are the size of the compressed data
(since the allocation is rounded up to the nearest ashift), was
extended, and we store the version of ZSTD and the level as well as the
compressed size. This value is returned when decompressing a block, so
that if the block needs to be recompressed (L2ARC, nop-write, etc), that
the same parameters will be used to result in the matching checksum.
All of the internal ZFS code ( `arc_buf_hdr_t`, `objset_t`,
`zio_prop_t`, etc.) uses the separated _compress and _complevel
variables. Only the properties ZAP contains the combined/bit-shifted
value. The combined value is split when the compression_changed_cb()
callback is called, and sets both objset members (os_compress and
os_complevel).
The userspace tools all use the combined/bit-shifted value.
Additional notes:
zdb can now also decode the ZSTD compression header (flag -Z) and
inspect the size, version and compression level saved in that header.
For each record, if it is ZSTD compressed, the parameters of the decoded
compression header get printed.
ZSTD is included with all current tests and new tests are added
as-needed.
Per-dataset feature flags now get activated when the property is set.
If a compression algorithm requires a feature flag, zfs activates the
feature when the property is set, rather than waiting for the first
block to be born. This is currently only used by zstd but can be
extended as needed.
Portions-Sponsored-By: The FreeBSD Foundation
Co-authored-by: Allan Jude <allanjude@freebsd.org>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Co-authored-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Co-authored-by: Michael Niewöhner <foss@mniewoehner.de>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Signed-off-by: Allan Jude <allanjude@freebsd.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes #6247
Closes #9024
Closes #10277
Closes #10278
2020-08-18 20:10:17 +03:00
|
|
|
.Sy zstd
|
2021-05-27 03:46:40 +03:00
|
|
|
level.
|
2022-03-24 22:14:25 +03:00
|
|
|
The lower the level the faster the compression \(em
|
|
|
|
.Sy 1000
|
|
|
|
provides the fastest compression and lowest compression ratio.
|
Add zstd support to zfs
This PR adds two new compression types, based on ZStandard:
- zstd: A basic ZStandard compression algorithm Available compression.
Levels for zstd are zstd-1 through zstd-19, where the compression
increases with every level, but speed decreases.
- zstd-fast: A faster version of the ZStandard compression algorithm
zstd-fast is basically a "negative" level of zstd. The compression
decreases with every level, but speed increases.
Available compression levels for zstd-fast:
- zstd-fast-1 through zstd-fast-10
- zstd-fast-20 through zstd-fast-100 (in increments of 10)
- zstd-fast-500 and zstd-fast-1000
For more information check the man page.
Implementation details:
Rather than treat each level of zstd as a different algorithm (as was
done historically with gzip), the block pointer `enum zio_compress`
value is simply zstd for all levels, including zstd-fast, since they all
use the same decompression function.
The compress= property (a 64bit unsigned integer) uses the lower 7 bits
to store the compression algorithm (matching the number of bits used in
a block pointer, as the 8th bit was borrowed for embedded block
pointers). The upper bits are used to store the compression level.
It is necessary to be able to determine what compression level was used
when later reading a block back, so the concept used in LZ4, where the
first 32bits of the on-disk value are the size of the compressed data
(since the allocation is rounded up to the nearest ashift), was
extended, and we store the version of ZSTD and the level as well as the
compressed size. This value is returned when decompressing a block, so
that if the block needs to be recompressed (L2ARC, nop-write, etc), that
the same parameters will be used to result in the matching checksum.
All of the internal ZFS code ( `arc_buf_hdr_t`, `objset_t`,
`zio_prop_t`, etc.) uses the separated _compress and _complevel
variables. Only the properties ZAP contains the combined/bit-shifted
value. The combined value is split when the compression_changed_cb()
callback is called, and sets both objset members (os_compress and
os_complevel).
The userspace tools all use the combined/bit-shifted value.
Additional notes:
zdb can now also decode the ZSTD compression header (flag -Z) and
inspect the size, version and compression level saved in that header.
For each record, if it is ZSTD compressed, the parameters of the decoded
compression header get printed.
ZSTD is included with all current tests and new tests are added
as-needed.
Per-dataset feature flags now get activated when the property is set.
If a compression algorithm requires a feature flag, zfs activates the
feature when the property is set, rather than waiting for the first
block to be born. This is currently only used by zstd but can be
extended as needed.
Portions-Sponsored-By: The FreeBSD Foundation
Co-authored-by: Allan Jude <allanjude@freebsd.org>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Co-authored-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Co-authored-by: Michael Niewöhner <foss@mniewoehner.de>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Signed-off-by: Allan Jude <allanjude@freebsd.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes #6247
Closes #9024
Closes #10277
Closes #10278
2020-08-18 20:10:17 +03:00
|
|
|
.Sy zstd-fast
|
|
|
|
is equivalent to
|
2022-03-24 22:14:25 +03:00
|
|
|
.Sy zstd-fast- Ns Ar 1 .
|
Add zstd support to zfs
This PR adds two new compression types, based on ZStandard:
- zstd: A basic ZStandard compression algorithm Available compression.
Levels for zstd are zstd-1 through zstd-19, where the compression
increases with every level, but speed decreases.
- zstd-fast: A faster version of the ZStandard compression algorithm
zstd-fast is basically a "negative" level of zstd. The compression
decreases with every level, but speed increases.
Available compression levels for zstd-fast:
- zstd-fast-1 through zstd-fast-10
- zstd-fast-20 through zstd-fast-100 (in increments of 10)
- zstd-fast-500 and zstd-fast-1000
For more information check the man page.
Implementation details:
Rather than treat each level of zstd as a different algorithm (as was
done historically with gzip), the block pointer `enum zio_compress`
value is simply zstd for all levels, including zstd-fast, since they all
use the same decompression function.
The compress= property (a 64bit unsigned integer) uses the lower 7 bits
to store the compression algorithm (matching the number of bits used in
a block pointer, as the 8th bit was borrowed for embedded block
pointers). The upper bits are used to store the compression level.
It is necessary to be able to determine what compression level was used
when later reading a block back, so the concept used in LZ4, where the
first 32bits of the on-disk value are the size of the compressed data
(since the allocation is rounded up to the nearest ashift), was
extended, and we store the version of ZSTD and the level as well as the
compressed size. This value is returned when decompressing a block, so
that if the block needs to be recompressed (L2ARC, nop-write, etc), that
the same parameters will be used to result in the matching checksum.
All of the internal ZFS code ( `arc_buf_hdr_t`, `objset_t`,
`zio_prop_t`, etc.) uses the separated _compress and _complevel
variables. Only the properties ZAP contains the combined/bit-shifted
value. The combined value is split when the compression_changed_cb()
callback is called, and sets both objset members (os_compress and
os_complevel).
The userspace tools all use the combined/bit-shifted value.
Additional notes:
zdb can now also decode the ZSTD compression header (flag -Z) and
inspect the size, version and compression level saved in that header.
For each record, if it is ZSTD compressed, the parameters of the decoded
compression header get printed.
ZSTD is included with all current tests and new tests are added
as-needed.
Per-dataset feature flags now get activated when the property is set.
If a compression algorithm requires a feature flag, zfs activates the
feature when the property is set, rather than waiting for the first
block to be born. This is currently only used by zstd but can be
extended as needed.
Portions-Sponsored-By: The FreeBSD Foundation
Co-authored-by: Allan Jude <allanjude@freebsd.org>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Co-authored-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Co-authored-by: Michael Niewöhner <foss@mniewoehner.de>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Signed-off-by: Allan Jude <allanjude@freebsd.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes #6247
Closes #9024
Closes #10277
Closes #10278
2020-08-18 20:10:17 +03:00
|
|
|
.Pp
|
|
|
|
The
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy zle
|
|
|
|
compression algorithm compresses runs of zeros.
|
|
|
|
.Pp
|
|
|
|
This property can also be referred to by its shortened column name
|
|
|
|
.Sy compress .
|
|
|
|
Changing this property affects only newly-written data.
|
|
|
|
.Pp
|
|
|
|
When any setting except
|
|
|
|
.Sy off
|
|
|
|
is selected, compression will explicitly check for blocks consisting of only
|
2021-05-27 03:46:40 +03:00
|
|
|
zeroes (the NUL byte).
|
|
|
|
When a zero-filled block is detected, it is stored as
|
2019-11-12 22:17:40 +03:00
|
|
|
a hole and not compressed using the indicated compression algorithm.
|
|
|
|
.Pp
|
2019-09-10 23:34:53 +03:00
|
|
|
All blocks are allocated as a whole number of sectors
|
|
|
|
.Pq chunks of 2^ Ns Sy ashift No bytes , e.g . Sy 512B No or Sy 4KB .
|
|
|
|
Compression may result in a non-sector-aligned size, which will be rounded up
|
|
|
|
to a whole number of sectors.
|
|
|
|
If compression saves less than one whole sector,
|
|
|
|
the block will be stored uncompressed.
|
|
|
|
Therefore, blocks whose logical size is a small number of sectors will
|
|
|
|
experience less compression
|
|
|
|
(e.g. for
|
|
|
|
.Sy recordsize Ns = Ns Sy 16K
|
|
|
|
with
|
|
|
|
.Sy 4K
|
|
|
|
sectors, which have 4 sectors per block,
|
|
|
|
compression needs to save at least 25% to actually save space on disk).
|
|
|
|
.Pp
|
|
|
|
There is
|
|
|
|
.Sy 12.5%
|
|
|
|
default compression threshold in addition to sector rounding.
|
2019-11-12 22:17:40 +03:00
|
|
|
.It Xo
|
|
|
|
.Sy context Ns = Ns Sy none Ns | Ns
|
2022-01-06 22:00:01 +03:00
|
|
|
.Ar SELinux-User : Ns Ar SELinux-Role : Ns Ar SELinux-Type : Ns Ar Sensitivity-Level
|
2019-11-12 22:17:40 +03:00
|
|
|
.Xc
|
|
|
|
This flag sets the SELinux context for all files in the file system under
|
2021-05-27 03:46:40 +03:00
|
|
|
a mount point for that file system.
|
|
|
|
See
|
2019-11-12 22:17:40 +03:00
|
|
|
.Xr selinux 8
|
|
|
|
for more information.
|
|
|
|
.It Xo
|
|
|
|
.Sy fscontext Ns = Ns Sy none Ns | Ns
|
2022-01-06 22:00:01 +03:00
|
|
|
.Ar SELinux-User : Ns Ar SELinux-Role : Ns Ar SELinux-Type : Ns Ar Sensitivity-Level
|
2019-11-12 22:17:40 +03:00
|
|
|
.Xc
|
|
|
|
This flag sets the SELinux context for the file system file system being
|
2021-05-27 03:46:40 +03:00
|
|
|
mounted.
|
|
|
|
See
|
2019-11-12 22:17:40 +03:00
|
|
|
.Xr selinux 8
|
|
|
|
for more information.
|
|
|
|
.It Xo
|
|
|
|
.Sy defcontext Ns = Ns Sy none Ns | Ns
|
2022-01-06 22:00:01 +03:00
|
|
|
.Ar SELinux-User : Ns Ar SELinux-Role : Ns Ar SELinux-Type : Ns Ar Sensitivity-Level
|
2019-11-12 22:17:40 +03:00
|
|
|
.Xc
|
2021-05-27 03:46:40 +03:00
|
|
|
This flag sets the SELinux default context for unlabeled files.
|
|
|
|
See
|
2019-11-12 22:17:40 +03:00
|
|
|
.Xr selinux 8
|
|
|
|
for more information.
|
|
|
|
.It Xo
|
|
|
|
.Sy rootcontext Ns = Ns Sy none Ns | Ns
|
2022-01-06 22:00:01 +03:00
|
|
|
.Ar SELinux-User : Ns Ar SELinux-Role : Ns Ar SELinux-Type : Ns Ar Sensitivity-Level
|
2019-11-12 22:17:40 +03:00
|
|
|
.Xc
|
2021-05-27 03:46:40 +03:00
|
|
|
This flag sets the SELinux context for the root inode of the file system.
|
|
|
|
See
|
2019-11-12 22:17:40 +03:00
|
|
|
.Xr selinux 8
|
|
|
|
for more information.
|
|
|
|
.It Sy copies Ns = Ns Sy 1 Ns | Ns Sy 2 Ns | Ns Sy 3
|
|
|
|
Controls the number of copies of data stored for this dataset.
|
|
|
|
These copies are in addition to any redundancy provided by the pool, for
|
|
|
|
example, mirroring or RAID-Z.
|
|
|
|
The copies are stored on different disks, if possible.
|
|
|
|
The space used by multiple copies is charged to the associated file and dataset,
|
|
|
|
changing the
|
|
|
|
.Sy used
|
|
|
|
property and counting against quotas and reservations.
|
|
|
|
.Pp
|
|
|
|
Changing this property only affects newly-written data.
|
|
|
|
Therefore, set this property at file system creation time by using the
|
|
|
|
.Fl o Sy copies Ns = Ns Ar N
|
|
|
|
option.
|
|
|
|
.Pp
|
2021-05-27 03:46:40 +03:00
|
|
|
Remember that ZFS will not import a pool with a missing top-level vdev.
|
|
|
|
Do
|
|
|
|
.Em NOT
|
2019-11-12 22:17:40 +03:00
|
|
|
create, for example a two-disk striped pool and set
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy copies Ns = Ns Ar 2
|
|
|
|
on some datasets thinking you have setup redundancy for them.
|
|
|
|
When a disk fails you will not be able to import the pool
|
|
|
|
and will have lost all of your data.
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pp
|
|
|
|
Encrypted datasets may not have
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy copies Ns = Ns Ar 3
|
2019-11-12 22:17:40 +03:00
|
|
|
since the implementation stores some encryption metadata where the third copy
|
|
|
|
would normally be.
|
|
|
|
.It Sy devices Ns = Ns Sy on Ns | Ns Sy off
|
|
|
|
Controls whether device nodes can be opened on this file system.
|
|
|
|
The default value is
|
|
|
|
.Sy on .
|
|
|
|
The values
|
|
|
|
.Sy on
|
|
|
|
and
|
|
|
|
.Sy off
|
|
|
|
are equivalent to the
|
|
|
|
.Sy dev
|
|
|
|
and
|
|
|
|
.Sy nodev
|
|
|
|
mount options.
|
|
|
|
.It Xo
|
|
|
|
.Sy dedup Ns = Ns Sy off Ns | Ns Sy on Ns | Ns Sy verify Ns | Ns
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy sha256 Ns Oo , Ns Sy verify Oc Ns | Ns Sy sha512 Ns Oo , Ns Sy verify Oc Ns | Ns Sy skein Ns Oo , Ns Sy verify Oc Ns | Ns
|
Introduce BLAKE3 checksums as an OpenZFS feature
This commit adds BLAKE3 checksums to OpenZFS, it has similar
performance to Edon-R, but without the caveats around the latter.
Homepage of BLAKE3: https://github.com/BLAKE3-team/BLAKE3
Wikipedia: https://en.wikipedia.org/wiki/BLAKE_(hash_function)#BLAKE3
Short description of Wikipedia:
BLAKE3 is a cryptographic hash function based on Bao and BLAKE2,
created by Jack O'Connor, Jean-Philippe Aumasson, Samuel Neves, and
Zooko Wilcox-O'Hearn. It was announced on January 9, 2020, at Real
World Crypto. BLAKE3 is a single algorithm with many desirable
features (parallelism, XOF, KDF, PRF and MAC), in contrast to BLAKE
and BLAKE2, which are algorithm families with multiple variants.
BLAKE3 has a binary tree structure, so it supports a practically
unlimited degree of parallelism (both SIMD and multithreading) given
enough input. The official Rust and C implementations are
dual-licensed as public domain (CC0) and the Apache License.
Along with adding the BLAKE3 hash into the OpenZFS infrastructure a
new benchmarking file called chksum_bench was introduced. When read
it reports the speed of the available checksum functions.
On Linux: cat /proc/spl/kstat/zfs/chksum_bench
On FreeBSD: sysctl kstat.zfs.misc.chksum_bench
This is an example output of an i3-1005G1 test system with Debian 11:
implementation 1k 4k 16k 64k 256k 1m 4m
edonr-generic 1196 1602 1761 1749 1762 1759 1751
skein-generic 546 591 608 615 619 612 616
sha256-generic 240 300 316 314 304 285 276
sha512-generic 353 441 467 476 472 467 426
blake3-generic 308 313 313 313 312 313 312
blake3-sse2 402 1289 1423 1446 1432 1458 1413
blake3-sse41 427 1470 1625 1704 1679 1607 1629
blake3-avx2 428 1920 3095 3343 3356 3318 3204
blake3-avx512 473 2687 4905 5836 5844 5643 5374
Output on Debian 5.10.0-10-amd64 system: (Ryzen 7 5800X)
implementation 1k 4k 16k 64k 256k 1m 4m
edonr-generic 1840 2458 2665 2719 2711 2723 2693
skein-generic 870 966 996 992 1003 1005 1009
sha256-generic 415 442 453 455 457 457 457
sha512-generic 608 690 711 718 719 720 721
blake3-generic 301 313 311 309 309 310 310
blake3-sse2 343 1865 2124 2188 2180 2181 2186
blake3-sse41 364 2091 2396 2509 2463 2482 2488
blake3-avx2 365 2590 4399 4971 4915 4802 4764
Output on Debian 5.10.0-9-powerpc64le system: (POWER 9)
implementation 1k 4k 16k 64k 256k 1m 4m
edonr-generic 1213 1703 1889 1918 1957 1902 1907
skein-generic 434 492 520 522 511 525 525
sha256-generic 167 183 187 188 188 187 188
sha512-generic 186 216 222 221 225 224 224
blake3-generic 153 152 154 153 151 153 153
blake3-sse2 391 1170 1366 1406 1428 1426 1414
blake3-sse41 352 1049 1212 1174 1262 1258 1259
Output on Debian 5.10.0-11-arm64 system: (Pi400)
implementation 1k 4k 16k 64k 256k 1m 4m
edonr-generic 487 603 629 639 643 641 641
skein-generic 271 299 303 308 309 309 307
sha256-generic 117 127 128 130 130 129 130
sha512-generic 145 165 170 172 173 174 175
blake3-generic 81 29 71 89 89 89 89
blake3-sse2 112 323 368 379 380 371 374
blake3-sse41 101 315 357 368 369 364 360
Structurally, the new code is mainly split into these parts:
- 1x cross platform generic c variant: blake3_generic.c
- 4x assembly for X86-64 (SSE2, SSE4.1, AVX2, AVX512)
- 2x assembly for ARMv8 (NEON converted from SSE2)
- 2x assembly for PPC64-LE (POWER8 converted from SSE2)
- one file for switching between the implementations
Note the PPC64 assembly requires the VSX instruction set and the
kfpu_begin() / kfpu_end() calls on PowerPC were updated accordingly.
Reviewed-by: Felix Dörre <felix@dogcraft.de>
Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Co-authored-by: Rich Ercolani <rincebrain@gmail.com>
Closes #10058
Closes #12918
2022-06-09 01:55:57 +03:00
|
|
|
.Sy edonr , Ns Sy verify Ns | Ns Sy blake3 Ns Oo , Ns Sy verify Oc Ns
|
2019-11-12 22:17:40 +03:00
|
|
|
.Xc
|
2021-05-27 03:46:40 +03:00
|
|
|
Configures deduplication for a dataset.
|
|
|
|
The default value is
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy off .
|
|
|
|
The default deduplication checksum is
|
|
|
|
.Sy sha256
|
2021-05-27 03:46:40 +03:00
|
|
|
(this may change in the future).
|
|
|
|
When
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy dedup
|
|
|
|
is enabled, the checksum defined here overrides the
|
|
|
|
.Sy checksum
|
2021-05-27 03:46:40 +03:00
|
|
|
property.
|
|
|
|
Setting the value to
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy verify
|
|
|
|
has the same effect as the setting
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy sha256 , Ns Sy verify .
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pp
|
|
|
|
If set to
|
|
|
|
.Sy verify ,
|
|
|
|
ZFS will do a byte-to-byte comparison in case of two blocks having the same
|
2021-05-27 03:46:40 +03:00
|
|
|
signature to make sure the block contents are identical.
|
|
|
|
Specifying
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy verify
|
|
|
|
is mandatory for the
|
|
|
|
.Sy edonr
|
|
|
|
algorithm.
|
|
|
|
.Pp
|
2021-05-27 03:46:40 +03:00
|
|
|
Unless necessary, deduplication should
|
|
|
|
.Em not
|
|
|
|
be enabled on a system.
|
|
|
|
See the
|
|
|
|
.Sx Deduplication
|
2019-11-12 22:17:40 +03:00
|
|
|
section of
|
2021-06-04 23:29:26 +03:00
|
|
|
.Xr zfsconcepts 7 .
|
2019-11-12 22:17:40 +03:00
|
|
|
.It Xo
|
Adding Direct IO Support
Adding O_DIRECT support to ZFS to bypass the ARC for writes/reads.
O_DIRECT support in ZFS will always ensure there is coherency between
buffered and O_DIRECT IO requests. This ensures that all IO requests,
whether buffered or direct, will see the same file contents at all
times. Just as in other FS's , O_DIRECT does not imply O_SYNC. While
data is written directly to VDEV disks, metadata will not be synced
until the associated TXG is synced.
For both O_DIRECT read and write request the offset and request sizes,
at a minimum, must be PAGE_SIZE aligned. In the event they are not,
then EINVAL is returned unless the direct property is set to always (see
below).
For O_DIRECT writes:
The request also must be block aligned (recordsize) or the write
request will take the normal (buffered) write path. In the event that
request is block aligned and a cached copy of the buffer in the ARC,
then it will be discarded from the ARC forcing all further reads to
retrieve the data from disk.
For O_DIRECT reads:
The only alignment restrictions are PAGE_SIZE alignment. In the event
that the requested data is in buffered (in the ARC) it will just be
copied from the ARC into the user buffer.
For both O_DIRECT writes and reads the O_DIRECT flag will be ignored in
the event that file contents are mmap'ed. In this case, all requests
that are at least PAGE_SIZE aligned will just fall back to the buffered
paths. If the request however is not PAGE_SIZE aligned, EINVAL will
be returned as always regardless if the file's contents are mmap'ed.
Since O_DIRECT writes go through the normal ZIO pipeline, the
following operations are supported just as with normal buffered writes:
Checksum
Compression
Encryption
Erasure Coding
There is one caveat for the data integrity of O_DIRECT writes that is
distinct for each of the OS's supported by ZFS.
FreeBSD - FreeBSD is able to place user pages under write protection so
any data in the user buffers and written directly down to the
VDEV disks is guaranteed to not change. There is no concern
with data integrity and O_DIRECT writes.
Linux - Linux is not able to place anonymous user pages under write
protection. Because of this, if the user decides to manipulate
the page contents while the write operation is occurring, data
integrity can not be guaranteed. However, there is a module
parameter `zfs_vdev_direct_write_verify` that controls the
if a O_DIRECT writes that can occur to a top-level VDEV before
a checksum verify is run before the contents of the I/O buffer
are committed to disk. In the event of a checksum verification
failure the write will return EIO. The number of O_DIRECT write
checksum verification errors can be observed by doing
`zpool status -d`, which will list all verification errors that
have occurred on a top-level VDEV. Along with `zpool status`, a
ZED event will be issues as `dio_verify` when a checksum
verification error occurs.
ZVOLs and dedup is not currently supported with Direct I/O.
A new dataset property `direct` has been added with the following 3
allowable values:
disabled - Accepts O_DIRECT flag, but silently ignores it and treats
the request as a buffered IO request.
standard - Follows the alignment restrictions outlined above for
write/read IO requests when the O_DIRECT flag is used.
always - Treats every write/read IO request as though it passed
O_DIRECT and will do O_DIRECT if the alignment restrictions
are met otherwise will redirect through the ARC. This
property will not allow a request to fail.
There is also a module parameter zfs_dio_enabled that can be used to
force all reads and writes through the ARC. By setting this module
parameter to 0, it mimics as if the direct dataset property is set to
disabled.
Reviewed-by: Brian Behlendorf <behlendorf@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Atkinson <batkinson@lanl.gov>
Co-authored-by: Mark Maybee <mark.maybee@delphix.com>
Co-authored-by: Matt Macy <mmacy@FreeBSD.org>
Co-authored-by: Brian Behlendorf <behlendorf@llnl.gov>
Closes #10018
2024-09-14 23:47:59 +03:00
|
|
|
.Sy direct Ns = Ns Sy disabled Ns | Ns Sy standard Ns | Ns Sy always
|
|
|
|
.Xc
|
|
|
|
Controls the behavior of Direct I/O requests
|
|
|
|
.Pq e.g. Dv O_DIRECT .
|
|
|
|
The
|
|
|
|
.Sy standard
|
|
|
|
behavior for Direct I/O requests is to bypass the ARC when possible.
|
|
|
|
These requests will not be cached and performance will be limited by the
|
|
|
|
raw speed of the underlying disks
|
|
|
|
.Pq Dv this is the default .
|
|
|
|
.Sy always
|
|
|
|
causes every properly aligned read or write to be treated as a direct request.
|
|
|
|
.Sy disabled
|
|
|
|
causes the O_DIRECT flag to be silently ignored and all direct requests will
|
|
|
|
be handled by the ARC.
|
|
|
|
This is the default behavior for OpenZFS 2.2 and prior releases.
|
|
|
|
.Pp
|
|
|
|
Bypassing the ARC requires that a direct request be correctly aligned.
|
|
|
|
For write requests the starting offset and size of the request must be
|
|
|
|
.Sy recordsize Ns
|
|
|
|
-aligned, if not then the unaligned portion of the request will be silently
|
|
|
|
redirected through the ARC.
|
|
|
|
For read requests there is no
|
|
|
|
.Sy recordsize
|
|
|
|
alignment restriction on either the starting offset or size.
|
|
|
|
All direct requests must use a page-aligned memory buffer and the request
|
|
|
|
size must be a multiple of the page size or an error is returned.
|
|
|
|
.Pp
|
|
|
|
Concurrently mixing buffered and direct requests to overlapping regions of
|
|
|
|
a file can decrease performance.
|
|
|
|
However, the resulting file will always be coherent.
|
|
|
|
For example, a direct read after a buffered write will return the data
|
|
|
|
from the buffered write.
|
|
|
|
Furthermore, if an application uses
|
|
|
|
.Xr mmap 2
|
|
|
|
based file access then in order to maintain coherency all direct requests
|
|
|
|
are converted to buffered requests while the file is mapped.
|
|
|
|
Currently Direct I/O is not supported with zvols.
|
|
|
|
If dedup is enabled on a dataset, Direct I/O writes will not check for
|
|
|
|
deduplication.
|
|
|
|
Deduplication and Direct I/O writes are currently incompatible.
|
|
|
|
.It Xo
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy dnodesize Ns = Ns Sy legacy Ns | Ns Sy auto Ns | Ns Sy 1k Ns | Ns
|
|
|
|
.Sy 2k Ns | Ns Sy 4k Ns | Ns Sy 8k Ns | Ns Sy 16k
|
|
|
|
.Xc
|
|
|
|
Specifies a compatibility mode or literal value for the size of dnodes in the
|
2021-05-27 03:46:40 +03:00
|
|
|
file system.
|
|
|
|
The default value is
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy legacy .
|
|
|
|
Setting this property to a value other than
|
2022-11-12 15:23:30 +03:00
|
|
|
.Sy legacy No requires the Sy large_dnode No pool feature to be enabled .
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pp
|
|
|
|
Consider setting
|
|
|
|
.Sy dnodesize
|
|
|
|
to
|
|
|
|
.Sy auto
|
|
|
|
if the dataset uses the
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy xattr Ns = Ns Sy sa
|
|
|
|
property setting and the workload makes heavy use of extended attributes.
|
|
|
|
This
|
2019-11-12 22:17:40 +03:00
|
|
|
may be applicable to SELinux-enabled systems, Lustre servers, and Samba
|
2021-05-27 03:46:40 +03:00
|
|
|
servers, for example.
|
|
|
|
Literal values are supported for cases where the optimal
|
2019-11-12 22:17:40 +03:00
|
|
|
size is known in advance and for performance testing.
|
|
|
|
.Pp
|
|
|
|
Leave
|
|
|
|
.Sy dnodesize
|
|
|
|
set to
|
|
|
|
.Sy legacy
|
|
|
|
if you need to receive a send stream of this dataset on a pool that doesn't
|
2021-05-27 03:46:40 +03:00
|
|
|
enable the
|
|
|
|
.Sy large_dnode
|
|
|
|
feature, or if you need to import this pool on a system that doesn't support the
|
2022-11-12 15:23:30 +03:00
|
|
|
.Sy large_dnode No feature .
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pp
|
|
|
|
This property can also be referred to by its shortened column name,
|
|
|
|
.Sy dnsize .
|
|
|
|
.It Xo
|
|
|
|
.Sy encryption Ns = Ns Sy off Ns | Ns Sy on Ns | Ns Sy aes-128-ccm Ns | Ns
|
|
|
|
.Sy aes-192-ccm Ns | Ns Sy aes-256-ccm Ns | Ns Sy aes-128-gcm Ns | Ns
|
|
|
|
.Sy aes-192-gcm Ns | Ns Sy aes-256-gcm
|
|
|
|
.Xc
|
|
|
|
Controls the encryption cipher suite (block cipher, key length, and mode) used
|
2021-05-27 03:46:40 +03:00
|
|
|
for this dataset.
|
|
|
|
Requires the
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy encryption
|
|
|
|
feature to be enabled on the pool.
|
|
|
|
Requires a
|
|
|
|
.Sy keyformat
|
|
|
|
to be set at dataset creation time.
|
|
|
|
.Pp
|
|
|
|
Selecting
|
|
|
|
.Sy encryption Ns = Ns Sy on
|
|
|
|
when creating a dataset indicates that the default encryption suite will be
|
|
|
|
selected, which is currently
|
2020-02-10 23:59:50 +03:00
|
|
|
.Sy aes-256-gcm .
|
2019-11-12 22:17:40 +03:00
|
|
|
In order to provide consistent data protection, encryption must be specified at
|
|
|
|
dataset creation time and it cannot be changed afterwards.
|
|
|
|
.Pp
|
|
|
|
For more details and caveats about encryption see the
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sx Encryption
|
2020-09-01 21:06:22 +03:00
|
|
|
section of
|
|
|
|
.Xr zfs-load-key 8 .
|
2019-11-12 22:17:40 +03:00
|
|
|
.It Sy keyformat Ns = Ns Sy raw Ns | Ns Sy hex Ns | Ns Sy passphrase
|
2021-05-27 03:46:40 +03:00
|
|
|
Controls what format the user's encryption key will be provided as.
|
|
|
|
This property is only set when the dataset is encrypted.
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pp
|
|
|
|
Raw keys and hex keys must be 32 bytes long (regardless of the chosen
|
2021-05-27 03:46:40 +03:00
|
|
|
encryption suite) and must be randomly generated.
|
|
|
|
A raw key can be generated with the following command:
|
|
|
|
.Dl # Nm dd Sy if=/dev/urandom bs=32 count=1 Sy of= Ns Pa /path/to/output/key
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pp
|
|
|
|
Passphrases must be between 8 and 512 bytes long and will be processed through
|
|
|
|
PBKDF2 before being used (see the
|
|
|
|
.Sy pbkdf2iters
|
2021-05-27 03:46:40 +03:00
|
|
|
property).
|
|
|
|
Even though the encryption suite cannot be changed after dataset creation,
|
|
|
|
the keyformat can be with
|
2019-11-12 22:17:40 +03:00
|
|
|
.Nm zfs Cm change-key .
|
|
|
|
.It Xo
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy keylocation Ns = Ns Sy prompt Ns | Ns Sy file:// Ns Ar /absolute/file/path Ns | Ns Sy https:// Ns Ar address Ns | Ns Sy http:// Ns Ar address
|
2019-11-12 22:17:40 +03:00
|
|
|
.Xc
|
|
|
|
Controls where the user's encryption key will be loaded from by default for
|
|
|
|
commands such as
|
|
|
|
.Nm zfs Cm load-key
|
|
|
|
and
|
2021-05-26 19:41:20 +03:00
|
|
|
.Nm zfs Cm mount Fl l .
|
2021-05-27 03:46:40 +03:00
|
|
|
This property is only set for encrypted datasets which are encryption roots.
|
|
|
|
If unspecified, the default is
|
|
|
|
.Sy prompt .
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pp
|
|
|
|
Even though the encryption suite cannot be changed after dataset creation, the
|
|
|
|
keylocation can be with either
|
|
|
|
.Nm zfs Cm set
|
|
|
|
or
|
|
|
|
.Nm zfs Cm change-key .
|
|
|
|
If
|
|
|
|
.Sy prompt
|
|
|
|
is selected ZFS will ask for the key at the command prompt when it is required
|
|
|
|
to access the encrypted data (see
|
|
|
|
.Nm zfs Cm load-key
|
2021-05-27 03:46:40 +03:00
|
|
|
for details).
|
2022-11-12 15:23:30 +03:00
|
|
|
This setting will also allow the key to be passed in via the standard input
|
|
|
|
stream,
|
2019-11-12 22:17:40 +03:00
|
|
|
but users should be careful not to place keys which should be kept secret on
|
2021-05-27 03:46:40 +03:00
|
|
|
the command line.
|
|
|
|
If a file URI is selected, the key will be loaded from the
|
|
|
|
specified absolute file path.
|
|
|
|
If an HTTPS or HTTP URL is selected, it will be GETted using
|
2021-05-13 07:21:35 +03:00
|
|
|
.Xr fetch 3 ,
|
2022-11-12 15:23:30 +03:00
|
|
|
libcurl, or nothing, depending on compile-time configuration and run-time
|
|
|
|
availability.
|
2021-05-27 03:46:40 +03:00
|
|
|
The
|
|
|
|
.Sy SSL_CA_CERT_FILE
|
2021-05-13 07:21:35 +03:00
|
|
|
environment variable can be set to set the location
|
2021-05-27 03:46:40 +03:00
|
|
|
of the concatenated certificate store.
|
|
|
|
The
|
|
|
|
.Sy SSL_CA_CERT_PATH
|
2021-05-13 07:21:35 +03:00
|
|
|
environment variable can be set to override the location
|
2021-05-27 03:46:40 +03:00
|
|
|
of the directory containing the certificate authority bundle.
|
|
|
|
The
|
|
|
|
.Sy SSL_CLIENT_CERT_FILE
|
2021-05-13 07:21:35 +03:00
|
|
|
and
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy SSL_CLIENT_KEY_FILE
|
2021-05-13 07:21:35 +03:00
|
|
|
environment variables can be set to configure the path
|
|
|
|
to the client certificate and its key.
|
2019-11-12 22:17:40 +03:00
|
|
|
.It Sy pbkdf2iters Ns = Ns Ar iterations
|
|
|
|
Controls the number of PBKDF2 iterations that a
|
|
|
|
.Sy passphrase
|
|
|
|
encryption key should be run through when processing it into an encryption key.
|
|
|
|
This property is only defined when encryption is enabled and a keyformat of
|
|
|
|
.Sy passphrase
|
2021-05-27 03:46:40 +03:00
|
|
|
is selected.
|
|
|
|
The goal of PBKDF2 is to significantly increase the
|
|
|
|
computational difficulty needed to brute force a user's passphrase.
|
|
|
|
This is accomplished by forcing the attacker to run each passphrase through a
|
2019-11-12 22:17:40 +03:00
|
|
|
computationally expensive hashing function many times before they arrive at the
|
2021-05-27 03:46:40 +03:00
|
|
|
resulting key.
|
|
|
|
A user who actually knows the passphrase will only have to pay this cost once.
|
|
|
|
As CPUs become better at processing, this number should be
|
|
|
|
raised to ensure that a brute force attack is still not possible.
|
|
|
|
The current default is
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy 350000
|
|
|
|
and the minimum is
|
|
|
|
.Sy 100000 .
|
|
|
|
This property may be changed with
|
|
|
|
.Nm zfs Cm change-key .
|
|
|
|
.It Sy exec Ns = Ns Sy on Ns | Ns Sy off
|
|
|
|
Controls whether processes can be executed from within this file system.
|
|
|
|
The default value is
|
|
|
|
.Sy on .
|
|
|
|
The values
|
|
|
|
.Sy on
|
|
|
|
and
|
|
|
|
.Sy off
|
|
|
|
are equivalent to the
|
|
|
|
.Sy exec
|
|
|
|
and
|
|
|
|
.Sy noexec
|
|
|
|
mount options.
|
2023-10-25 00:53:27 +03:00
|
|
|
.It Sy volthreading Ns = Ns Sy on Ns | Ns Sy off
|
|
|
|
Controls internal zvol threading.
|
|
|
|
The value
|
|
|
|
.Sy off
|
|
|
|
disables zvol threading, and zvol relies on application threads.
|
|
|
|
The default value is
|
|
|
|
.Sy on ,
|
|
|
|
which enables threading within a zvol.
|
|
|
|
Please note that this property will be overridden by
|
|
|
|
.Sy zvol_request_sync
|
|
|
|
module parameter.
|
|
|
|
This property is only applicable to Linux.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy filesystem_limit Ns = Ns Ar count Ns | Ns Sy none
|
2019-11-12 22:17:40 +03:00
|
|
|
Limits the number of filesystems and volumes that can exist under this point in
|
|
|
|
the dataset tree.
|
|
|
|
The limit is not enforced if the user is allowed to change the limit.
|
|
|
|
Setting a
|
|
|
|
.Sy filesystem_limit
|
|
|
|
to
|
|
|
|
.Sy on
|
|
|
|
a descendent of a filesystem that already has a
|
|
|
|
.Sy filesystem_limit
|
|
|
|
does not override the ancestor's
|
|
|
|
.Sy filesystem_limit ,
|
|
|
|
but rather imposes an additional limit.
|
|
|
|
This feature must be enabled to be used
|
|
|
|
.Po see
|
2021-06-04 23:29:26 +03:00
|
|
|
.Xr zpool-features 7
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pc .
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy special_small_blocks Ns = Ns Ar size
|
2019-11-12 22:17:40 +03:00
|
|
|
This value represents the threshold block size for including small file
|
2021-05-27 03:46:40 +03:00
|
|
|
blocks into the special allocation class.
|
|
|
|
Blocks smaller than or equal to this
|
2019-11-12 22:17:40 +03:00
|
|
|
value will be assigned to the special allocation class while greater blocks
|
2021-05-27 03:46:40 +03:00
|
|
|
will be assigned to the regular class.
|
2022-05-03 15:07:04 +03:00
|
|
|
Valid values are zero or a power of two from 512 up to 1048576 (1 MiB).
|
2021-05-27 03:46:40 +03:00
|
|
|
The default size is 0 which means no small file blocks
|
2019-11-12 22:17:40 +03:00
|
|
|
will be allocated in the special class.
|
|
|
|
.Pp
|
|
|
|
Before setting this property, a special class vdev must be added to the
|
2021-05-27 03:46:40 +03:00
|
|
|
pool.
|
|
|
|
See
|
2021-06-04 23:29:26 +03:00
|
|
|
.Xr zpoolconcepts 7
|
2019-11-12 22:17:40 +03:00
|
|
|
for more details on the special allocation class.
|
|
|
|
.It Sy mountpoint Ns = Ns Pa path Ns | Ns Sy none Ns | Ns Sy legacy
|
|
|
|
Controls the mount point used for this file system.
|
|
|
|
See the
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sx Mount Points
|
2019-11-12 22:17:40 +03:00
|
|
|
section of
|
2021-06-04 23:29:26 +03:00
|
|
|
.Xr zfsconcepts 7
|
2019-11-12 22:17:40 +03:00
|
|
|
for more information on how this property is used.
|
|
|
|
.Pp
|
|
|
|
When the
|
|
|
|
.Sy mountpoint
|
|
|
|
property is changed for a file system, the file system and any children that
|
|
|
|
inherit the mount point are unmounted.
|
|
|
|
If the new value is
|
|
|
|
.Sy legacy ,
|
|
|
|
then they remain unmounted.
|
|
|
|
Otherwise, they are automatically remounted in the new location if the property
|
|
|
|
was previously
|
|
|
|
.Sy legacy
|
|
|
|
or
|
2023-10-03 02:58:54 +03:00
|
|
|
.Sy none .
|
2019-11-12 22:17:40 +03:00
|
|
|
In addition, any shared file systems are unshared and shared in the new
|
|
|
|
location.
|
2023-10-03 02:58:54 +03:00
|
|
|
.Pp
|
|
|
|
When the
|
|
|
|
.Sy mountpoint
|
|
|
|
property is set with
|
|
|
|
.Nm zfs Cm set Fl u
|
|
|
|
, the
|
|
|
|
.Sy mountpoint
|
|
|
|
property is updated but dataset is not mounted or unmounted and remains
|
|
|
|
as it was before.
|
2019-11-12 22:17:40 +03:00
|
|
|
.It Sy nbmand Ns = Ns Sy on Ns | Ns Sy off
|
|
|
|
Controls whether the file system should be mounted with
|
|
|
|
.Sy nbmand
|
2021-05-24 18:53:12 +03:00
|
|
|
.Pq Non-blocking mandatory locks .
|
2019-11-12 22:17:40 +03:00
|
|
|
Changes to this property only take effect when the file system is umounted and
|
2021-05-27 03:46:40 +03:00
|
|
|
remounted.
|
2023-04-19 19:03:42 +03:00
|
|
|
This was only supported by Linux prior to 5.15, and was buggy there,
|
|
|
|
and is not supported by
|
|
|
|
.Fx .
|
|
|
|
On Solaris it's used for SMB clients.
|
2020-03-06 20:28:19 +03:00
|
|
|
.It Sy overlay Ns = Ns Sy on Ns | Ns Sy off
|
2019-11-12 22:17:40 +03:00
|
|
|
Allow mounting on a busy directory or a directory which already contains
|
2020-03-06 20:28:19 +03:00
|
|
|
files or directories.
|
2021-05-27 03:46:40 +03:00
|
|
|
This is the default mount behavior for Linux and
|
|
|
|
.Fx
|
|
|
|
file systems.
|
2020-03-06 20:28:19 +03:00
|
|
|
On these platforms the property is
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy on
|
2020-03-06 20:28:19 +03:00
|
|
|
by default.
|
|
|
|
Set to
|
|
|
|
.Sy off
|
|
|
|
to disable overlay mounts for consistency with OpenZFS on other platforms.
|
2019-11-12 22:17:40 +03:00
|
|
|
.It Sy primarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
|
|
|
|
Controls what is cached in the primary cache
|
|
|
|
.Pq ARC .
|
|
|
|
If this property is set to
|
|
|
|
.Sy all ,
|
|
|
|
then both user data and metadata is cached.
|
|
|
|
If this property is set to
|
|
|
|
.Sy none ,
|
|
|
|
then neither user data nor metadata is cached.
|
|
|
|
If this property is set to
|
|
|
|
.Sy metadata ,
|
|
|
|
then only metadata is cached.
|
|
|
|
The default value is
|
|
|
|
.Sy all .
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy quota Ns = Ns Ar size Ns | Ns Sy none
|
2019-11-12 22:17:40 +03:00
|
|
|
Limits the amount of space a dataset and its descendents can consume.
|
|
|
|
This property enforces a hard limit on the amount of space used.
|
|
|
|
This includes all space consumed by descendents, including file systems and
|
|
|
|
snapshots.
|
|
|
|
Setting a quota on a descendent of a dataset that already has a quota does not
|
|
|
|
override the ancestor's quota, but rather imposes an additional limit.
|
|
|
|
.Pp
|
|
|
|
Quotas cannot be set on volumes, as the
|
|
|
|
.Sy volsize
|
|
|
|
property acts as an implicit quota.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy snapshot_limit Ns = Ns Ar count Ns | Ns Sy none
|
2019-11-12 22:17:40 +03:00
|
|
|
Limits the number of snapshots that can be created on a dataset and its
|
|
|
|
descendents.
|
|
|
|
Setting a
|
|
|
|
.Sy snapshot_limit
|
|
|
|
on a descendent of a dataset that already has a
|
|
|
|
.Sy snapshot_limit
|
|
|
|
does not override the ancestor's
|
|
|
|
.Sy snapshot_limit ,
|
|
|
|
but rather imposes an additional limit.
|
|
|
|
The limit is not enforced if the user is allowed to change the limit.
|
|
|
|
For example, this means that recursive snapshots taken from the global zone are
|
|
|
|
counted against each delegated dataset within a zone.
|
|
|
|
This feature must be enabled to be used
|
|
|
|
.Po see
|
2021-06-04 23:29:26 +03:00
|
|
|
.Xr zpool-features 7
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pc .
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy userquota@ Ns Ar user Ns = Ns Ar size Ns | Ns Sy none
|
2019-11-12 22:17:40 +03:00
|
|
|
Limits the amount of space consumed by the specified user.
|
|
|
|
User space consumption is identified by the
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy userspace@ Ns Ar user
|
2019-11-12 22:17:40 +03:00
|
|
|
property.
|
|
|
|
.Pp
|
|
|
|
Enforcement of user quotas may be delayed by several seconds.
|
|
|
|
This delay means that a user might exceed their quota before the system notices
|
|
|
|
that they are over quota and begins to refuse additional writes with the
|
|
|
|
.Er EDQUOT
|
|
|
|
error message.
|
|
|
|
See the
|
|
|
|
.Nm zfs Cm userspace
|
2021-05-27 03:46:40 +03:00
|
|
|
command for more information.
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pp
|
|
|
|
Unprivileged users can only access their own groups' space usage.
|
|
|
|
The root user, or a user who has been granted the
|
|
|
|
.Sy userquota
|
|
|
|
privilege with
|
|
|
|
.Nm zfs Cm allow ,
|
|
|
|
can get and set everyone's quota.
|
|
|
|
.Pp
|
|
|
|
This property is not available on volumes, on file systems before version 4, or
|
|
|
|
on pools before version 15.
|
|
|
|
The
|
2022-03-24 22:14:25 +03:00
|
|
|
.Sy userquota@ Ns Ar …
|
2019-11-12 22:17:40 +03:00
|
|
|
properties are not displayed by
|
|
|
|
.Nm zfs Cm get Sy all .
|
|
|
|
The user's name must be appended after the
|
|
|
|
.Sy @
|
|
|
|
symbol, using one of the following forms:
|
2021-05-27 03:46:40 +03:00
|
|
|
.Bl -bullet -compact -offset 4n
|
2019-11-12 22:17:40 +03:00
|
|
|
.It
|
2021-05-27 03:46:40 +03:00
|
|
|
POSIX name
|
|
|
|
.Pq Qq joe
|
2019-11-12 22:17:40 +03:00
|
|
|
.It
|
2021-05-27 03:46:40 +03:00
|
|
|
POSIX numeric ID
|
|
|
|
.Pq Qq 789
|
2019-11-12 22:17:40 +03:00
|
|
|
.It
|
2021-05-27 03:46:40 +03:00
|
|
|
SID name
|
|
|
|
.Pq Qq joe.smith@mydomain
|
2019-11-12 22:17:40 +03:00
|
|
|
.It
|
2021-05-27 03:46:40 +03:00
|
|
|
SID numeric ID
|
|
|
|
.Pq Qq S-1-123-456-789
|
2019-11-12 22:17:40 +03:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Files created on Linux always have POSIX owners.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy userobjquota@ Ns Ar user Ns = Ns Ar size Ns | Ns Sy none
|
2019-11-12 22:17:40 +03:00
|
|
|
The
|
|
|
|
.Sy userobjquota
|
|
|
|
is similar to
|
|
|
|
.Sy userquota
|
2021-05-27 03:46:40 +03:00
|
|
|
but it limits the number of objects a user can create.
|
|
|
|
Please refer to
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy userobjused
|
|
|
|
for more information about how objects are counted.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy groupquota@ Ns Ar group Ns = Ns Ar size Ns | Ns Sy none
|
2019-11-12 22:17:40 +03:00
|
|
|
Limits the amount of space consumed by the specified group.
|
|
|
|
Group space consumption is identified by the
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy groupused@ Ns Ar group
|
2019-11-12 22:17:40 +03:00
|
|
|
property.
|
|
|
|
.Pp
|
|
|
|
Unprivileged users can access only their own groups' space usage.
|
|
|
|
The root user, or a user who has been granted the
|
|
|
|
.Sy groupquota
|
|
|
|
privilege with
|
|
|
|
.Nm zfs Cm allow ,
|
|
|
|
can get and set all groups' quotas.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy groupobjquota@ Ns Ar group Ns = Ns Ar size Ns | Ns Sy none
|
2019-11-12 22:17:40 +03:00
|
|
|
The
|
|
|
|
.Sy groupobjquota
|
|
|
|
is similar to
|
|
|
|
.Sy groupquota
|
2021-05-27 03:46:40 +03:00
|
|
|
but it limits number of objects a group can consume.
|
|
|
|
Please refer to
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy userobjused
|
|
|
|
for more information about how objects are counted.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy projectquota@ Ns Ar project Ns = Ns Ar size Ns | Ns Sy none
|
|
|
|
Limits the amount of space consumed by the specified project.
|
|
|
|
Project space consumption is identified by the
|
|
|
|
.Sy projectused@ Ns Ar project
|
|
|
|
property.
|
|
|
|
Please refer to
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy projectused
|
|
|
|
for more information about how project is identified and set/changed.
|
|
|
|
.Pp
|
|
|
|
The root user, or a user who has been granted the
|
|
|
|
.Sy projectquota
|
|
|
|
privilege with
|
|
|
|
.Nm zfs allow ,
|
|
|
|
can access all projects' quota.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy projectobjquota@ Ns Ar project Ns = Ns Ar size Ns | Ns Sy none
|
2019-11-12 22:17:40 +03:00
|
|
|
The
|
|
|
|
.Sy projectobjquota
|
|
|
|
is similar to
|
|
|
|
.Sy projectquota
|
2021-05-27 03:46:40 +03:00
|
|
|
but it limits number of objects a project can consume.
|
|
|
|
Please refer to
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy userobjused
|
|
|
|
for more information about how objects are counted.
|
|
|
|
.It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
|
|
|
|
Controls whether this dataset can be modified.
|
|
|
|
The default value is
|
|
|
|
.Sy off .
|
|
|
|
The values
|
|
|
|
.Sy on
|
|
|
|
and
|
|
|
|
.Sy off
|
|
|
|
are equivalent to the
|
|
|
|
.Sy ro
|
|
|
|
and
|
|
|
|
.Sy rw
|
|
|
|
mount options.
|
|
|
|
.Pp
|
|
|
|
This property can also be referred to by its shortened column name,
|
|
|
|
.Sy rdonly .
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy recordsize Ns = Ns Ar size
|
2019-11-12 22:17:40 +03:00
|
|
|
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 tunes block sizes according to internal algorithms optimized
|
|
|
|
for typical access patterns.
|
|
|
|
.Pp
|
|
|
|
For databases that create very large files but access them in small random
|
|
|
|
chunks, these algorithms may be suboptimal.
|
|
|
|
Specifying a
|
|
|
|
.Sy 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.
|
|
|
|
.Pp
|
2021-05-27 03:46:40 +03:00
|
|
|
The size specified must be a power of two greater than or equal to
|
2022-05-03 15:07:04 +03:00
|
|
|
.Ar 512 B
|
2021-05-27 03:46:40 +03:00
|
|
|
and less than or equal to
|
2022-05-03 15:07:04 +03:00
|
|
|
.Ar 128 KiB .
|
2019-11-12 22:17:40 +03:00
|
|
|
If the
|
|
|
|
.Sy large_blocks
|
2021-05-27 03:46:40 +03:00
|
|
|
feature is enabled on the pool, the size may be up to
|
2024-09-29 23:19:52 +03:00
|
|
|
.Ar 16 MiB .
|
2019-11-12 22:17:40 +03:00
|
|
|
See
|
2021-06-04 23:29:26 +03:00
|
|
|
.Xr zpool-features 7
|
2019-11-12 22:17:40 +03:00
|
|
|
for details on ZFS feature flags.
|
|
|
|
.Pp
|
2024-09-29 23:19:52 +03:00
|
|
|
However, blocks larger than
|
|
|
|
.Ar 1 MiB
|
|
|
|
can have an impact on i/o latency (e.g. tying up a spinning disk for
|
|
|
|
~300ms), and also potentially on the memory allocator.
|
|
|
|
.Pp
|
|
|
|
Note that maximum size is still limited by default to
|
|
|
|
.Ar 1 MiB
|
|
|
|
on x86_32, see
|
|
|
|
.Sy zfs_max_recordsize
|
|
|
|
module parameter.
|
|
|
|
.Pp
|
2019-11-12 22:17:40 +03:00
|
|
|
Changing the file system's
|
|
|
|
.Sy recordsize
|
|
|
|
affects only files created afterward; existing files are unaffected.
|
|
|
|
.Pp
|
|
|
|
This property can also be referred to by its shortened column name,
|
|
|
|
.Sy recsize .
|
2022-10-20 03:07:51 +03:00
|
|
|
.It Sy redundant_metadata Ns = Ns Sy all Ns | Ns Sy most Ns | Ns Sy some Ns | Ns Sy none
|
2019-11-12 22:17:40 +03:00
|
|
|
Controls what types of metadata are stored redundantly.
|
|
|
|
ZFS stores an extra copy of metadata, so that if a single block is corrupted,
|
|
|
|
the amount of user data lost is limited.
|
|
|
|
This extra copy is in addition to any redundancy provided at the pool level
|
|
|
|
.Pq e.g. by mirroring or RAID-Z ,
|
|
|
|
and is in addition to an extra copy specified by the
|
|
|
|
.Sy copies
|
|
|
|
property
|
|
|
|
.Pq up to a total of 3 copies .
|
|
|
|
For example if the pool is mirrored,
|
|
|
|
.Sy copies Ns = Ns 2 ,
|
|
|
|
and
|
|
|
|
.Sy redundant_metadata Ns = Ns Sy most ,
|
|
|
|
then ZFS stores 6 copies of most metadata, and 4 copies of data and some
|
|
|
|
metadata.
|
|
|
|
.Pp
|
|
|
|
When set to
|
|
|
|
.Sy all ,
|
|
|
|
ZFS stores an extra copy of all metadata.
|
|
|
|
If a single on-disk block is corrupt, at worst a single block of user data
|
|
|
|
.Po which is
|
|
|
|
.Sy recordsize
|
|
|
|
bytes long
|
|
|
|
.Pc
|
|
|
|
can be lost.
|
|
|
|
.Pp
|
|
|
|
When set to
|
|
|
|
.Sy most ,
|
|
|
|
ZFS stores an extra copy of most types of metadata.
|
|
|
|
This can improve performance of random writes, because less metadata must be
|
|
|
|
written.
|
2022-10-20 03:07:51 +03:00
|
|
|
In practice, at worst about 1000 blocks
|
2019-11-12 22:17:40 +03:00
|
|
|
.Po of
|
|
|
|
.Sy recordsize
|
|
|
|
bytes each
|
|
|
|
.Pc
|
|
|
|
of user data can be lost if a single on-disk block is corrupt.
|
|
|
|
The exact behavior of which metadata blocks are stored redundantly may change in
|
|
|
|
future releases.
|
|
|
|
.Pp
|
2022-10-20 03:07:51 +03:00
|
|
|
When set to
|
|
|
|
.Sy some ,
|
|
|
|
ZFS stores an extra copy of only critical metadata.
|
2022-11-12 15:23:30 +03:00
|
|
|
This can improve file create performance since less metadata
|
|
|
|
needs to be written.
|
2022-10-20 03:07:51 +03:00
|
|
|
If a single on-disk block is corrupt, at worst a single user file can be lost.
|
|
|
|
.Pp
|
|
|
|
When set to
|
|
|
|
.Sy none ,
|
|
|
|
ZFS does not store any copies of metadata redundantly.
|
|
|
|
If a single on-disk block is corrupt, an entire dataset can be lost.
|
|
|
|
.Pp
|
2019-11-12 22:17:40 +03:00
|
|
|
The default value is
|
|
|
|
.Sy all .
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy refquota Ns = Ns Ar size Ns | Ns Sy none
|
2019-11-12 22:17:40 +03:00
|
|
|
Limits the amount of space a dataset can consume.
|
|
|
|
This property enforces a hard limit on the amount of space used.
|
|
|
|
This hard limit does not include space used by descendents, including file
|
|
|
|
systems and snapshots.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy refreservation Ns = Ns Ar size Ns | Ns Sy none Ns | Ns Sy auto
|
2019-11-12 22:17:40 +03:00
|
|
|
The minimum amount of space guaranteed to a dataset, not including its
|
|
|
|
descendents.
|
|
|
|
When the amount of space used is below this value, the dataset is treated as if
|
|
|
|
it were taking up the amount of space specified by
|
|
|
|
.Sy refreservation .
|
|
|
|
The
|
|
|
|
.Sy refreservation
|
|
|
|
reservation is accounted for in the parent datasets' space used, and counts
|
|
|
|
against the parent datasets' quotas and reservations.
|
|
|
|
.Pp
|
|
|
|
If
|
|
|
|
.Sy refreservation
|
|
|
|
is set, a snapshot is only allowed if there is enough free pool space outside of
|
|
|
|
this reservation to accommodate the current number of
|
|
|
|
.Qq referenced
|
|
|
|
bytes in the dataset.
|
|
|
|
.Pp
|
|
|
|
If
|
|
|
|
.Sy refreservation
|
|
|
|
is set to
|
|
|
|
.Sy auto ,
|
|
|
|
a volume is thick provisioned
|
|
|
|
.Po or
|
|
|
|
.Qq not sparse
|
|
|
|
.Pc .
|
|
|
|
.Sy refreservation Ns = Ns Sy auto
|
|
|
|
is only supported on volumes.
|
|
|
|
See
|
|
|
|
.Sy volsize
|
|
|
|
in the
|
|
|
|
.Sx Native Properties
|
|
|
|
section for more information about sparse volumes.
|
|
|
|
.Pp
|
|
|
|
This property can also be referred to by its shortened column name,
|
|
|
|
.Sy refreserv .
|
|
|
|
.It Sy relatime Ns = Ns Sy on Ns | Ns Sy off
|
|
|
|
Controls the manner in which the access time is updated when
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy atime Ns = Ns Sy on
|
|
|
|
is set.
|
|
|
|
Turning this property on causes the access time to be updated relative
|
|
|
|
to the modify or change time.
|
|
|
|
Access time is only updated if the previous
|
2019-11-12 22:17:40 +03:00
|
|
|
access time was earlier than the current modify or change time or if the
|
2021-05-27 03:46:40 +03:00
|
|
|
existing access time hasn't been updated within the past 24 hours.
|
|
|
|
The default value is
|
2022-08-13 00:20:25 +03:00
|
|
|
.Sy on .
|
2019-11-12 22:17:40 +03:00
|
|
|
The values
|
|
|
|
.Sy on
|
|
|
|
and
|
|
|
|
.Sy off
|
|
|
|
are equivalent to the
|
|
|
|
.Sy relatime
|
|
|
|
and
|
|
|
|
.Sy norelatime
|
|
|
|
mount options.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy reservation Ns = Ns Ar size Ns | Ns Sy none
|
2019-11-12 22:17:40 +03:00
|
|
|
The minimum amount of space guaranteed to a dataset and its descendants.
|
|
|
|
When the amount of space used is below this value, the dataset is treated as if
|
|
|
|
it were taking up the amount of space specified by its reservation.
|
|
|
|
Reservations are accounted for in the parent datasets' space used, and count
|
|
|
|
against the parent datasets' quotas and reservations.
|
|
|
|
.Pp
|
|
|
|
This property can also be referred to by its shortened column name,
|
|
|
|
.Sy reserv .
|
|
|
|
.It Sy secondarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
|
|
|
|
Controls what is cached in the secondary cache
|
|
|
|
.Pq L2ARC .
|
|
|
|
If this property is set to
|
|
|
|
.Sy all ,
|
|
|
|
then both user data and metadata is cached.
|
|
|
|
If this property is set to
|
|
|
|
.Sy none ,
|
|
|
|
then neither user data nor metadata is cached.
|
|
|
|
If this property is set to
|
|
|
|
.Sy metadata ,
|
|
|
|
then only metadata is cached.
|
|
|
|
The default value is
|
|
|
|
.Sy all .
|
2023-10-24 21:00:07 +03:00
|
|
|
.It Sy prefetch Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
|
|
|
|
Controls what speculative prefetch does.
|
|
|
|
If this property is set to
|
|
|
|
.Sy all ,
|
|
|
|
then both user data and metadata are prefetched.
|
|
|
|
If this property is set to
|
|
|
|
.Sy none ,
|
|
|
|
then neither user data nor metadata are prefetched.
|
|
|
|
If this property is set to
|
|
|
|
.Sy metadata ,
|
|
|
|
then only metadata are prefetched.
|
|
|
|
The default value is
|
|
|
|
.Sy all .
|
|
|
|
.Pp
|
2024-07-09 19:59:55 +03:00
|
|
|
Please note that the module parameter zfs_prefetch_disable=1 can
|
2023-10-24 21:00:07 +03:00
|
|
|
be used to totally disable speculative prefetch, bypassing anything
|
|
|
|
this property does.
|
2019-11-12 22:17:40 +03:00
|
|
|
.It Sy setuid Ns = Ns Sy on Ns | Ns Sy off
|
|
|
|
Controls whether the setuid bit is respected for the file system.
|
|
|
|
The default value is
|
|
|
|
.Sy on .
|
|
|
|
The values
|
|
|
|
.Sy on
|
|
|
|
and
|
|
|
|
.Sy off
|
|
|
|
are equivalent to the
|
|
|
|
.Sy suid
|
|
|
|
and
|
|
|
|
.Sy nosuid
|
|
|
|
mount options.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy sharesmb Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Ar opts
|
2019-11-12 22:17:40 +03:00
|
|
|
Controls whether the file system is shared by using
|
|
|
|
.Sy Samba USERSHARES
|
2021-05-27 03:46:40 +03:00
|
|
|
and what options are to be used.
|
|
|
|
Otherwise, the file system is automatically shared and unshared with the
|
2019-11-12 22:17:40 +03:00
|
|
|
.Nm zfs Cm share
|
|
|
|
and
|
|
|
|
.Nm zfs Cm unshare
|
2021-05-27 03:46:40 +03:00
|
|
|
commands.
|
|
|
|
If the property is set to on, the
|
2019-11-12 22:17:40 +03:00
|
|
|
.Xr net 8
|
|
|
|
command is invoked to create a
|
|
|
|
.Sy USERSHARE .
|
|
|
|
.Pp
|
|
|
|
Because SMB shares requires a resource name, a unique resource name is
|
2021-05-27 03:46:40 +03:00
|
|
|
constructed from the dataset name.
|
|
|
|
The constructed name is a copy of the
|
2019-11-12 22:17:40 +03:00
|
|
|
dataset name except that the characters in the dataset name, which would be
|
|
|
|
invalid in the resource name, are replaced with underscore (_) characters.
|
|
|
|
Linux does not currently support additional options which might be available
|
|
|
|
on Solaris.
|
|
|
|
.Pp
|
|
|
|
If the
|
|
|
|
.Sy sharesmb
|
|
|
|
property is set to
|
|
|
|
.Sy off ,
|
|
|
|
the file systems are unshared.
|
|
|
|
.Pp
|
|
|
|
The share is created with the ACL (Access Control List) "Everyone:F" ("F"
|
2021-05-27 03:46:40 +03:00
|
|
|
stands for "full permissions", i.e. read and write permissions) and no guest
|
2022-02-17 23:30:22 +03:00
|
|
|
access (which means Samba must be able to authenticate a real user \(em
|
|
|
|
.Xr passwd 5 Ns / Ns Xr shadow 5 Ns - ,
|
|
|
|
LDAP- or
|
|
|
|
.Xr smbpasswd 5 Ns -based )
|
|
|
|
by default.
|
2021-05-27 03:46:40 +03:00
|
|
|
This means that any additional access control
|
2022-11-12 15:23:30 +03:00
|
|
|
(disallow specific user specific access etc) must be done on the underlying file
|
|
|
|
system.
|
2023-10-03 02:58:54 +03:00
|
|
|
.Pp
|
|
|
|
When the
|
|
|
|
.Sy sharesmb
|
|
|
|
property is updated with
|
|
|
|
.Nm zfs Cm set Fl u
|
|
|
|
, the property is set to desired value, but the operation to share, reshare
|
|
|
|
or unshare the the dataset is not performed.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Ar opts
|
2019-11-12 22:17:40 +03:00
|
|
|
Controls whether the file system is shared via NFS, and what options are to be
|
|
|
|
used.
|
|
|
|
A file system with a
|
|
|
|
.Sy sharenfs
|
|
|
|
property of
|
|
|
|
.Sy off
|
|
|
|
is managed with the
|
|
|
|
.Xr exportfs 8
|
|
|
|
command and entries in the
|
2021-05-27 03:46:40 +03:00
|
|
|
.Pa /etc/exports
|
2019-11-12 22:17:40 +03:00
|
|
|
file.
|
|
|
|
Otherwise, the file system is automatically shared and unshared with the
|
|
|
|
.Nm zfs Cm share
|
|
|
|
and
|
|
|
|
.Nm zfs Cm unshare
|
|
|
|
commands.
|
|
|
|
If the property is set to
|
|
|
|
.Sy on ,
|
|
|
|
the dataset is shared using the default options:
|
2021-05-27 03:46:40 +03:00
|
|
|
.Dl sec=sys,rw,crossmnt,no_subtree_check
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pp
|
2021-10-30 02:30:44 +03:00
|
|
|
Please note that the options are comma-separated, unlike those found in
|
|
|
|
.Xr exports 5 .
|
|
|
|
This is done to negate the need for quoting, as well as to make parsing
|
|
|
|
with scripts easier.
|
|
|
|
.Pp
|
2024-07-24 02:38:19 +03:00
|
|
|
For
|
|
|
|
.Fx ,
|
|
|
|
there may be multiple sets of options separated by semicolon(s).
|
|
|
|
Each set of options must apply to different hosts or networks and each
|
|
|
|
set of options will create a separate line for
|
|
|
|
.Xr exports 5 .
|
|
|
|
Any semicolon separated option set that consists entirely of whitespace
|
|
|
|
will be ignored.
|
|
|
|
This use of semicolons is only for
|
|
|
|
.Fx
|
|
|
|
at this time.
|
|
|
|
.Pp
|
2019-11-12 22:17:40 +03:00
|
|
|
See
|
|
|
|
.Xr exports 5
|
2021-05-27 03:46:40 +03:00
|
|
|
for the meaning of the default options.
|
|
|
|
Otherwise, the
|
2019-11-12 22:17:40 +03:00
|
|
|
.Xr exportfs 8
|
|
|
|
command is invoked with options equivalent to the contents of this property.
|
|
|
|
.Pp
|
|
|
|
When the
|
|
|
|
.Sy sharenfs
|
|
|
|
property is changed for a dataset, the dataset and any children inheriting the
|
|
|
|
property are re-shared with the new options, only if the property was previously
|
|
|
|
.Sy off ,
|
|
|
|
or if they were shared before the property was changed.
|
|
|
|
If the new property is
|
|
|
|
.Sy off ,
|
|
|
|
the file systems are unshared.
|
2023-10-03 02:58:54 +03:00
|
|
|
.Pp
|
|
|
|
When the
|
|
|
|
.Sy sharenfs
|
|
|
|
property is updated with
|
|
|
|
.Nm zfs Cm set Fl u
|
|
|
|
, the property is set to desired value, but the operation to share, reshare
|
|
|
|
or unshare the the dataset is not performed.
|
2019-11-12 22:17:40 +03:00
|
|
|
.It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput
|
|
|
|
Provide a hint to ZFS about handling of synchronous requests in this dataset.
|
|
|
|
If
|
|
|
|
.Sy logbias
|
|
|
|
is set to
|
|
|
|
.Sy latency
|
|
|
|
.Pq the default ,
|
|
|
|
ZFS will use pool log devices
|
|
|
|
.Pq if configured
|
|
|
|
to handle the requests at low latency.
|
|
|
|
If
|
|
|
|
.Sy logbias
|
|
|
|
is set to
|
|
|
|
.Sy throughput ,
|
|
|
|
ZFS will not use configured pool log devices.
|
|
|
|
ZFS will instead optimize synchronous operations for global pool throughput and
|
|
|
|
efficient use of resources.
|
|
|
|
.It Sy snapdev Ns = Ns Sy hidden Ns | Ns Sy visible
|
|
|
|
Controls whether the volume snapshot devices under
|
2021-05-27 03:46:40 +03:00
|
|
|
.Pa /dev/zvol/ Ns Aq Ar pool
|
|
|
|
are hidden or visible.
|
|
|
|
The default value is
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy hidden .
|
2024-10-02 19:12:02 +03:00
|
|
|
.It Sy snapdir Ns = Ns Sy disabled Ns | Ns Sy hidden Ns | Ns Sy visible
|
2019-11-12 22:17:40 +03:00
|
|
|
Controls whether the
|
|
|
|
.Pa .zfs
|
2024-10-02 19:12:02 +03:00
|
|
|
directory is disabled, hidden or visible in the root of the file system as
|
|
|
|
discussed in the
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sx Snapshots
|
2019-11-12 22:17:40 +03:00
|
|
|
section of
|
2021-06-04 23:29:26 +03:00
|
|
|
.Xr zfsconcepts 7 .
|
2019-11-12 22:17:40 +03:00
|
|
|
The default value is
|
|
|
|
.Sy hidden .
|
|
|
|
.It Sy sync Ns = Ns Sy standard Ns | Ns Sy always Ns | Ns Sy disabled
|
|
|
|
Controls the behavior of synchronous requests
|
|
|
|
.Pq e.g. fsync, O_DSYNC .
|
|
|
|
.Sy standard
|
2021-05-27 03:46:40 +03:00
|
|
|
is the POSIX-specified behavior of ensuring all synchronous requests
|
|
|
|
are written to stable storage and all devices are flushed to ensure
|
|
|
|
data is not cached by device controllers
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pq this is the default .
|
|
|
|
.Sy always
|
|
|
|
causes every file system transaction to be written and flushed before its
|
|
|
|
system call returns.
|
|
|
|
This has a large performance penalty.
|
|
|
|
.Sy disabled
|
|
|
|
disables synchronous requests.
|
|
|
|
File system transactions are only committed to stable storage periodically.
|
|
|
|
This option will give the highest performance.
|
|
|
|
However, it is very dangerous as ZFS would be ignoring the synchronous
|
|
|
|
transaction demands of applications such as databases or NFS.
|
|
|
|
Administrators should only use this option when the risks are understood.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy version Ns = Ns Ar N Ns | Ns Sy current
|
2019-11-12 22:17:40 +03:00
|
|
|
The on-disk version of this file system, which is independent of the pool
|
|
|
|
version.
|
|
|
|
This property can only be set to later supported versions.
|
|
|
|
See the
|
|
|
|
.Nm zfs Cm upgrade
|
|
|
|
command.
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy volsize Ns = Ns Ar size
|
2019-11-12 22:17:40 +03:00
|
|
|
For volumes, specifies the logical size of the volume.
|
|
|
|
By default, creating a volume establishes a reservation of equal size.
|
|
|
|
For storage pools with a version number of 9 or higher, a
|
|
|
|
.Sy refreservation
|
|
|
|
is set instead.
|
|
|
|
Any changes to
|
|
|
|
.Sy volsize
|
|
|
|
are reflected in an equivalent change to the reservation
|
2021-05-27 03:46:40 +03:00
|
|
|
.Pq or Sy refreservation .
|
2019-11-12 22:17:40 +03:00
|
|
|
The
|
|
|
|
.Sy volsize
|
|
|
|
can only be set to a multiple of
|
|
|
|
.Sy volblocksize ,
|
|
|
|
and cannot be zero.
|
|
|
|
.Pp
|
|
|
|
The reservation is kept equal to the volume's logical size to prevent unexpected
|
|
|
|
behavior for consumers.
|
|
|
|
Without the reservation, the volume could run out of space, resulting 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
|
|
|
|
.Pq particularly when shrinking the size .
|
|
|
|
Extreme care should be used when adjusting the volume size.
|
|
|
|
.Pp
|
|
|
|
Though not recommended, a
|
|
|
|
.Qq sparse volume
|
|
|
|
.Po also known as
|
|
|
|
.Qq thin provisioned
|
|
|
|
.Pc
|
|
|
|
can be created by specifying the
|
|
|
|
.Fl s
|
|
|
|
option to the
|
|
|
|
.Nm zfs Cm create Fl V
|
|
|
|
command, or by changing the value of the
|
|
|
|
.Sy refreservation
|
|
|
|
property
|
|
|
|
.Po or
|
|
|
|
.Sy reservation
|
|
|
|
property on pool version 8 or earlier
|
|
|
|
.Pc
|
|
|
|
after the volume has been created.
|
|
|
|
A
|
|
|
|
.Qq sparse volume
|
|
|
|
is a volume where the value of
|
|
|
|
.Sy refreservation
|
|
|
|
is less than the size of the volume plus the space required to store its
|
|
|
|
metadata.
|
|
|
|
Consequently, writes to a sparse volume can fail with
|
|
|
|
.Er ENOSPC
|
|
|
|
when the pool is low on space.
|
|
|
|
For a sparse volume, changes to
|
|
|
|
.Sy volsize
|
|
|
|
are not reflected in the
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy refreservation .
|
2019-11-12 22:17:40 +03:00
|
|
|
A volume that is not sparse is said to be
|
|
|
|
.Qq thick provisioned .
|
|
|
|
A sparse volume can become thick provisioned by setting
|
|
|
|
.Sy refreservation
|
|
|
|
to
|
|
|
|
.Sy auto .
|
2021-05-27 03:46:40 +03:00
|
|
|
.It Sy volmode Ns = Ns Sy default Ns | Ns Sy full Ns | Ns Sy geom Ns | Ns Sy dev Ns | Ns Sy none
|
2019-11-12 22:17:40 +03:00
|
|
|
This property specifies how volumes should be exposed to the OS.
|
|
|
|
Setting it to
|
|
|
|
.Sy full
|
|
|
|
exposes volumes as fully fledged block devices, providing maximal
|
2021-05-27 03:46:40 +03:00
|
|
|
functionality.
|
|
|
|
The value
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy geom
|
|
|
|
is just an alias for
|
|
|
|
.Sy full
|
|
|
|
and is kept for compatibility.
|
|
|
|
Setting it to
|
|
|
|
.Sy dev
|
|
|
|
hides its partitions.
|
|
|
|
Volumes with property set to
|
|
|
|
.Sy none
|
|
|
|
are not exposed outside ZFS, but can be snapshotted, cloned, replicated, etc,
|
|
|
|
that can be suitable for backup purposes.
|
|
|
|
Value
|
|
|
|
.Sy default
|
|
|
|
means that volumes exposition is controlled by system-wide tunable
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy zvol_volmode ,
|
2019-11-12 22:17:40 +03:00
|
|
|
where
|
|
|
|
.Sy full ,
|
|
|
|
.Sy dev
|
|
|
|
and
|
|
|
|
.Sy none
|
|
|
|
are encoded as 1, 2 and 3 respectively.
|
2021-01-25 02:57:51 +03:00
|
|
|
The default value is
|
2019-11-12 22:17:40 +03:00
|
|
|
.Sy full .
|
|
|
|
.It Sy vscan Ns = Ns Sy on Ns | Ns Sy off
|
|
|
|
Controls whether regular files should be scanned for viruses when a file is
|
|
|
|
opened and closed.
|
|
|
|
In addition to enabling this property, the virus scan service must also be
|
|
|
|
enabled for virus scanning to occur.
|
|
|
|
The default value is
|
|
|
|
.Sy off .
|
2021-05-11 08:02:25 +03:00
|
|
|
This property is not used by OpenZFS.
|
2024-09-23 19:50:48 +03:00
|
|
|
.It Sy xattr Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy dir Ns | Ns Sy sa
|
2021-05-27 03:46:40 +03:00
|
|
|
Controls whether extended attributes are enabled for this file system.
|
2022-02-17 23:30:22 +03:00
|
|
|
Two styles of extended attributes are supported: either directory-based
|
|
|
|
or system-attribute-based.
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pp
|
2024-09-23 19:50:48 +03:00
|
|
|
Directory-based extended attributes can be enabled by setting the value to
|
|
|
|
.Sy dir .
|
2021-05-27 03:46:40 +03:00
|
|
|
This style of extended attribute imposes no practical limit
|
|
|
|
on either the size or number of attributes which can be set on a file.
|
|
|
|
Although under Linux the
|
2019-11-12 22:17:40 +03:00
|
|
|
.Xr getxattr 2
|
|
|
|
and
|
|
|
|
.Xr setxattr 2
|
2022-02-17 23:26:43 +03:00
|
|
|
system calls limit the maximum size to
|
|
|
|
.Sy 64K .
|
2021-05-27 03:46:40 +03:00
|
|
|
This is the most compatible
|
2021-04-29 06:27:57 +03:00
|
|
|
style of extended attribute and is supported by all ZFS implementations.
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pp
|
2022-02-17 23:30:22 +03:00
|
|
|
System-attribute-based xattrs can be enabled by setting the value to
|
2024-09-23 19:50:48 +03:00
|
|
|
.Sy sa
|
|
|
|
(default and equal to
|
|
|
|
.Sy on
|
|
|
|
) .
|
2021-05-27 03:46:40 +03:00
|
|
|
The key advantage of this type of xattr is improved performance.
|
|
|
|
Storing extended attributes as system attributes
|
2022-02-17 23:26:43 +03:00
|
|
|
significantly decreases the amount of disk I/O required.
|
|
|
|
Up to
|
|
|
|
.Sy 64K
|
|
|
|
of data may be stored per-file in the space reserved for system attributes.
|
2021-05-27 03:46:40 +03:00
|
|
|
If there is not enough space available for an extended attribute
|
2022-02-17 23:26:43 +03:00
|
|
|
then it will be automatically written as a directory-based xattr.
|
2022-02-17 23:30:22 +03:00
|
|
|
System-attribute-based extended attributes are not accessible
|
2019-11-12 22:17:40 +03:00
|
|
|
on platforms which do not support the
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy xattr Ns = Ns Sy sa
|
2019-11-12 22:17:40 +03:00
|
|
|
feature.
|
2021-04-29 06:27:57 +03:00
|
|
|
OpenZFS supports
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy xattr Ns = Ns Sy sa
|
|
|
|
on both
|
|
|
|
.Fx
|
|
|
|
and Linux.
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pp
|
2022-02-17 23:30:22 +03:00
|
|
|
The use of system-attribute-based xattrs is strongly encouraged for users of
|
2021-05-27 03:46:40 +03:00
|
|
|
SELinux or POSIX ACLs.
|
|
|
|
Both of these features heavily rely on extended
|
2019-11-12 22:17:40 +03:00
|
|
|
attributes and benefit significantly from the reduced access time.
|
|
|
|
.Pp
|
|
|
|
The values
|
|
|
|
.Sy on
|
|
|
|
and
|
|
|
|
.Sy off
|
|
|
|
are equivalent to the
|
|
|
|
.Sy xattr
|
|
|
|
and
|
|
|
|
.Sy noxattr
|
|
|
|
mount options.
|
2021-03-11 19:42:22 +03:00
|
|
|
.It Sy jailed Ns = Ns Sy off Ns | Ns Sy on
|
2021-05-27 03:46:40 +03:00
|
|
|
Controls whether the dataset is managed from a jail.
|
|
|
|
See
|
|
|
|
.Xr zfs-jail 8
|
|
|
|
for more information.
|
|
|
|
Jails are a
|
|
|
|
.Fx
|
2023-08-26 02:13:43 +03:00
|
|
|
feature and this property is not available on other platforms.
|
|
|
|
.It Sy zoned Ns = Ns Sy off Ns | Ns Sy on
|
2021-02-21 19:19:43 +03:00
|
|
|
Controls whether the dataset is managed from a non-global zone or namespace.
|
2023-08-26 02:13:43 +03:00
|
|
|
See
|
|
|
|
.Xr zfs-zone 8
|
|
|
|
for more information.
|
|
|
|
Zoning is a
|
|
|
|
Linux
|
|
|
|
feature and this property is not available on other platforms.
|
2019-11-12 22:17:40 +03:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The following three properties cannot be changed after the file system is
|
|
|
|
created, and therefore, should be set when the file system is created.
|
|
|
|
If the properties are not set with the
|
|
|
|
.Nm zfs Cm create
|
|
|
|
or
|
|
|
|
.Nm zpool Cm create
|
|
|
|
commands, these properties are inherited from the parent dataset.
|
|
|
|
If the parent dataset lacks these properties due to having been created prior to
|
|
|
|
these features being supported, the new file system will have the default values
|
|
|
|
for these properties.
|
|
|
|
.Bl -tag -width ""
|
|
|
|
.It Xo
|
|
|
|
.Sy casesensitivity Ns = Ns Sy sensitive Ns | Ns
|
|
|
|
.Sy insensitive Ns | Ns Sy mixed
|
|
|
|
.Xc
|
|
|
|
Indicates whether the file name matching algorithm used by the file system
|
|
|
|
should be case-sensitive, case-insensitive, or allow a combination of both
|
|
|
|
styles of matching.
|
|
|
|
The default value for the
|
|
|
|
.Sy casesensitivity
|
|
|
|
property is
|
|
|
|
.Sy sensitive .
|
|
|
|
Traditionally,
|
|
|
|
.Ux
|
2021-05-27 03:46:40 +03:00
|
|
|
and POSIX file systems have case-sensitive file names.
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Sy mixed
|
|
|
|
value for the
|
|
|
|
.Sy casesensitivity
|
|
|
|
property indicates that the file system can support requests for both
|
|
|
|
case-sensitive and case-insensitive matching behavior.
|
|
|
|
Currently, case-insensitive matching behavior on a file system that supports
|
|
|
|
mixed behavior is limited to the SMB server product.
|
|
|
|
For more information about the
|
|
|
|
.Sy mixed
|
|
|
|
value behavior, see the "ZFS Administration Guide".
|
|
|
|
.It Xo
|
|
|
|
.Sy normalization Ns = Ns Sy none Ns | Ns Sy formC Ns | Ns
|
|
|
|
.Sy formD Ns | Ns Sy formKC Ns | Ns Sy formKD
|
|
|
|
.Xc
|
|
|
|
Indicates whether the file system should perform a
|
|
|
|
.Sy unicode
|
|
|
|
normalization of file names whenever two file names are compared, and which
|
|
|
|
normalization algorithm should be used.
|
|
|
|
File names are always stored unmodified, names are normalized as part of any
|
|
|
|
comparison process.
|
|
|
|
If this property is set to a legal value other than
|
|
|
|
.Sy none ,
|
|
|
|
and the
|
|
|
|
.Sy utf8only
|
|
|
|
property was left unspecified, the
|
|
|
|
.Sy utf8only
|
|
|
|
property is automatically set to
|
|
|
|
.Sy on .
|
|
|
|
The default value of the
|
|
|
|
.Sy normalization
|
|
|
|
property is
|
|
|
|
.Sy none .
|
|
|
|
This property cannot be changed after the file system is created.
|
|
|
|
.It Sy utf8only Ns = Ns Sy on Ns | Ns Sy off
|
|
|
|
Indicates whether the file system should reject file names that include
|
|
|
|
characters that are not present in the
|
|
|
|
.Sy UTF-8
|
|
|
|
character code set.
|
|
|
|
If this property is explicitly set to
|
|
|
|
.Sy off ,
|
|
|
|
the normalization property must either not be explicitly set or be set to
|
|
|
|
.Sy none .
|
|
|
|
The default value for the
|
|
|
|
.Sy utf8only
|
|
|
|
property is
|
|
|
|
.Sy off .
|
|
|
|
This property cannot be changed after the file system is created.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Sy casesensitivity ,
|
|
|
|
.Sy normalization ,
|
|
|
|
and
|
|
|
|
.Sy utf8only
|
|
|
|
properties are also new permissions that can be assigned to non-privileged users
|
|
|
|
by using the ZFS delegated administration feature.
|
2021-05-27 03:46:40 +03:00
|
|
|
.
|
|
|
|
.Ss Temporary Mount Point Properties
|
2019-11-12 22:17:40 +03:00
|
|
|
When a file system is mounted, either through
|
|
|
|
.Xr mount 8
|
|
|
|
for legacy mounts or the
|
|
|
|
.Nm zfs Cm mount
|
|
|
|
command for normal file systems, its mount options are set according to its
|
|
|
|
properties.
|
|
|
|
The correlation between properties and mount options is as follows:
|
2021-05-27 03:46:40 +03:00
|
|
|
.Bl -tag -compact -offset Ds -width "rootcontext="
|
|
|
|
.It Sy atime
|
|
|
|
atime/noatime
|
|
|
|
.It Sy canmount
|
|
|
|
auto/noauto
|
|
|
|
.It Sy devices
|
|
|
|
dev/nodev
|
|
|
|
.It Sy exec
|
|
|
|
exec/noexec
|
|
|
|
.It Sy readonly
|
|
|
|
ro/rw
|
|
|
|
.It Sy relatime
|
|
|
|
relatime/norelatime
|
|
|
|
.It Sy setuid
|
|
|
|
suid/nosuid
|
|
|
|
.It Sy xattr
|
|
|
|
xattr/noxattr
|
|
|
|
.It Sy nbmand
|
|
|
|
mand/nomand
|
|
|
|
.It Sy context Ns =
|
|
|
|
context=
|
|
|
|
.It Sy fscontext Ns =
|
|
|
|
fscontext=
|
|
|
|
.It Sy defcontext Ns =
|
|
|
|
defcontext=
|
|
|
|
.It Sy rootcontext Ns =
|
|
|
|
rootcontext=
|
|
|
|
.El
|
2019-11-12 22:17:40 +03:00
|
|
|
.Pp
|
|
|
|
In addition, these options can be set on a per-mount basis using the
|
|
|
|
.Fl o
|
|
|
|
option, without affecting the property that is stored on disk.
|
|
|
|
The values specified on the command line override the values stored in the
|
|
|
|
dataset.
|
|
|
|
The
|
|
|
|
.Sy nosuid
|
|
|
|
option is an alias for
|
2021-05-27 03:46:40 +03:00
|
|
|
.Sy nodevices , Ns Sy nosetuid .
|
2019-11-12 22:17:40 +03:00
|
|
|
These properties are reported as
|
|
|
|
.Qq temporary
|
|
|
|
by the
|
|
|
|
.Nm zfs Cm get
|
|
|
|
command.
|
|
|
|
If the properties are changed while the dataset is mounted, the new setting
|
|
|
|
overrides any temporary settings.
|
2021-05-27 03:46:40 +03:00
|
|
|
.
|
|
|
|
.Ss User Properties
|
2019-11-12 22:17:40 +03:00
|
|
|
In addition to the standard native properties, ZFS supports arbitrary user
|
|
|
|
properties.
|
|
|
|
User properties have no effect on ZFS behavior, but applications or
|
|
|
|
administrators can use them to annotate datasets
|
|
|
|
.Pq file systems, volumes, and snapshots .
|
|
|
|
.Pp
|
|
|
|
User property names must contain a colon
|
|
|
|
.Pq Qq Sy \&:
|
|
|
|
character to distinguish them from native properties.
|
|
|
|
They may contain lowercase letters, numbers, and the following punctuation
|
|
|
|
characters: colon
|
|
|
|
.Pq Qq Sy \&: ,
|
|
|
|
dash
|
|
|
|
.Pq Qq Sy - ,
|
|
|
|
period
|
|
|
|
.Pq Qq Sy \&. ,
|
|
|
|
and underscore
|
|
|
|
.Pq Qq Sy _ .
|
|
|
|
The expected convention is that the property name is divided into two portions
|
|
|
|
such as
|
2021-05-27 03:46:40 +03:00
|
|
|
.Ar module : Ns Ar property ,
|
2019-11-12 22:17:40 +03:00
|
|
|
but this namespace is not enforced by ZFS.
|
|
|
|
User property names can be at most 256 characters, and cannot begin with a dash
|
|
|
|
.Pq Qq Sy - .
|
|
|
|
.Pp
|
|
|
|
When making programmatic use of user properties, it is strongly suggested to use
|
2021-05-27 03:46:40 +03:00
|
|
|
a reversed DNS domain name for the
|
|
|
|
.Ar module
|
2019-11-12 22:17:40 +03:00
|
|
|
component of property names to reduce the chance that two
|
|
|
|
independently-developed packages use the same property name for different
|
|
|
|
purposes.
|
|
|
|
.Pp
|
|
|
|
The values of user properties are arbitrary strings, are always inherited, and
|
|
|
|
are never validated.
|
|
|
|
All of the commands that operate on properties
|
|
|
|
.Po Nm zfs Cm list ,
|
|
|
|
.Nm zfs Cm get ,
|
|
|
|
.Nm zfs Cm set ,
|
|
|
|
and so forth
|
|
|
|
.Pc
|
|
|
|
can be used to manipulate both native properties and user properties.
|
|
|
|
Use the
|
|
|
|
.Nm zfs Cm inherit
|
|
|
|
command to clear a user property.
|
|
|
|
If the property is not defined in any parent dataset, it is removed entirely.
|
|
|
|
Property values are limited to 8192 bytes.
|