1eda14cbcSMatt Macy.\" 2eda14cbcSMatt Macy.\" CDDL HEADER START 3eda14cbcSMatt Macy.\" 4eda14cbcSMatt Macy.\" The contents of this file are subject to the terms of the 5eda14cbcSMatt Macy.\" Common Development and Distribution License (the "License"). 6eda14cbcSMatt Macy.\" You may not use this file except in compliance with the License. 7eda14cbcSMatt Macy.\" 8eda14cbcSMatt Macy.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9eda14cbcSMatt Macy.\" or http://www.opensolaris.org/os/licensing. 10eda14cbcSMatt Macy.\" See the License for the specific language governing permissions 11eda14cbcSMatt Macy.\" and limitations under the License. 12eda14cbcSMatt Macy.\" 13eda14cbcSMatt Macy.\" When distributing Covered Code, include this CDDL HEADER in each 14eda14cbcSMatt Macy.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15eda14cbcSMatt Macy.\" If applicable, add the following below this CDDL HEADER, with the 16eda14cbcSMatt Macy.\" fields enclosed by brackets "[]" replaced with your own identifying 17eda14cbcSMatt Macy.\" information: Portions Copyright [yyyy] [name of copyright owner] 18eda14cbcSMatt Macy.\" 19eda14cbcSMatt Macy.\" CDDL HEADER END 20eda14cbcSMatt Macy.\" 21eda14cbcSMatt Macy.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. 22eda14cbcSMatt Macy.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> 23eda14cbcSMatt Macy.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. 24eda14cbcSMatt Macy.\" Copyright (c) 2011, Pawel Jakub Dawidek <pjd@FreeBSD.org> 25eda14cbcSMatt Macy.\" Copyright (c) 2012, Glen Barber <gjb@FreeBSD.org> 26eda14cbcSMatt Macy.\" Copyright (c) 2012, Bryan Drewery <bdrewery@FreeBSD.org> 27eda14cbcSMatt Macy.\" Copyright (c) 2013, Steven Hartland <smh@FreeBSD.org> 28eda14cbcSMatt Macy.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. 29eda14cbcSMatt Macy.\" Copyright (c) 2014, Joyent, Inc. All rights reserved. 30eda14cbcSMatt Macy.\" Copyright (c) 2014 by Adam Stevko. All rights reserved. 31eda14cbcSMatt Macy.\" Copyright (c) 2014 Integros [integros.com] 32eda14cbcSMatt Macy.\" Copyright (c) 2014, Xin LI <delphij@FreeBSD.org> 33eda14cbcSMatt Macy.\" Copyright (c) 2014-2015, The FreeBSD Foundation, All Rights Reserved. 34eda14cbcSMatt Macy.\" Copyright (c) 2016 Nexenta Systems, Inc. All Rights Reserved. 35eda14cbcSMatt Macy.\" Copyright 2019 Richard Laager. All rights reserved. 36eda14cbcSMatt Macy.\" Copyright 2018 Nexenta Systems, Inc. 37eda14cbcSMatt Macy.\" Copyright 2019 Joyent, Inc. 38eda14cbcSMatt Macy.\" 39716fd348SMartin Matuska.Dd May 12, 2022 40eda14cbcSMatt Macy.Dt ZFS 8 41eda14cbcSMatt Macy.Os 4216038816SMartin Matuska. 43eda14cbcSMatt Macy.Sh NAME 44eda14cbcSMatt Macy.Nm zfs 4516038816SMartin Matuska.Nd configure ZFS datasets 46eda14cbcSMatt Macy.Sh SYNOPSIS 47eda14cbcSMatt Macy.Nm 48eda14cbcSMatt Macy.Fl ?V 49eda14cbcSMatt Macy.Nm 50eda14cbcSMatt Macy.Cm version 51eda14cbcSMatt Macy.Nm 5216038816SMartin Matuska.Cm subcommand 5316038816SMartin Matuska.Op Ar arguments 5416038816SMartin Matuska. 55eda14cbcSMatt Macy.Sh DESCRIPTION 56eda14cbcSMatt MacyThe 57eda14cbcSMatt Macy.Nm 58eda14cbcSMatt Macycommand configures ZFS datasets within a ZFS storage pool, as described in 59eda14cbcSMatt Macy.Xr zpool 8 . 60716fd348SMartin MatuskaA dataset is identified by a unique path within the ZFS namespace: 61eda14cbcSMatt Macy.Pp 62716fd348SMartin Matuska.D1 Ar pool Ns Oo Sy / Ns Ar component Oc Ns Sy / Ns Ar component 63716fd348SMartin Matuska.Pp 64716fd348SMartin Matuskafor example: 65716fd348SMartin Matuska.Pp 66716fd348SMartin Matuska.Dl rpool/var/log 67716fd348SMartin Matuska.Pp 68716fd348SMartin MatuskaThe maximum length of a dataset name is 69716fd348SMartin Matuska.Sy ZFS_MAX_DATASET_NAME_LEN No - 1 70716fd348SMartin MatuskaASCII characters (currently 255) satisfying 71716fd348SMartin Matuska.Sy [A-Za-z_.:/ -] . 72716fd348SMartin MatuskaAdditionally snapshots are allowed to contain a single 73716fd348SMartin Matuska.Sy @ 74716fd348SMartin Matuskacharacter, while bookmarks are allowed to contain a single 75716fd348SMartin Matuska.Sy # 76716fd348SMartin Matuskacharacter. 77716fd348SMartin Matuska.Sy / 78716fd348SMartin Matuskais used as separator between components. 79716fd348SMartin MatuskaThe maximum amount of nesting allowed in a path is 80716fd348SMartin Matuska.Sy zfs_max_dataset_nesting 81716fd348SMartin Matuskalevels deep. 82716fd348SMartin MatuskaZFS tunables 83716fd348SMartin Matuska.Pq Sy zfs_* 84716fd348SMartin Matuskaare explained in 85716fd348SMartin Matuska.Xr zfs 4 . 86eda14cbcSMatt Macy.Pp 87eda14cbcSMatt MacyA dataset can be one of the following: 8816038816SMartin Matuska.Bl -tag -offset Ds -width "file system" 89eda14cbcSMatt Macy.It Sy file system 9016038816SMartin MatuskaCan be mounted within the standard system namespace and behaves like other file 91eda14cbcSMatt Macysystems. 9216038816SMartin MatuskaWhile ZFS file systems are designed to be POSIX-compliant, known issues exist 93eda14cbcSMatt Macythat prevent compliance in some cases. 94eda14cbcSMatt MacyApplications that depend on standards conformance might fail due to non-standard 95eda14cbcSMatt Macybehavior when checking file system free space. 96eda14cbcSMatt Macy.It Sy volume 97eda14cbcSMatt MacyA logical volume exported as a raw or block device. 98eda14cbcSMatt MacyThis type of dataset should only be used when a block device is required. 99eda14cbcSMatt MacyFile systems are typically used in most environments. 100eda14cbcSMatt Macy.It Sy snapshot 101eda14cbcSMatt MacyA read-only version of a file system or volume at a given point in time. 102eda14cbcSMatt MacyIt is specified as 103eda14cbcSMatt Macy.Ar filesystem Ns @ Ns Ar name 104eda14cbcSMatt Macyor 105eda14cbcSMatt Macy.Ar volume Ns @ Ns Ar name . 106eda14cbcSMatt Macy.It Sy bookmark 107eda14cbcSMatt MacyMuch like a 108eda14cbcSMatt Macy.Sy snapshot , 109eda14cbcSMatt Macybut without the hold on on-disk data. 11016038816SMartin MatuskaIt can be used as the source of a send (but not for a receive). 11116038816SMartin MatuskaIt is specified as 112eda14cbcSMatt Macy.Ar filesystem Ns # Ns Ar name 113eda14cbcSMatt Macyor 114eda14cbcSMatt Macy.Ar volume Ns # Ns Ar name . 115eda14cbcSMatt Macy.El 116eda14cbcSMatt Macy.Pp 11716038816SMartin MatuskaSee 1183ff01b23SMartin Matuska.Xr zfsconcepts 7 11916038816SMartin Matuskafor details. 12016038816SMartin Matuska. 121eda14cbcSMatt Macy.Ss Properties 12216038816SMartin MatuskaProperties are divided into two types: native properties and user-defined 12316038816SMartin Matuska.Pq or Qq user 124eda14cbcSMatt Macyproperties. 125eda14cbcSMatt MacyNative properties either export internal statistics or control ZFS behavior. 126eda14cbcSMatt MacyIn addition, native properties are either editable or read-only. 127eda14cbcSMatt MacyUser properties have no effect on ZFS behavior, but you can use them to annotate 128eda14cbcSMatt Macydatasets in a way that is meaningful in your environment. 12916038816SMartin MatuskaFor more information about properties, see 1303ff01b23SMartin Matuska.Xr zfsprops 7 . 13116038816SMartin Matuska. 132eda14cbcSMatt Macy.Ss Encryption 133eda14cbcSMatt MacyEnabling the 134eda14cbcSMatt Macy.Sy encryption 135eda14cbcSMatt Macyfeature allows for the creation of encrypted filesystems and volumes. 136eda14cbcSMatt MacyZFS will encrypt file and zvol data, file attributes, ACLs, permission bits, 137eda14cbcSMatt Macydirectory listings, FUID mappings, and 13816038816SMartin Matuska.Sy userused Ns / Ns Sy groupused Ns / Ns Sy projectused 139eda14cbcSMatt Macydata. 14016038816SMartin MatuskaFor an overview of encryption, see 14116038816SMartin Matuska.Xr zfs-load-key 8 . 14216038816SMartin Matuska. 143eda14cbcSMatt Macy.Sh SUBCOMMANDS 144eda14cbcSMatt MacyAll subcommands that modify state are logged persistently to the pool in their 145eda14cbcSMatt Macyoriginal form. 146eda14cbcSMatt Macy.Bl -tag -width "" 147eda14cbcSMatt Macy.It Nm Fl ? 148eda14cbcSMatt MacyDisplays a help message. 149eda14cbcSMatt Macy.It Xo 150eda14cbcSMatt Macy.Nm 151eda14cbcSMatt Macy.Fl V , -version 152eda14cbcSMatt Macy.Xc 153eda14cbcSMatt Macy.It Xo 154eda14cbcSMatt Macy.Nm 155eda14cbcSMatt Macy.Cm version 156eda14cbcSMatt Macy.Xc 157eda14cbcSMatt MacyDisplays the software version of the 158eda14cbcSMatt Macy.Nm 159eda14cbcSMatt Macyuserland utility and the zfs kernel module. 160eda14cbcSMatt Macy.El 16116038816SMartin Matuska. 162eda14cbcSMatt Macy.Ss Dataset Management 163eda14cbcSMatt Macy.Bl -tag -width "" 164eda14cbcSMatt Macy.It Xr zfs-list 8 165eda14cbcSMatt MacyLists the property information for the given datasets in tabular form. 166eda14cbcSMatt Macy.It Xr zfs-create 8 167eda14cbcSMatt MacyCreates a new ZFS file system or volume. 168eda14cbcSMatt Macy.It Xr zfs-destroy 8 169eda14cbcSMatt MacyDestroys the given dataset(s), snapshot(s), or bookmark. 170eda14cbcSMatt Macy.It Xr zfs-rename 8 171eda14cbcSMatt MacyRenames the given dataset (filesystem or snapshot). 172eda14cbcSMatt Macy.It Xr zfs-upgrade 8 173eda14cbcSMatt MacyManage upgrading the on-disk version of filesystems. 174eda14cbcSMatt Macy.El 17516038816SMartin Matuska. 176eda14cbcSMatt Macy.Ss Snapshots 177eda14cbcSMatt Macy.Bl -tag -width "" 178eda14cbcSMatt Macy.It Xr zfs-snapshot 8 179eda14cbcSMatt MacyCreates snapshots with the given names. 180eda14cbcSMatt Macy.It Xr zfs-rollback 8 181eda14cbcSMatt MacyRoll back the given dataset to a previous snapshot. 18216038816SMartin Matuska.It Xr zfs-hold 8 Ns / Ns Xr zfs-release 8 183eda14cbcSMatt MacyAdd or remove a hold reference to the specified snapshot or snapshots. 184eda14cbcSMatt MacyIf a hold exists on a snapshot, attempts to destroy that snapshot by using the 185eda14cbcSMatt Macy.Nm zfs Cm destroy 186eda14cbcSMatt Macycommand return 18716038816SMartin Matuska.Sy EBUSY . 188eda14cbcSMatt Macy.It Xr zfs-diff 8 189eda14cbcSMatt MacyDisplay the difference between a snapshot of a given filesystem and another 190eda14cbcSMatt Macysnapshot of that filesystem from a later time or the current contents of the 191eda14cbcSMatt Macyfilesystem. 192eda14cbcSMatt Macy.El 19316038816SMartin Matuska. 194eda14cbcSMatt Macy.Ss Clones 195eda14cbcSMatt Macy.Bl -tag -width "" 196eda14cbcSMatt Macy.It Xr zfs-clone 8 197eda14cbcSMatt MacyCreates a clone of the given snapshot. 198eda14cbcSMatt Macy.It Xr zfs-promote 8 199eda14cbcSMatt MacyPromotes a clone file system to no longer be dependent on its 200eda14cbcSMatt Macy.Qq origin 201eda14cbcSMatt Macysnapshot. 202eda14cbcSMatt Macy.El 20316038816SMartin Matuska. 204eda14cbcSMatt Macy.Ss Send & Receive 205eda14cbcSMatt Macy.Bl -tag -width "" 206eda14cbcSMatt Macy.It Xr zfs-send 8 207eda14cbcSMatt MacyGenerate a send stream, which may be of a filesystem, and may be incremental 208eda14cbcSMatt Macyfrom a bookmark. 209eda14cbcSMatt Macy.It Xr zfs-receive 8 210eda14cbcSMatt MacyCreates a snapshot whose contents are as specified in the stream provided on 211eda14cbcSMatt Macystandard input. 212eda14cbcSMatt MacyIf a full stream is received, then a new file system is created as well. 213eda14cbcSMatt MacyStreams are created using the 214eda14cbcSMatt Macy.Xr zfs-send 8 215eda14cbcSMatt Macysubcommand, which by default creates a full stream. 216eda14cbcSMatt Macy.It Xr zfs-bookmark 8 217eda14cbcSMatt MacyCreates a new bookmark of the given snapshot or bookmark. 218eda14cbcSMatt MacyBookmarks mark the point in time when the snapshot was created, and can be used 219eda14cbcSMatt Macyas the incremental source for a 220eda14cbcSMatt Macy.Nm zfs Cm send 221eda14cbcSMatt Macycommand. 222eda14cbcSMatt Macy.It Xr zfs-redact 8 223eda14cbcSMatt MacyGenerate a new redaction bookmark. 224eda14cbcSMatt MacyThis feature can be used to allow clones of a filesystem to be made available on 225eda14cbcSMatt Macya remote system, in the case where their parent need not (or needs to not) be 226eda14cbcSMatt Macyusable. 227eda14cbcSMatt Macy.El 22816038816SMartin Matuska. 229eda14cbcSMatt Macy.Ss Properties 230eda14cbcSMatt Macy.Bl -tag -width "" 231eda14cbcSMatt Macy.It Xr zfs-get 8 232eda14cbcSMatt MacyDisplays properties for the given datasets. 233eda14cbcSMatt Macy.It Xr zfs-set 8 234eda14cbcSMatt MacySets the property or list of properties to the given value(s) for each dataset. 235eda14cbcSMatt Macy.It Xr zfs-inherit 8 236eda14cbcSMatt MacyClears the specified property, causing it to be inherited from an ancestor, 237eda14cbcSMatt Macyrestored to default if no ancestor has the property set, or with the 238eda14cbcSMatt Macy.Fl S 239eda14cbcSMatt Macyoption reverted to the received value if one exists. 240eda14cbcSMatt Macy.El 24116038816SMartin Matuska. 242eda14cbcSMatt Macy.Ss Quotas 243eda14cbcSMatt Macy.Bl -tag -width "" 24416038816SMartin Matuska.It Xr zfs-userspace 8 Ns / Ns Xr zfs-groupspace 8 Ns / Ns Xr zfs-projectspace 8 245eda14cbcSMatt MacyDisplays space consumed by, and quotas on, each user, group, or project 246eda14cbcSMatt Macyin the specified filesystem or snapshot. 247eda14cbcSMatt Macy.It Xr zfs-project 8 248716fd348SMartin MatuskaList, set, or clear project ID and/or inherit flag on the files or directories. 249eda14cbcSMatt Macy.El 25016038816SMartin Matuska. 251eda14cbcSMatt Macy.Ss Mountpoints 252eda14cbcSMatt Macy.Bl -tag -width "" 253eda14cbcSMatt Macy.It Xr zfs-mount 8 254eda14cbcSMatt MacyDisplays all ZFS file systems currently mounted, or mount ZFS filesystem 255eda14cbcSMatt Macyon a path described by its 256eda14cbcSMatt Macy.Sy mountpoint 257eda14cbcSMatt Macyproperty. 258eda14cbcSMatt Macy.It Xr zfs-unmount 8 259eda14cbcSMatt MacyUnmounts currently mounted ZFS file systems. 260eda14cbcSMatt Macy.El 26116038816SMartin Matuska. 262eda14cbcSMatt Macy.Ss Shares 263eda14cbcSMatt Macy.Bl -tag -width "" 264eda14cbcSMatt Macy.It Xr zfs-share 8 265eda14cbcSMatt MacyShares available ZFS file systems. 266eda14cbcSMatt Macy.It Xr zfs-unshare 8 267eda14cbcSMatt MacyUnshares currently shared ZFS file systems. 268eda14cbcSMatt Macy.El 26916038816SMartin Matuska. 270eda14cbcSMatt Macy.Ss Delegated Administration 271eda14cbcSMatt Macy.Bl -tag -width "" 272eda14cbcSMatt Macy.It Xr zfs-allow 8 273eda14cbcSMatt MacyDelegate permissions on the specified filesystem or volume. 274eda14cbcSMatt Macy.It Xr zfs-unallow 8 275eda14cbcSMatt MacyRemove delegated permissions on the specified filesystem or volume. 276eda14cbcSMatt Macy.El 27716038816SMartin Matuska. 278eda14cbcSMatt Macy.Ss Encryption 279eda14cbcSMatt Macy.Bl -tag -width "" 280eda14cbcSMatt Macy.It Xr zfs-change-key 8 281eda14cbcSMatt MacyAdd or change an encryption key on the specified dataset. 282eda14cbcSMatt Macy.It Xr zfs-load-key 8 283eda14cbcSMatt MacyLoad the key for the specified encrypted dataset, enabling access. 284eda14cbcSMatt Macy.It Xr zfs-unload-key 8 285716fd348SMartin MatuskaUnload a key for the specified dataset, 286716fd348SMartin Matuskaremoving the ability to access the dataset. 287eda14cbcSMatt Macy.El 28816038816SMartin Matuska. 289eda14cbcSMatt Macy.Ss Channel Programs 290eda14cbcSMatt Macy.Bl -tag -width "" 291eda14cbcSMatt Macy.It Xr zfs-program 8 292eda14cbcSMatt MacyExecute ZFS administrative operations 293eda14cbcSMatt Macyprogrammatically via a Lua script-language channel program. 294eda14cbcSMatt Macy.El 29516038816SMartin Matuska. 296eda14cbcSMatt Macy.Ss Jails 297eda14cbcSMatt Macy.Bl -tag -width "" 298eda14cbcSMatt Macy.It Xr zfs-jail 8 299eda14cbcSMatt MacyAttaches a filesystem to a jail. 300eda14cbcSMatt Macy.It Xr zfs-unjail 8 301eda14cbcSMatt MacyDetaches a filesystem from a jail. 302eda14cbcSMatt Macy.El 30316038816SMartin Matuska. 304eda14cbcSMatt Macy.Ss Waiting 305eda14cbcSMatt Macy.Bl -tag -width "" 306eda14cbcSMatt Macy.It Xr zfs-wait 8 307eda14cbcSMatt MacyWait for background activity in a filesystem to complete. 308eda14cbcSMatt Macy.El 30916038816SMartin Matuska. 310eda14cbcSMatt Macy.Sh EXIT STATUS 311eda14cbcSMatt MacyThe 312eda14cbcSMatt Macy.Nm 31316038816SMartin Matuskautility exits 31416038816SMartin Matuska.Sy 0 31516038816SMartin Matuskaon success, 31616038816SMartin Matuska.Sy 1 31716038816SMartin Matuskaif an error occurs, and 31816038816SMartin Matuska.Sy 2 31916038816SMartin Matuskaif invalid command line options were specified. 32016038816SMartin Matuska. 321eda14cbcSMatt Macy.Sh EXAMPLES 322da5137abSMartin Matuska.\" Examples 1, 4, 6, 7, 11, 14, 16 are shared with zfs-set.8. 323da5137abSMartin Matuska.\" Examples 1, 10 are shared with zfs-create.8. 324da5137abSMartin Matuska.\" Examples 2, 3, 10, 15 are also shared with zfs-snapshot.8. 325da5137abSMartin Matuska.\" Examples 3, 10, 15 are shared with zfs-destroy.8. 326da5137abSMartin Matuska.\" Examples 5 are shared with zfs-list.8. 327da5137abSMartin Matuska.\" Examples 8 are shared with zfs-rollback.8. 328da5137abSMartin Matuska.\" Examples 9, 10 are shared with zfs-clone.8. 329da5137abSMartin Matuska.\" Examples 10 are also shared with zfs-promote.8. 330da5137abSMartin Matuska.\" Examples 10, 15 also are shared with zfs-rename.8. 331da5137abSMartin Matuska.\" Examples 12, 13 are shared with zfs-send.8. 332da5137abSMartin Matuska.\" Examples 12, 13 are also shared with zfs-receive.8. 333da5137abSMartin Matuska.\" Examples 17, 18, 19, 20, 21 are shared with zfs-allow.8. 334da5137abSMartin Matuska.\" Examples 22 are shared with zfs-diff.8. 335da5137abSMartin Matuska.\" Examples 23 are shared with zfs-bookmark.8. 336da5137abSMartin Matuska.\" Make sure to update them omnidirectionally 337da5137abSMartin Matuska.Ss Example 1 : No Creating a ZFS File System Hierarchy 338eda14cbcSMatt MacyThe following commands create a file system named 33916038816SMartin Matuska.Ar pool/home 340eda14cbcSMatt Macyand a file system named 34116038816SMartin Matuska.Ar pool/home/bob . 342eda14cbcSMatt MacyThe mount point 343eda14cbcSMatt Macy.Pa /export/home 344eda14cbcSMatt Macyis set for the parent file system, and is automatically inherited by the child 345eda14cbcSMatt Macyfile system. 34616038816SMartin Matuska.Dl # Nm zfs Cm create Ar pool/home 34716038816SMartin Matuska.Dl # Nm zfs Cm set Sy mountpoint Ns = Ns Ar /export/home pool/home 34816038816SMartin Matuska.Dl # Nm zfs Cm create Ar pool/home/bob 34916038816SMartin Matuska. 350da5137abSMartin Matuska.Ss Example 2 : No Creating a ZFS Snapshot 351eda14cbcSMatt MacyThe following command creates a snapshot named 35216038816SMartin Matuska.Ar yesterday . 353eda14cbcSMatt MacyThis snapshot is mounted on demand in the 354eda14cbcSMatt Macy.Pa .zfs/snapshot 355eda14cbcSMatt Macydirectory at the root of the 35616038816SMartin Matuska.Ar pool/home/bob 357eda14cbcSMatt Macyfile system. 35816038816SMartin Matuska.Dl # Nm zfs Cm snapshot Ar pool/home/bob Ns @ Ns Ar yesterday 35916038816SMartin Matuska. 360da5137abSMartin Matuska.Ss Example 3 : No Creating and Destroying Multiple Snapshots 361eda14cbcSMatt MacyThe following command creates snapshots named 36216038816SMartin Matuska.Ar yesterday No of Ar pool/home 363eda14cbcSMatt Macyand all of its descendent file systems. 364eda14cbcSMatt MacyEach snapshot is mounted on demand in the 365eda14cbcSMatt Macy.Pa .zfs/snapshot 366eda14cbcSMatt Macydirectory at the root of its file system. 367eda14cbcSMatt MacyThe second command destroys the newly created snapshots. 36816038816SMartin Matuska.Dl # Nm zfs Cm snapshot Fl r Ar pool/home Ns @ Ns Ar yesterday 36916038816SMartin Matuska.Dl # Nm zfs Cm destroy Fl r Ar pool/home Ns @ Ns Ar yesterday 37016038816SMartin Matuska. 371da5137abSMartin Matuska.Ss Example 4 : No Disabling and Enabling File System Compression 372eda14cbcSMatt MacyThe following command disables the 373eda14cbcSMatt Macy.Sy compression 374eda14cbcSMatt Macyproperty for all file systems under 37516038816SMartin Matuska.Ar pool/home . 376eda14cbcSMatt MacyThe next command explicitly enables 377eda14cbcSMatt Macy.Sy compression 378eda14cbcSMatt Macyfor 37916038816SMartin Matuska.Ar pool/home/anne . 38016038816SMartin Matuska.Dl # Nm zfs Cm set Sy compression Ns = Ns Sy off Ar pool/home 38116038816SMartin Matuska.Dl # Nm zfs Cm set Sy compression Ns = Ns Sy on Ar pool/home/anne 38216038816SMartin Matuska. 383da5137abSMartin Matuska.Ss Example 5 : No Listing ZFS Datasets 384eda14cbcSMatt MacyThe following command lists all active file systems and volumes in the system. 38516038816SMartin MatuskaSnapshots are displayed if 38616038816SMartin Matuska.Sy listsnaps Ns = Ns Sy on . 387eda14cbcSMatt MacyThe default is 388eda14cbcSMatt Macy.Sy off . 389eda14cbcSMatt MacySee 3903ff01b23SMartin Matuska.Xr zpoolprops 7 391eda14cbcSMatt Macyfor more information on pool properties. 39216038816SMartin Matuska.Bd -literal -compact -offset Ds 39316038816SMartin Matuska.No # Nm zfs Cm list 394eda14cbcSMatt MacyNAME USED AVAIL REFER MOUNTPOINT 395eda14cbcSMatt Macypool 450K 457G 18K /pool 396eda14cbcSMatt Macypool/home 315K 457G 21K /export/home 397eda14cbcSMatt Macypool/home/anne 18K 457G 18K /export/home/anne 398eda14cbcSMatt Macypool/home/bob 276K 457G 276K /export/home/bob 399eda14cbcSMatt Macy.Ed 40016038816SMartin Matuska. 401da5137abSMartin Matuska.Ss Example 6 : No Setting a Quota on a ZFS File System 402eda14cbcSMatt MacyThe following command sets a quota of 50 Gbytes for 40316038816SMartin Matuska.Ar pool/home/bob : 40416038816SMartin Matuska.Dl # Nm zfs Cm set Sy quota Ns = Ns Ar 50G pool/home/bob 40516038816SMartin Matuska. 406da5137abSMartin Matuska.Ss Example 7 : No Listing ZFS Properties 407eda14cbcSMatt MacyThe following command lists all properties for 40816038816SMartin Matuska.Ar pool/home/bob : 40916038816SMartin Matuska.Bd -literal -compact -offset Ds 41016038816SMartin Matuska.No # Nm zfs Cm get Sy all Ar pool/home/bob 411eda14cbcSMatt MacyNAME PROPERTY VALUE SOURCE 412eda14cbcSMatt Macypool/home/bob type filesystem - 413eda14cbcSMatt Macypool/home/bob creation Tue Jul 21 15:53 2009 - 414eda14cbcSMatt Macypool/home/bob used 21K - 415eda14cbcSMatt Macypool/home/bob available 20.0G - 416eda14cbcSMatt Macypool/home/bob referenced 21K - 417eda14cbcSMatt Macypool/home/bob compressratio 1.00x - 418eda14cbcSMatt Macypool/home/bob mounted yes - 419eda14cbcSMatt Macypool/home/bob quota 20G local 420eda14cbcSMatt Macypool/home/bob reservation none default 421eda14cbcSMatt Macypool/home/bob recordsize 128K default 422eda14cbcSMatt Macypool/home/bob mountpoint /pool/home/bob default 423eda14cbcSMatt Macypool/home/bob sharenfs off default 424eda14cbcSMatt Macypool/home/bob checksum on default 425eda14cbcSMatt Macypool/home/bob compression on local 426eda14cbcSMatt Macypool/home/bob atime on default 427eda14cbcSMatt Macypool/home/bob devices on default 428eda14cbcSMatt Macypool/home/bob exec on default 429eda14cbcSMatt Macypool/home/bob setuid on default 430eda14cbcSMatt Macypool/home/bob readonly off default 431eda14cbcSMatt Macypool/home/bob zoned off default 432eda14cbcSMatt Macypool/home/bob snapdir hidden default 433eda14cbcSMatt Macypool/home/bob acltype off default 434eda14cbcSMatt Macypool/home/bob aclmode discard default 435eda14cbcSMatt Macypool/home/bob aclinherit restricted default 436eda14cbcSMatt Macypool/home/bob canmount on default 437eda14cbcSMatt Macypool/home/bob xattr on default 438eda14cbcSMatt Macypool/home/bob copies 1 default 439eda14cbcSMatt Macypool/home/bob version 4 - 440eda14cbcSMatt Macypool/home/bob utf8only off - 441eda14cbcSMatt Macypool/home/bob normalization none - 442eda14cbcSMatt Macypool/home/bob casesensitivity sensitive - 443eda14cbcSMatt Macypool/home/bob vscan off default 444eda14cbcSMatt Macypool/home/bob nbmand off default 445eda14cbcSMatt Macypool/home/bob sharesmb off default 446eda14cbcSMatt Macypool/home/bob refquota none default 447eda14cbcSMatt Macypool/home/bob refreservation none default 448eda14cbcSMatt Macypool/home/bob primarycache all default 449eda14cbcSMatt Macypool/home/bob secondarycache all default 450eda14cbcSMatt Macypool/home/bob usedbysnapshots 0 - 451eda14cbcSMatt Macypool/home/bob usedbydataset 21K - 452eda14cbcSMatt Macypool/home/bob usedbychildren 0 - 453eda14cbcSMatt Macypool/home/bob usedbyrefreservation 0 - 454eda14cbcSMatt Macy.Ed 455eda14cbcSMatt Macy.Pp 45616038816SMartin MatuskaThe following command gets a single property value: 45716038816SMartin Matuska.Bd -literal -compact -offset Ds 45816038816SMartin Matuska.No # Nm zfs Cm get Fl H o Sy value compression Ar pool/home/bob 459eda14cbcSMatt Macyon 460eda14cbcSMatt Macy.Ed 46116038816SMartin Matuska.Pp 462eda14cbcSMatt MacyThe following command lists all properties with local settings for 46316038816SMartin Matuska.Ar pool/home/bob : 46416038816SMartin Matuska.Bd -literal -compact -offset Ds 46516038816SMartin Matuska.No # Nm zfs Cm get Fl r s Sy local Fl o Sy name , Ns Sy property , Ns Sy value all Ar pool/home/bob 466eda14cbcSMatt MacyNAME PROPERTY VALUE 467eda14cbcSMatt Macypool/home/bob quota 20G 468eda14cbcSMatt Macypool/home/bob compression on 469eda14cbcSMatt Macy.Ed 47016038816SMartin Matuska. 471da5137abSMartin Matuska.Ss Example 8 : No Rolling Back a ZFS File System 472eda14cbcSMatt MacyThe following command reverts the contents of 47316038816SMartin Matuska.Ar pool/home/anne 474eda14cbcSMatt Macyto the snapshot named 47516038816SMartin Matuska.Ar yesterday , 47616038816SMartin Matuskadeleting all intermediate snapshots: 47716038816SMartin Matuska.Dl # Nm zfs Cm rollback Fl r Ar pool/home/anne Ns @ Ns Ar yesterday 47816038816SMartin Matuska. 479da5137abSMartin Matuska.Ss Example 9 : No Creating a ZFS Clone 480eda14cbcSMatt MacyThe following command creates a writable file system whose initial contents are 481eda14cbcSMatt Macythe same as 48216038816SMartin Matuska.Ar pool/home/bob@yesterday . 48316038816SMartin Matuska.Dl # Nm zfs Cm clone Ar pool/home/bob@yesterday pool/clone 48416038816SMartin Matuska. 485da5137abSMartin Matuska.Ss Example 10 : No Promoting a ZFS Clone 486eda14cbcSMatt MacyThe following commands illustrate how to test out changes to a file system, and 487eda14cbcSMatt Macythen replace the original file system with the changed one, using clones, clone 488eda14cbcSMatt Macypromotion, and renaming: 48916038816SMartin Matuska.Bd -literal -compact -offset Ds 49016038816SMartin Matuska.No # Nm zfs Cm create Ar pool/project/production 491eda14cbcSMatt Macy populate /pool/project/production with data 49216038816SMartin Matuska.No # Nm zfs Cm snapshot Ar pool/project/production Ns @ Ns Ar today 49316038816SMartin Matuska.No # Nm zfs Cm clone Ar pool/project/production@today pool/project/beta 494eda14cbcSMatt Macy make changes to /pool/project/beta and test them 49516038816SMartin Matuska.No # Nm zfs Cm promote Ar pool/project/beta 49616038816SMartin Matuska.No # Nm zfs Cm rename Ar pool/project/production pool/project/legacy 49716038816SMartin Matuska.No # Nm zfs Cm rename Ar pool/project/beta pool/project/production 498eda14cbcSMatt Macy once the legacy version is no longer needed, it can be destroyed 49916038816SMartin Matuska.No # Nm zfs Cm destroy Ar pool/project/legacy 500eda14cbcSMatt Macy.Ed 50116038816SMartin Matuska. 502da5137abSMartin Matuska.Ss Example 11 : No Inheriting ZFS Properties 503eda14cbcSMatt MacyThe following command causes 50416038816SMartin Matuska.Ar pool/home/bob No and Ar pool/home/anne 505eda14cbcSMatt Macyto inherit the 506eda14cbcSMatt Macy.Sy checksum 507eda14cbcSMatt Macyproperty from their parent. 50816038816SMartin Matuska.Dl # Nm zfs Cm inherit Sy checksum Ar pool/home/bob pool/home/anne 50916038816SMartin Matuska. 510da5137abSMartin Matuska.Ss Example 12 : No Remotely Replicating ZFS Data 511eda14cbcSMatt MacyThe following commands send a full stream and then an incremental stream to a 512eda14cbcSMatt Macyremote machine, restoring them into 513eda14cbcSMatt Macy.Em poolB/received/fs@a 514eda14cbcSMatt Macyand 515eda14cbcSMatt Macy.Em poolB/received/fs@b , 516eda14cbcSMatt Macyrespectively. 517eda14cbcSMatt Macy.Em poolB 518eda14cbcSMatt Macymust contain the file system 519eda14cbcSMatt Macy.Em poolB/received , 520eda14cbcSMatt Macyand must not initially contain 521eda14cbcSMatt Macy.Em poolB/received/fs . 52216038816SMartin Matuska.Bd -literal -compact -offset Ds 52316038816SMartin Matuska.No # Nm zfs Cm send Ar pool/fs@a | 52416038816SMartin Matuska.No " " Nm ssh Ar host Nm zfs Cm receive Ar poolB/received/fs Ns @ Ns Ar a 52516038816SMartin Matuska.No # Nm zfs Cm send Fl i Ar a pool/fs@b | 52616038816SMartin Matuska.No " " Nm ssh Ar host Nm zfs Cm receive Ar poolB/received/fs 527eda14cbcSMatt Macy.Ed 52816038816SMartin Matuska. 529da5137abSMartin Matuska.Ss Example 13 : No Using the Nm zfs Cm receive Fl d No Option 530eda14cbcSMatt MacyThe following command sends a full stream of 53116038816SMartin Matuska.Ar poolA/fsA/fsB@snap 532eda14cbcSMatt Macyto a remote machine, receiving it into 53316038816SMartin Matuska.Ar poolB/received/fsA/fsB@snap . 534eda14cbcSMatt MacyThe 53516038816SMartin Matuska.Ar fsA/fsB@snap 536eda14cbcSMatt Macyportion of the received snapshot's name is determined from the name of the sent 537eda14cbcSMatt Macysnapshot. 53816038816SMartin Matuska.Ar poolB 539eda14cbcSMatt Macymust contain the file system 54016038816SMartin Matuska.Ar poolB/received . 541eda14cbcSMatt MacyIf 54216038816SMartin Matuska.Ar poolB/received/fsA 543eda14cbcSMatt Macydoes not exist, it is created as an empty file system. 54416038816SMartin Matuska.Bd -literal -compact -offset Ds 54516038816SMartin Matuska.No # Nm zfs Cm send Ar poolA/fsA/fsB@snap | 54616038816SMartin Matuska.No " " Nm ssh Ar host Nm zfs Cm receive Fl d Ar poolB/received 547eda14cbcSMatt Macy.Ed 54816038816SMartin Matuska. 549da5137abSMartin Matuska.Ss Example 14 : No Setting User Properties 550eda14cbcSMatt MacyThe following example sets the user-defined 55116038816SMartin Matuska.Ar com.example : Ns Ar department 55216038816SMartin Matuskaproperty for a dataset: 55316038816SMartin Matuska.Dl # Nm zfs Cm set Ar com.example : Ns Ar department Ns = Ns Ar 12345 tank/accounting 55416038816SMartin Matuska. 555da5137abSMartin Matuska.Ss Example 15 : No Performing a Rolling Snapshot 556eda14cbcSMatt MacyThe following example shows how to maintain a history of snapshots with a 557eda14cbcSMatt Macyconsistent naming scheme. 558eda14cbcSMatt MacyTo keep a week's worth of snapshots, the user destroys the oldest snapshot, 559eda14cbcSMatt Macyrenames the remaining snapshots, and then creates a new snapshot, as follows: 56016038816SMartin Matuska.Bd -literal -compact -offset Ds 56116038816SMartin Matuska.No # Nm zfs Cm destroy Fl r Ar pool/users@7daysago 56216038816SMartin Matuska.No # Nm zfs Cm rename Fl r Ar pool/users@6daysago No @ Ns Ar 7daysago 56316038816SMartin Matuska.No # Nm zfs Cm rename Fl r Ar pool/users@5daysago No @ Ns Ar 6daysago 56416038816SMartin Matuska.No # Nm zfs Cm rename Fl r Ar pool/users@4daysago No @ Ns Ar 5daysago 56516038816SMartin Matuska.No # Nm zfs Cm rename Fl r Ar pool/users@3daysago No @ Ns Ar 4daysago 56616038816SMartin Matuska.No # Nm zfs Cm rename Fl r Ar pool/users@2daysago No @ Ns Ar 3daysago 56716038816SMartin Matuska.No # Nm zfs Cm rename Fl r Ar pool/users@yesterday No @ Ns Ar 2daysago 56816038816SMartin Matuska.No # Nm zfs Cm rename Fl r Ar pool/users@today No @ Ns Ar yesterday 56916038816SMartin Matuska.No # Nm zfs Cm snapshot Fl r Ar pool/users Ns @ Ns Ar today 570eda14cbcSMatt Macy.Ed 57116038816SMartin Matuska. 572da5137abSMartin Matuska.Ss Example 16 : No Setting sharenfs Property Options on a ZFS File System 573eda14cbcSMatt MacyThe following commands show how to set 574eda14cbcSMatt Macy.Sy sharenfs 57516038816SMartin Matuskaproperty options to enable read-write 57616038816SMartin Matuskaaccess for a set of IP addresses and to enable root access for system 57716038816SMartin Matuska.Qq neo 578eda14cbcSMatt Macyon the 57916038816SMartin Matuska.Ar tank/home 58016038816SMartin Matuskafile system: 5816ba2210eSMartin Matuska.Dl # Nm zfs Cm set Sy sharenfs Ns = Ns ' Ns Ar rw Ns =@123.123.0.0/16:[::1],root= Ns Ar neo Ns ' tank/home 582eda14cbcSMatt Macy.Pp 58316038816SMartin MatuskaIf you are using DNS for host name resolution, 58416038816SMartin Matuskaspecify the fully-qualified hostname. 58516038816SMartin Matuska. 586da5137abSMartin Matuska.Ss Example 17 : No Delegating ZFS Administration Permissions on a ZFS Dataset 587eda14cbcSMatt MacyThe following example shows how to set permissions so that user 58816038816SMartin Matuska.Ar cindys 589eda14cbcSMatt Macycan create, destroy, mount, and take snapshots on 59016038816SMartin Matuska.Ar tank/cindys . 591eda14cbcSMatt MacyThe permissions on 59216038816SMartin Matuska.Ar tank/cindys 593eda14cbcSMatt Macyare also displayed. 59416038816SMartin Matuska.Bd -literal -compact -offset Ds 59516038816SMartin Matuska.No # Nm zfs Cm allow Sy cindys create , Ns Sy destroy , Ns Sy mount , Ns Sy snapshot Ar tank/cindys 59616038816SMartin Matuska.No # Nm zfs Cm allow Ar tank/cindys 597eda14cbcSMatt Macy---- Permissions on tank/cindys -------------------------------------- 598eda14cbcSMatt MacyLocal+Descendent permissions: 599eda14cbcSMatt Macy user cindys create,destroy,mount,snapshot 600eda14cbcSMatt Macy.Ed 601eda14cbcSMatt Macy.Pp 602eda14cbcSMatt MacyBecause the 60316038816SMartin Matuska.Ar tank/cindys 604eda14cbcSMatt Macymount point permission is set to 755 by default, user 60516038816SMartin Matuska.Ar cindys 606eda14cbcSMatt Macywill be unable to mount file systems under 60716038816SMartin Matuska.Ar tank/cindys . 608eda14cbcSMatt MacyAdd an ACE similar to the following syntax to provide mount point access: 60916038816SMartin Matuska.Dl # Cm chmod No A+user : Ns Ar cindys Ns :add_subdirectory:allow Ar /tank/cindys 61016038816SMartin Matuska. 611da5137abSMartin Matuska.Ss Example 18 : No Delegating Create Time Permissions on a ZFS Dataset 612eda14cbcSMatt MacyThe following example shows how to grant anyone in the group 61316038816SMartin Matuska.Ar staff 614eda14cbcSMatt Macyto create file systems in 61516038816SMartin Matuska.Ar tank/users . 616eda14cbcSMatt MacyThis syntax also allows staff members to destroy their own file systems, but not 617eda14cbcSMatt Macydestroy anyone else's file system. 618eda14cbcSMatt MacyThe permissions on 61916038816SMartin Matuska.Ar tank/users 620eda14cbcSMatt Macyare also displayed. 62116038816SMartin Matuska.Bd -literal -compact -offset Ds 62216038816SMartin Matuska.No # Nm zfs Cm allow Ar staff Sy create , Ns Sy mount Ar tank/users 62316038816SMartin Matuska.No # Nm zfs Cm allow Fl c Sy destroy Ar tank/users 62416038816SMartin Matuska.No # Nm zfs Cm allow Ar tank/users 625eda14cbcSMatt Macy---- Permissions on tank/users --------------------------------------- 626eda14cbcSMatt MacyPermission sets: 627eda14cbcSMatt Macy destroy 628eda14cbcSMatt MacyLocal+Descendent permissions: 629eda14cbcSMatt Macy group staff create,mount 630eda14cbcSMatt Macy.Ed 63116038816SMartin Matuska. 632da5137abSMartin Matuska.Ss Example 19 : No Defining and Granting a Permission Set on a ZFS Dataset 633eda14cbcSMatt MacyThe following example shows how to define and grant a permission set on the 63416038816SMartin Matuska.Ar tank/users 635eda14cbcSMatt Macyfile system. 636eda14cbcSMatt MacyThe permissions on 63716038816SMartin Matuska.Ar tank/users 638eda14cbcSMatt Macyare also displayed. 63916038816SMartin Matuska.Bd -literal -compact -offset Ds 64016038816SMartin Matuska.No # Nm zfs Cm allow Fl s No @ Ns Ar pset Sy create , Ns Sy destroy , Ns Sy snapshot , Ns Sy mount Ar tank/users 64116038816SMartin Matuska.No # Nm zfs Cm allow staff No @ Ns Ar pset tank/users 64216038816SMartin Matuska.No # Nm zfs Cm allow Ar tank/users 643eda14cbcSMatt Macy---- Permissions on tank/users --------------------------------------- 644eda14cbcSMatt MacyPermission sets: 645eda14cbcSMatt Macy @pset create,destroy,mount,snapshot 646eda14cbcSMatt MacyLocal+Descendent permissions: 647eda14cbcSMatt Macy group staff @pset 648eda14cbcSMatt Macy.Ed 64916038816SMartin Matuska. 650da5137abSMartin Matuska.Ss Example 20 : No Delegating Property Permissions on a ZFS Dataset 651eda14cbcSMatt MacyThe following example shows to grant the ability to set quotas and reservations 652eda14cbcSMatt Macyon the 65316038816SMartin Matuska.Ar users/home 654eda14cbcSMatt Macyfile system. 655eda14cbcSMatt MacyThe permissions on 65616038816SMartin Matuska.Ar users/home 657eda14cbcSMatt Macyare also displayed. 65816038816SMartin Matuska.Bd -literal -compact -offset Ds 65916038816SMartin Matuska.No # Nm zfs Cm allow Ar cindys Sy quota , Ns Sy reservation Ar users/home 66016038816SMartin Matuska.No # Nm zfs Cm allow Ar users/home 661eda14cbcSMatt Macy---- Permissions on users/home --------------------------------------- 662eda14cbcSMatt MacyLocal+Descendent permissions: 663eda14cbcSMatt Macy user cindys quota,reservation 664eda14cbcSMatt Macycindys% zfs set quota=10G users/home/marks 665eda14cbcSMatt Macycindys% zfs get quota users/home/marks 666eda14cbcSMatt MacyNAME PROPERTY VALUE SOURCE 667eda14cbcSMatt Macyusers/home/marks quota 10G local 668eda14cbcSMatt Macy.Ed 66916038816SMartin Matuska. 670da5137abSMartin Matuska.Ss Example 21 : No Removing ZFS Delegated Permissions on a ZFS Dataset 671eda14cbcSMatt MacyThe following example shows how to remove the snapshot permission from the 67216038816SMartin Matuska.Ar staff 673eda14cbcSMatt Macygroup on the 67416038816SMartin Matuska.Sy tank/users 675eda14cbcSMatt Macyfile system. 676eda14cbcSMatt MacyThe permissions on 67716038816SMartin Matuska.Sy tank/users 678eda14cbcSMatt Macyare also displayed. 67916038816SMartin Matuska.Bd -literal -compact -offset Ds 68016038816SMartin Matuska.No # Nm zfs Cm unallow Ar staff Sy snapshot Ar tank/users 68116038816SMartin Matuska.No # Nm zfs Cm allow Ar tank/users 682eda14cbcSMatt Macy---- Permissions on tank/users --------------------------------------- 683eda14cbcSMatt MacyPermission sets: 684eda14cbcSMatt Macy @pset create,destroy,mount,snapshot 685eda14cbcSMatt MacyLocal+Descendent permissions: 686eda14cbcSMatt Macy group staff @pset 687eda14cbcSMatt Macy.Ed 68816038816SMartin Matuska. 689da5137abSMartin Matuska.Ss Example 22 : No Showing the differences between a snapshot and a ZFS Dataset 690eda14cbcSMatt MacyThe following example shows how to see what has changed between a prior 691eda14cbcSMatt Macysnapshot of a ZFS dataset and its current state. 692eda14cbcSMatt MacyThe 693eda14cbcSMatt Macy.Fl F 694eda14cbcSMatt Macyoption is used to indicate type information for the files affected. 69516038816SMartin Matuska.Bd -literal -compact -offset Ds 69616038816SMartin Matuska.No # Nm zfs Cm diff Fl F Ar tank/test@before tank/test 697eda14cbcSMatt MacyM / /tank/test/ 698eda14cbcSMatt MacyM F /tank/test/linked (+1) 699eda14cbcSMatt MacyR F /tank/test/oldname -> /tank/test/newname 700eda14cbcSMatt Macy- F /tank/test/deleted 701eda14cbcSMatt Macy+ F /tank/test/created 702eda14cbcSMatt MacyM F /tank/test/modified 703eda14cbcSMatt Macy.Ed 70416038816SMartin Matuska. 705da5137abSMartin Matuska.Ss Example 23 : No Creating a bookmark 706716fd348SMartin MatuskaThe following example creates a bookmark to a snapshot. 707716fd348SMartin MatuskaThis bookmark can then be used instead of a snapshot in send streams. 70816038816SMartin Matuska.Dl # Nm zfs Cm bookmark Ar rpool Ns @ Ns Ar snapshot rpool Ns # Ns Ar bookmark 70916038816SMartin Matuska. 710da5137abSMartin Matuska.Ss Example 24 : No Setting Sy sharesmb No Property Options on a ZFS File System 711eda14cbcSMatt MacyThe following example show how to share SMB filesystem through ZFS. 71216038816SMartin MatuskaNote that a user and their password must be given. 71316038816SMartin Matuska.Dl # Nm smbmount Ar //127.0.0.1/share_tmp /mnt/tmp Fl o No user=workgroup/turbo,password=obrut,uid=1000 714eda14cbcSMatt Macy.Pp 715eda14cbcSMatt MacyMinimal 71616038816SMartin Matuska.Pa /etc/samba/smb.conf 71716038816SMartin Matuskaconfiguration is required, as follows. 718eda14cbcSMatt Macy.Pp 71916038816SMartin MatuskaSamba will need to bind to the loopback interface for the ZFS utilities to 720eda14cbcSMatt Macycommunicate with Samba. 721eda14cbcSMatt MacyThis is the default behavior for most Linux distributions. 722eda14cbcSMatt Macy.Pp 723eda14cbcSMatt MacySamba must be able to authenticate a user. 72416038816SMartin MatuskaThis can be done in a number of ways 72516038816SMartin Matuska.Pq Xr passwd 5 , LDAP , Xr smbpasswd 5 , &c.\& . 72616038816SMartin MatuskaHow to do this is outside the scope of this document – refer to 727eda14cbcSMatt Macy.Xr smb.conf 5 72816038816SMartin Matuskafor more information. 729eda14cbcSMatt Macy.Pp 730eda14cbcSMatt MacySee the 73116038816SMartin Matuska.Sx USERSHARES 73216038816SMartin Matuskasection for all configuration options, 73316038816SMartin Matuskain case you need to modify any options of the share afterwards. 734eda14cbcSMatt MacyDo note that any changes done with the 735eda14cbcSMatt Macy.Xr net 8 73616038816SMartin Matuskacommand will be undone if the share is ever unshared (like via a reboot). 73716038816SMartin Matuska. 738eda14cbcSMatt Macy.Sh ENVIRONMENT VARIABLES 739*e3aa18adSMartin Matuska.Bl -tag -width "ZFS_MODULE_TIMEOUT" 74016038816SMartin Matuska.It Sy ZFS_MOUNT_HELPER 741eda14cbcSMatt MacyCause 74216038816SMartin Matuska.Nm zfs Cm mount 743eda14cbcSMatt Macyto use 74416038816SMartin Matuska.Xr mount 8 74516038816SMartin Matuskato mount ZFS datasets. 74616038816SMartin MatuskaThis option is provided for backwards compatibility with older ZFS versions. 747*e3aa18adSMartin Matuska. 748716fd348SMartin Matuska.It Sy ZFS_SET_PIPE_MAX 749716fd348SMartin MatuskaTells 750716fd348SMartin Matuska.Nm zfs 751716fd348SMartin Matuskato set the maximum pipe size for sends/recieves. 752716fd348SMartin MatuskaDisabled by default on Linux 753716fd348SMartin Matuskadue to an unfixed deadlock in Linux's pipe size handling code. 754*e3aa18adSMartin Matuska. 755*e3aa18adSMartin Matuska.\" Shared with zpool.8 756*e3aa18adSMartin Matuska.It Sy ZFS_MODULE_TIMEOUT 757*e3aa18adSMartin MatuskaTime, in seconds, to wait for 758*e3aa18adSMartin Matuska.Pa /dev/zfs 759*e3aa18adSMartin Matuskato appear. 760*e3aa18adSMartin MatuskaDefaults to 761*e3aa18adSMartin Matuska.Sy 10 , 762*e3aa18adSMartin Matuskamax 763*e3aa18adSMartin Matuska.Sy 600 Pq 10 minutes . 764*e3aa18adSMartin MatuskaIf 765*e3aa18adSMartin Matuska.Pf < Sy 0 , 766*e3aa18adSMartin Matuskawait forever; if 767*e3aa18adSMartin Matuska.Sy 0 , 768*e3aa18adSMartin Matuskadon't wait. 769716fd348SMartin Matuska.El 77016038816SMartin Matuska. 771eda14cbcSMatt Macy.Sh INTERFACE STABILITY 772eda14cbcSMatt Macy.Sy Committed . 77316038816SMartin Matuska. 774eda14cbcSMatt Macy.Sh SEE ALSO 775eda14cbcSMatt Macy.Xr attr 1 , 776eda14cbcSMatt Macy.Xr gzip 1 , 777eda14cbcSMatt Macy.Xr ssh 1 , 778eda14cbcSMatt Macy.Xr chmod 2 , 779eda14cbcSMatt Macy.Xr fsync 2 , 780eda14cbcSMatt Macy.Xr stat 2 , 781eda14cbcSMatt Macy.Xr write 2 , 782eda14cbcSMatt Macy.Xr acl 5 , 783eda14cbcSMatt Macy.Xr attributes 5 , 784eda14cbcSMatt Macy.Xr exports 5 , 7853ff01b23SMartin Matuska.Xr zfsconcepts 7 , 7863ff01b23SMartin Matuska.Xr zfsprops 7 , 787eda14cbcSMatt Macy.Xr exportfs 8 , 788eda14cbcSMatt Macy.Xr mount 8 , 789eda14cbcSMatt Macy.Xr net 8 , 790eda14cbcSMatt Macy.Xr selinux 8 , 791ac0bf12eSMatt Macy.Xr zfs-allow 8 , 792ac0bf12eSMatt Macy.Xr zfs-bookmark 8 , 793ac0bf12eSMatt Macy.Xr zfs-change-key 8 , 794ac0bf12eSMatt Macy.Xr zfs-clone 8 , 795ac0bf12eSMatt Macy.Xr zfs-create 8 , 796ac0bf12eSMatt Macy.Xr zfs-destroy 8 , 797ac0bf12eSMatt Macy.Xr zfs-diff 8 , 798ac0bf12eSMatt Macy.Xr zfs-get 8 , 799ac0bf12eSMatt Macy.Xr zfs-groupspace 8 , 800ac0bf12eSMatt Macy.Xr zfs-hold 8 , 801ac0bf12eSMatt Macy.Xr zfs-inherit 8 , 802ac0bf12eSMatt Macy.Xr zfs-jail 8 , 803ac0bf12eSMatt Macy.Xr zfs-list 8 , 804ac0bf12eSMatt Macy.Xr zfs-load-key 8 , 805ac0bf12eSMatt Macy.Xr zfs-mount 8 , 806ac0bf12eSMatt Macy.Xr zfs-program 8 , 807ac0bf12eSMatt Macy.Xr zfs-project 8 , 808ac0bf12eSMatt Macy.Xr zfs-projectspace 8 , 809ac0bf12eSMatt Macy.Xr zfs-promote 8 , 810ac0bf12eSMatt Macy.Xr zfs-receive 8 , 811ac0bf12eSMatt Macy.Xr zfs-redact 8 , 812ac0bf12eSMatt Macy.Xr zfs-release 8 , 813ac0bf12eSMatt Macy.Xr zfs-rename 8 , 814ac0bf12eSMatt Macy.Xr zfs-rollback 8 , 815ac0bf12eSMatt Macy.Xr zfs-send 8 , 816ac0bf12eSMatt Macy.Xr zfs-set 8 , 817ac0bf12eSMatt Macy.Xr zfs-share 8 , 818ac0bf12eSMatt Macy.Xr zfs-snapshot 8 , 819ac0bf12eSMatt Macy.Xr zfs-unallow 8 , 820ac0bf12eSMatt Macy.Xr zfs-unjail 8 , 821ac0bf12eSMatt Macy.Xr zfs-unload-key 8 , 822ac0bf12eSMatt Macy.Xr zfs-unmount 8 , 823ac0bf12eSMatt Macy.Xr zfs-unshare 8 , 824ac0bf12eSMatt Macy.Xr zfs-upgrade 8 , 825ac0bf12eSMatt Macy.Xr zfs-userspace 8 , 826ac0bf12eSMatt Macy.Xr zfs-wait 8 , 827eda14cbcSMatt Macy.Xr zpool 8 828