home | help
ZFS-SET(1)		     General Commands Manual		      ZFS-SET(1)

NAME
     zfs-set -- terminal UI and CLI for ZFS dataset properties

SYNOPSIS
     zfs-set [dataset]
     zfs-set -list [-local] [-json] [dataset]
     zfs-set -get property[,...] [-json] [dataset]
     zfs-set -set property=value [-set ...] [-r] [-u] [-n | -y | -check]
	     [dataset]
     zfs-set -inherit property [-inherit ...] [-S] [-r] [-n | -y | -check]
	     [dataset]
     zfs-set -tree property [-json] [dataset]
     zfs-set -where property [-json]
     zfs-set -dump [-r] [dataset]
     zfs-set -restore file [-n | -y | -check]
     zfs-set -catalogue [-json]
     zfs-set -describe property [-json]
     zfs-set -version

DESCRIPTION
     zfs-set  is  a  front-end for zfs-get(8), zfs-set(8) and zfs-inherit(8): it
     shows every property of a dataset with its value and where the value  comes
     from, explains each one, lets you change them through a list of the allowed
     values  or  a validated text field, and turns the edits into the exact `zfs
     set' and `zfs inherit' commands, shown for review before  they  run.   Pre-
     flight checks point out what zfs will refuse (a quota below the used space,
     a	volsize  that  is not a multiple of volblocksize, a pool feature not en-
     abled, a property the dataset type does not have) and what the  change  im-
     plies  (a	mount  point change unmounts and remounts, canmount=off unmounts
     now, compression and checksum only affect new data,  sync=disabled  is  un-
     safe, Linux-only properties do nothing on FreeBSD).

     Without options zfs-set starts the interactive editor on dataset; without a
     dataset  it  first shows a picker of every file system and volume, with the
     dataset of the current directory preselected.  The options  below	are  the
     non-interactive  modes,  for  scripts  and  configuration management; there
     dataset defaults to the one the current directory	is  on.   dataset  is  a
     dataset  name,  or  a  path on a ZFS file system (the dataset holding it is
     used).

   Model
     Every property has a value and a source:
     local	       set on the dataset itself with `zfs set';
     received	       set by `zfs receive'; a later `zfs set' makes the  source
		       local  but  keeps  the  received  value	around, and `zfs
		       inherit -S' reverts to it;
     inherited from X  the nearest ancestor that sets it;
     default	       nobody sets it;
     temporary	       a mount option overrides it until the next remount;
     -		       a statistic, or not applicable.

     Properties are inherited down the dataset tree when they  are  inheritable;
     the  others  (quota,  reservation,  canmount, the limits, volsize a|) apply
     only where they are set.  `zfs inherit' refuses to clear those: zfs-set re-
     sets them with `zfs inherit -S', which goes back to the received  value  if
     there is one and otherwise to the default.

     Read-only statistics and the properties fixed at creation (casesensitivity,
     normalization,  utf8only, encryption, keyformat, pbkdf2iters, volblocksize)
     are listed but  cannot  be  edited.   Per-key  properties	(userquota@USER,
     groupquota@GROUP, projectquota@ID and the object-count variants) are not in
     `zfs  get	all':  add them with a interactively, or name them with -get and
     -set.

   Interactive keys
     enter, e	  edit the property: set a value, inherit, or revert to the  re-
		  ceived value
     i		  inherit: clear the value set here (pending)
     S		  revert to the received value (pending, `zfs inherit -S')
     a		  add	a   user   property   (module:name)  or  a  per-key  one
		  (userquota@NAME) a|
     d		  drop the pending edit of the property
     A		  apply: show the commands and the pre-flight  notes,  then  run
		  them
     u, r	  undo the last edit; reload from the kernel
     t		  the property up and down the tree: its value on every ancestor
		  and on every descendant that overrides it
     /		  filter by name or description
     l		  only the properties set on this dataset
     x		  show the properties that do nothing on FreeBSD
     D		  switch dataset
     q, esc	  back	to the dataset list when the session started there, oth-
		  erwise quit
     ?, h	  help, key list

     In the editor ^a/^a move between the action, the values, the options and  the
     buttons,  space  selects  or  toggles, enter on a value selects it and con-
     firms, on the text field confirms, ctrl+s confirms and esc cancels.   On  a
     text  field  the  value  the  dataset has is filled in: typing replaces it,
     while ^a/^a, home/end, backspace and the usual editing keys work  inside  it.
     Long  value  lists (compression) open a filterable picker.  The options are
     "the children inherit it too" (`zfs inherit -r  property  on  each  child')
     and,  for	mountpoint,  sharenfs  and  sharesmb, "change the property only"
     (`zfs set -u').

OPTIONS
     -list   Print every property of the dataset in  catalogue	order  with  its
	     value, its source and its meaning.  With -local only the properties
	     set on the dataset itself (local or received).

     -get property[,...]
	     Print  the  named	properties with their source, received value and
	     meaning.	Aliases  (compress,  avail)   a|   and	 per-key   names
	     (userquota@bob) are accepted.

     -set property=value
	     Set  the property; may be repeated.  The value is validated against
	     the catalogue before anything runs.  With -r the  children  inherit
	     the new value too (`zfs inherit -r property on each child, clearing
	     what  they  had');  with  -u  mountpoint, sharenfs and sharesmb are
	     changed without mounting or sharing (`zfs set -u').

     -inherit property
	     Clear the property on the dataset so it is inherited or reverts  to
	     the default; may be repeated.  With -S revert to the received value
	     (`zfs  inherit  -S'); with -r on every descendant too (`zfs inherit
	     -r').

     -n      Print the `zfs' commands and the pre-flight notes	without  running
	     them.

     -y      Run the commands without asking.

     -check  Dry  run  that  exits  3  if anything would change and 0 if nothing
	     would.

     -tree property
	     Show the property on every ancestor down to  the  dataset,  and  on
	     every descendant that sets it itself.

     -where property
	     List every file system and volume on the system that sets the prop-
	     erty itself, with the value.

     -dump   Print  a  JSON  snapshot  of the properties the dataset sets itself
	     (local and received); with -r of every descendant too.

     -restore file
	     Bring every dataset recorded  in  a  -dump  snapshot  back  to  it:
	     recorded  values  are set where they differ, values set locally but
	     not recorded are inherited.  Datasets  that  no  longer  exist  are
	     skipped with a warning.  -n, -y and -check apply.

     -catalogue
	     Print  every  native  property  with its kind (settable, read-only,
	     creation-only) and meaning, by group.

     -describe property
	     Print everything about one property: meaning, default, values  with
	     their meaning, pool feature, whether it is inherited.

     -json   JSON  output  for -list, -get, -tree, -where, -catalogue, -describe
	     and -n.

     -lenient
	     Accept property names that  are  not  in  the  catalogue  (a  newer
	     OpenZFS may know more).

     -version
	     Print the version and exit.

EXIT STATUS
     0	on  success;  1 on error (including a refused `zfs command'); 2 when the
     confirmation was declined; 3 when -check found pending changes.

EXAMPLES
     Preview the commands that switch a subtree to zstd, including the	datasets
     below that had their own compression setting:

	   $ zfs-set -set compression=zstd -r -n tank/home
	   zfs set compression=zstd tank/home
	   zfs inherit -r compression tank/home/alice
	   zfs inherit -r compression tank/home/bob
	   note: compression affects only data written from now on; existing blocks keep the old lz4

     Move a mount point without mounting anything yet, and see what it implies:

	   # zfs-set -set mountpoint=/export/home -u -y tank/home

     Keep the properties of a subtree under configuration management:

	   # zfs-set -dump -r tank/home > props.json
	   # zfs-set -restore props.json -check || zfs-set -restore props.json -y

     Which datasets set atime themselves, and what does sync=disabled mean:

	   $ zfs-set -where atime
	   $ zfs-set -describe sync

SEE ALSO
     facl(1),  zfs-allow(1),  zpool-set(1), zfsprops(7), zfs(8), zfs-inherit(8),
     zfs-set(8)

CAVEATS
     `zfs set' is not recursive; the "children inherit" option is  `zfs  inherit
     -r' on each child, which clears whatever they had set themselves.

     Changing  mountpoint  unmounts and remounts the file system and every child
     that inherits it; a busy file system makes it fail.  canmount=off	unmounts
     now, readonly=on applies immediately to a mounted file system.

     sharesmb, the SELinux contexts, nbmand, vscan, mlslabel and volthreading do
     nothing  on  FreeBSD;  acltype=posix behaves as off.  The catalogue follows
     OpenZFS 2.4; an unknown property  is  still  shown  and  can  be  set  with
     -lenient.

FreeBSD ports 15.quarterly	 August 23, 2026		      ZFS-SET(1)

home | help