xref: /freebsd/sys/contrib/openzfs/man/man8/zfs.8 (revision 6be3386466ab79a84b48429ae66244f21526d3df)
1.\"
2.\" CDDL HEADER START
3.\"
4.\" The contents of this file are subject to the terms of the
5.\" Common Development and Distribution License (the "License").
6.\" You may not use this file except in compliance with the License.
7.\"
8.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9.\" or http://www.opensolaris.org/os/licensing.
10.\" See the License for the specific language governing permissions
11.\" and limitations under the License.
12.\"
13.\" When distributing Covered Code, include this CDDL HEADER in each
14.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15.\" If applicable, add the following below this CDDL HEADER, with the
16.\" fields enclosed by brackets "[]" replaced with your own identifying
17.\" information: Portions Copyright [yyyy] [name of copyright owner]
18.\"
19.\" CDDL HEADER END
20.\"
21.\"
22.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
23.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
24.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
25.\" Copyright (c) 2011, Pawel Jakub Dawidek <pjd@FreeBSD.org>
26.\" Copyright (c) 2012, Glen Barber <gjb@FreeBSD.org>
27.\" Copyright (c) 2012, Bryan Drewery <bdrewery@FreeBSD.org>
28.\" Copyright (c) 2013, Steven Hartland <smh@FreeBSD.org>
29.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
30.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
31.\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
32.\" Copyright (c) 2014 Integros [integros.com]
33.\" Copyright (c) 2014, Xin LI <delphij@FreeBSD.org>
34.\" Copyright (c) 2014-2015, The FreeBSD Foundation, All Rights Reserved.
35.\" Copyright (c) 2016 Nexenta Systems, Inc. All Rights Reserved.
36.\" Copyright 2019 Richard Laager. All rights reserved.
37.\" Copyright 2018 Nexenta Systems, Inc.
38.\" Copyright 2019 Joyent, Inc.
39.\"
40.Dd June 30, 2019
41.Dt ZFS 8
42.Os
43.Sh NAME
44.Nm zfs
45.Nd configures ZFS file systems
46.Sh SYNOPSIS
47.Nm
48.Fl ?V
49.Nm
50.Cm version
51.Nm
52.Cm <subcommand>
53.Op Ar <args>
54.Sh DESCRIPTION
55The
56.Nm
57command configures ZFS datasets within a ZFS storage pool, as described in
58.Xr zpool 8 .
59A dataset is identified by a unique path within the ZFS namespace.
60For example:
61.Bd -literal
62pool/{filesystem,volume,snapshot}
63.Ed
64.Pp
65where the maximum length of a dataset name is
66.Dv MAXNAMELEN
67.Pq 256 bytes
68and the maximum amount of nesting allowed in a path is 50 levels deep.
69.Pp
70A dataset can be one of the following:
71.Bl -tag -width "file system"
72.It Sy file system
73A ZFS dataset of type
74.Sy filesystem
75can be mounted within the standard system namespace and behaves like other file
76systems.
77While ZFS file systems are designed to be POSIX compliant, known issues exist
78that prevent compliance in some cases.
79Applications that depend on standards conformance might fail due to non-standard
80behavior when checking file system free space.
81.It Sy volume
82A logical volume exported as a raw or block device.
83This type of dataset should only be used when a block device is required.
84File systems are typically used in most environments.
85.It Sy snapshot
86A read-only version of a file system or volume at a given point in time.
87It is specified as
88.Ar filesystem Ns @ Ns Ar name
89or
90.Ar volume Ns @ Ns Ar name .
91.It Sy bookmark
92Much like a
93.Sy snapshot ,
94but without the hold on on-disk data.
95It can be used as the source of a send (but not for a receive). It is specified as
96.Ar filesystem Ns # Ns Ar name
97or
98.Ar volume Ns # Ns Ar name .
99.El
100.Pp
101For details see
102.Xr zfsconcepts 8 .
103.Ss Properties
104Properties are divided into two types, native properties and user-defined
105.Po or
106.Qq user
107.Pc
108properties.
109Native properties either export internal statistics or control ZFS behavior.
110In addition, native properties are either editable or read-only.
111User properties have no effect on ZFS behavior, but you can use them to annotate
112datasets in a way that is meaningful in your environment.
113For more information about properties, see the
114.Xr zfsprops 8 man page.
115.Ss Encryption
116Enabling the
117.Sy encryption
118feature allows for the creation of encrypted filesystems and volumes.
119ZFS will encrypt file and zvol data, file attributes, ACLs, permission bits,
120directory listings, FUID mappings, and
121.Sy userused
122/
123.Sy groupused
124data.
125For an overview of encryption see the
126.Xr zfs-load-key 8 command manual.
127.Sh SUBCOMMANDS
128All subcommands that modify state are logged persistently to the pool in their
129original form.
130.Bl -tag -width ""
131.It Nm Fl ?
132Displays a help message.
133.It Xo
134.Nm
135.Fl V , -version
136.Xc
137An alias for the
138.Nm zfs Cm version
139subcommand.
140.It Xo
141.Nm
142.Cm version
143.Xc
144Displays the software version of the
145.Nm
146userland utility and the zfs kernel module.
147.El
148.Ss Dataset Management
149.Bl -tag -width ""
150.It Xr zfs-list 8
151Lists the property information for the given datasets in tabular form.
152.It Xr zfs-create 8
153Creates a new ZFS file system or volume.
154.It Xr zfs-destroy 8
155Destroys the given dataset(s), snapshot(s), or bookmark.
156.It Xr zfs-rename 8
157Renames the given dataset (filesystem or snapshot).
158.It Xr zfs-upgrade 8
159Manage upgrading the on-disk version of filesystems.
160.El
161.Ss Snapshots
162.Bl -tag -width ""
163.It Xr zfs-snapshot 8
164Creates snapshots with the given names.
165.It Xr zfs-rollback 8
166Roll back the given dataset to a previous snapshot.
167.It Xo
168.Xr zfs-hold 8 /
169.Xr zfs-release 8
170.Xc
171Add or remove a hold reference to the specified snapshot or snapshots.
172If a hold exists on a snapshot, attempts to destroy that snapshot by using the
173.Nm zfs Cm destroy
174command return
175.Er EBUSY .
176.It Xr zfs-diff 8
177Display the difference between a snapshot of a given filesystem and another
178snapshot of that filesystem from a later time or the current contents of the
179filesystem.
180.El
181.Ss Clones
182.Bl -tag -width ""
183.It Xr zfs-clone 8
184Creates a clone of the given snapshot.
185.It Xr zfs-promote 8
186Promotes a clone file system to no longer be dependent on its
187.Qq origin
188snapshot.
189.El
190.Ss Send & Receive
191.Bl -tag -width ""
192.It Xr zfs-send 8
193Generate a send stream, which may be of a filesystem, and may be incremental
194from a bookmark.
195.It Xr zfs-receive 8
196Creates a snapshot whose contents are as specified in the stream provided on
197standard input.
198If a full stream is received, then a new file system is created as well.
199Streams are created using the
200.Xr zfs-send 8
201subcommand, which by default creates a full stream.
202.It Xr zfs-bookmark 8
203Creates a new bookmark of the given snapshot or bookmark.
204Bookmarks mark the point in time when the snapshot was created, and can be used
205as the incremental source for a
206.Nm zfs Cm send
207command.
208.It Xr zfs-redact 8
209Generate a new redaction bookmark.
210This feature can be used to allow clones of a filesystem to be made available on
211a remote system, in the case where their parent need not (or needs to not) be
212usable.
213.El
214.Ss Properties
215.Bl -tag -width ""
216.It Xr zfs-get 8
217Displays properties for the given datasets.
218.It Xr zfs-set 8
219Sets the property or list of properties to the given value(s) for each dataset.
220.It Xr zfs-inherit 8
221Clears the specified property, causing it to be inherited from an ancestor,
222restored to default if no ancestor has the property set, or with the
223.Fl S
224option reverted to the received value if one exists.
225.El
226.Ss Quotas
227.Bl -tag -width ""
228.It Xo
229.Xr zfs-userspace 8 /
230.Xr zfs-groupspace 8 /
231.Xr zfs-projectspace 8
232.Xc
233Displays space consumed by, and quotas on, each user, group, or project
234in the specified filesystem or snapshot.
235.It Xr zfs-project 8
236List, set, or clear project ID and/or inherit flag on the file(s) or directories.
237.El
238.Ss Mountpoints
239.Bl -tag -width ""
240.It Xr zfs-mount 8
241Displays all ZFS file systems currently mounted, or mount ZFS filesystem
242on a path described by its
243.Sy mountpoint
244property.
245.It Xr zfs-unmount 8
246Unmounts currently mounted ZFS file systems.
247.El
248.Ss Shares
249.Bl -tag -width ""
250.It Xr zfs-share 8
251Shares available ZFS file systems.
252.It Xr zfs-unshare 8
253Unshares currently shared ZFS file systems.
254.El
255.Ss Delegated Administration
256.Bl -tag -width ""
257.It Xr zfs-allow 8
258Delegate permissions on the specified filesystem or volume.
259.It Xr zfs-unallow 8
260Remove delegated permissions on the specified filesystem or volume.
261.El
262.Ss Encryption
263.Bl -tag -width ""
264.It Xr zfs-change-key 8
265Add or change an encryption key on the specified dataset.
266.It Xr zfs-load-key 8
267Load the key for the specified encrypted dataset, enabling access.
268.It Xr zfs-unload-key 8
269Unload a key for the specified dataset, removing the ability to access the dataset.
270.El
271.Ss Channel Programs
272.Bl -tag -width ""
273.It Xr zfs-program 8
274Execute ZFS administrative operations
275programmatically via a Lua script-language channel program.
276.El
277.Ss Jails
278.Bl -tag -width ""
279.It Xr zfs-jail 8
280Attaches a filesystem to a jail.
281.It Xr zfs-unjail 8
282Detaches a filesystem from a jail.
283.El
284.Ss Waiting
285.Bl -tag -width ""
286.It Xr zfs-wait 8
287Wait for background activity in a filesystem to complete.
288.El
289.Sh EXIT STATUS
290The
291.Nm
292utility exits 0 on success, 1 if an error occurs, and 2 if invalid command line
293options were specified.
294.Sh EXAMPLES
295.Bl -tag -width ""
296.It Sy Example 1 No Creating a ZFS File System Hierarchy
297The following commands create a file system named
298.Em pool/home
299and a file system named
300.Em pool/home/bob .
301The mount point
302.Pa /export/home
303is set for the parent file system, and is automatically inherited by the child
304file system.
305.Bd -literal
306# zfs create pool/home
307# zfs set mountpoint=/export/home pool/home
308# zfs create pool/home/bob
309.Ed
310.It Sy Example 2 No Creating a ZFS Snapshot
311The following command creates a snapshot named
312.Sy yesterday .
313This snapshot is mounted on demand in the
314.Pa .zfs/snapshot
315directory at the root of the
316.Em pool/home/bob
317file system.
318.Bd -literal
319# zfs snapshot pool/home/bob@yesterday
320.Ed
321.It Sy Example 3 No Creating and Destroying Multiple Snapshots
322The following command creates snapshots named
323.Sy yesterday
324of
325.Em pool/home
326and all of its descendent file systems.
327Each snapshot is mounted on demand in the
328.Pa .zfs/snapshot
329directory at the root of its file system.
330The second command destroys the newly created snapshots.
331.Bd -literal
332# zfs snapshot -r pool/home@yesterday
333# zfs destroy -r pool/home@yesterday
334.Ed
335.It Sy Example 4 No Disabling and Enabling File System Compression
336The following command disables the
337.Sy compression
338property for all file systems under
339.Em pool/home .
340The next command explicitly enables
341.Sy compression
342for
343.Em pool/home/anne .
344.Bd -literal
345# zfs set compression=off pool/home
346# zfs set compression=on pool/home/anne
347.Ed
348.It Sy Example 5 No Listing ZFS Datasets
349The following command lists all active file systems and volumes in the system.
350Snapshots are displayed if the
351.Sy listsnaps
352property is
353.Sy on .
354The default is
355.Sy off .
356See
357.Xr zpool 8
358for more information on pool properties.
359.Bd -literal
360# zfs list
361NAME                      USED  AVAIL  REFER  MOUNTPOINT
362pool                      450K   457G    18K  /pool
363pool/home                 315K   457G    21K  /export/home
364pool/home/anne             18K   457G    18K  /export/home/anne
365pool/home/bob             276K   457G   276K  /export/home/bob
366.Ed
367.It Sy Example 6 No Setting a Quota on a ZFS File System
368The following command sets a quota of 50 Gbytes for
369.Em pool/home/bob .
370.Bd -literal
371# zfs set quota=50G pool/home/bob
372.Ed
373.It Sy Example 7 No Listing ZFS Properties
374The following command lists all properties for
375.Em pool/home/bob .
376.Bd -literal
377# zfs get all pool/home/bob
378NAME           PROPERTY              VALUE                  SOURCE
379pool/home/bob  type                  filesystem             -
380pool/home/bob  creation              Tue Jul 21 15:53 2009  -
381pool/home/bob  used                  21K                    -
382pool/home/bob  available             20.0G                  -
383pool/home/bob  referenced            21K                    -
384pool/home/bob  compressratio         1.00x                  -
385pool/home/bob  mounted               yes                    -
386pool/home/bob  quota                 20G                    local
387pool/home/bob  reservation           none                   default
388pool/home/bob  recordsize            128K                   default
389pool/home/bob  mountpoint            /pool/home/bob         default
390pool/home/bob  sharenfs              off                    default
391pool/home/bob  checksum              on                     default
392pool/home/bob  compression           on                     local
393pool/home/bob  atime                 on                     default
394pool/home/bob  devices               on                     default
395pool/home/bob  exec                  on                     default
396pool/home/bob  setuid                on                     default
397pool/home/bob  readonly              off                    default
398pool/home/bob  zoned                 off                    default
399pool/home/bob  snapdir               hidden                 default
400pool/home/bob  acltype               off                    default
401pool/home/bob  aclmode               discard                default
402pool/home/bob  aclinherit            restricted             default
403pool/home/bob  canmount              on                     default
404pool/home/bob  xattr                 on                     default
405pool/home/bob  copies                1                      default
406pool/home/bob  version               4                      -
407pool/home/bob  utf8only              off                    -
408pool/home/bob  normalization         none                   -
409pool/home/bob  casesensitivity       sensitive              -
410pool/home/bob  vscan                 off                    default
411pool/home/bob  nbmand                off                    default
412pool/home/bob  sharesmb              off                    default
413pool/home/bob  refquota              none                   default
414pool/home/bob  refreservation        none                   default
415pool/home/bob  primarycache          all                    default
416pool/home/bob  secondarycache        all                    default
417pool/home/bob  usedbysnapshots       0                      -
418pool/home/bob  usedbydataset         21K                    -
419pool/home/bob  usedbychildren        0                      -
420pool/home/bob  usedbyrefreservation  0                      -
421.Ed
422.Pp
423The following command gets a single property value.
424.Bd -literal
425# zfs get -H -o value compression pool/home/bob
426on
427.Ed
428The following command lists all properties with local settings for
429.Em pool/home/bob .
430.Bd -literal
431# zfs get -r -s local -o name,property,value all pool/home/bob
432NAME           PROPERTY              VALUE
433pool/home/bob  quota                 20G
434pool/home/bob  compression           on
435.Ed
436.It Sy Example 8 No Rolling Back a ZFS File System
437The following command reverts the contents of
438.Em pool/home/anne
439to the snapshot named
440.Sy yesterday ,
441deleting all intermediate snapshots.
442.Bd -literal
443# zfs rollback -r pool/home/anne@yesterday
444.Ed
445.It Sy Example 9 No Creating a ZFS Clone
446The following command creates a writable file system whose initial contents are
447the same as
448.Em pool/home/bob@yesterday .
449.Bd -literal
450# zfs clone pool/home/bob@yesterday pool/clone
451.Ed
452.It Sy Example 10 No Promoting a ZFS Clone
453The following commands illustrate how to test out changes to a file system, and
454then replace the original file system with the changed one, using clones, clone
455promotion, and renaming:
456.Bd -literal
457# zfs create pool/project/production
458  populate /pool/project/production with data
459# zfs snapshot pool/project/production@today
460# zfs clone pool/project/production@today pool/project/beta
461  make changes to /pool/project/beta and test them
462# zfs promote pool/project/beta
463# zfs rename pool/project/production pool/project/legacy
464# zfs rename pool/project/beta pool/project/production
465  once the legacy version is no longer needed, it can be destroyed
466# zfs destroy pool/project/legacy
467.Ed
468.It Sy Example 11 No Inheriting ZFS Properties
469The following command causes
470.Em pool/home/bob
471and
472.Em pool/home/anne
473to inherit the
474.Sy checksum
475property from their parent.
476.Bd -literal
477# zfs inherit checksum pool/home/bob pool/home/anne
478.Ed
479.It Sy Example 12 No Remotely Replicating ZFS Data
480The following commands send a full stream and then an incremental stream to a
481remote machine, restoring them into
482.Em poolB/received/fs@a
483and
484.Em poolB/received/fs@b ,
485respectively.
486.Em poolB
487must contain the file system
488.Em poolB/received ,
489and must not initially contain
490.Em poolB/received/fs .
491.Bd -literal
492# zfs send pool/fs@a | \e
493  ssh host zfs receive poolB/received/fs@a
494# zfs send -i a pool/fs@b | \e
495  ssh host zfs receive poolB/received/fs
496.Ed
497.It Sy Example 13 No Using the zfs receive -d Option
498The following command sends a full stream of
499.Em poolA/fsA/fsB@snap
500to a remote machine, receiving it into
501.Em poolB/received/fsA/fsB@snap .
502The
503.Em fsA/fsB@snap
504portion of the received snapshot's name is determined from the name of the sent
505snapshot.
506.Em poolB
507must contain the file system
508.Em poolB/received .
509If
510.Em poolB/received/fsA
511does not exist, it is created as an empty file system.
512.Bd -literal
513# zfs send poolA/fsA/fsB@snap | \e
514  ssh host zfs receive -d poolB/received
515.Ed
516.It Sy Example 14 No Setting User Properties
517The following example sets the user-defined
518.Sy com.example:department
519property for a dataset.
520.Bd -literal
521# zfs set com.example:department=12345 tank/accounting
522.Ed
523.It Sy Example 15 No Performing a Rolling Snapshot
524The following example shows how to maintain a history of snapshots with a
525consistent naming scheme.
526To keep a week's worth of snapshots, the user destroys the oldest snapshot,
527renames the remaining snapshots, and then creates a new snapshot, as follows:
528.Bd -literal
529# zfs destroy -r pool/users@7daysago
530# zfs rename -r pool/users@6daysago @7daysago
531# zfs rename -r pool/users@5daysago @6daysago
532# zfs rename -r pool/users@4daysago @5daysago
533# zfs rename -r pool/users@3daysago @4daysago
534# zfs rename -r pool/users@2daysago @3daysago
535# zfs rename -r pool/users@yesterday @2daysago
536# zfs rename -r pool/users@today @yesterday
537# zfs snapshot -r pool/users@today
538.Ed
539.It Sy Example 16 No Setting sharenfs Property Options on a ZFS File System
540The following commands show how to set
541.Sy sharenfs
542property options to enable
543.Sy rw
544access for a set of
545.Sy IP
546addresses and to enable root access for system
547.Sy neo
548on the
549.Em tank/home
550file system.
551.Bd -literal
552# zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home
553.Ed
554.Pp
555If you are using
556.Sy DNS
557for host name resolution, specify the fully qualified hostname.
558.It Sy Example 17 No Delegating ZFS Administration Permissions on a ZFS Dataset
559The following example shows how to set permissions so that user
560.Sy cindys
561can create, destroy, mount, and take snapshots on
562.Em tank/cindys .
563The permissions on
564.Em tank/cindys
565are also displayed.
566.Bd -literal
567# zfs allow cindys create,destroy,mount,snapshot tank/cindys
568# zfs allow tank/cindys
569---- Permissions on tank/cindys --------------------------------------
570Local+Descendent permissions:
571        user cindys create,destroy,mount,snapshot
572.Ed
573.Pp
574Because the
575.Em tank/cindys
576mount point permission is set to 755 by default, user
577.Sy cindys
578will be unable to mount file systems under
579.Em tank/cindys .
580Add an ACE similar to the following syntax to provide mount point access:
581.Bd -literal
582# chmod A+user:cindys:add_subdirectory:allow /tank/cindys
583.Ed
584.It Sy Example 18 No Delegating Create Time Permissions on a ZFS Dataset
585The following example shows how to grant anyone in the group
586.Sy staff
587to create file systems in
588.Em tank/users .
589This syntax also allows staff members to destroy their own file systems, but not
590destroy anyone else's file system.
591The permissions on
592.Em tank/users
593are also displayed.
594.Bd -literal
595# zfs allow staff create,mount tank/users
596# zfs allow -c destroy tank/users
597# zfs allow tank/users
598---- Permissions on tank/users ---------------------------------------
599Permission sets:
600        destroy
601Local+Descendent permissions:
602        group staff create,mount
603.Ed
604.It Sy Example 19 No Defining and Granting a Permission Set on a ZFS Dataset
605The following example shows how to define and grant a permission set on the
606.Em tank/users
607file system.
608The permissions on
609.Em tank/users
610are also displayed.
611.Bd -literal
612# zfs allow -s @pset create,destroy,snapshot,mount tank/users
613# zfs allow staff @pset tank/users
614# zfs allow tank/users
615---- Permissions on tank/users ---------------------------------------
616Permission sets:
617        @pset create,destroy,mount,snapshot
618Local+Descendent permissions:
619        group staff @pset
620.Ed
621.It Sy Example 20 No Delegating Property Permissions on a ZFS Dataset
622The following example shows to grant the ability to set quotas and reservations
623on the
624.Em users/home
625file system.
626The permissions on
627.Em users/home
628are also displayed.
629.Bd -literal
630# zfs allow cindys quota,reservation users/home
631# zfs allow users/home
632---- Permissions on users/home ---------------------------------------
633Local+Descendent permissions:
634        user cindys quota,reservation
635cindys% zfs set quota=10G users/home/marks
636cindys% zfs get quota users/home/marks
637NAME              PROPERTY  VALUE  SOURCE
638users/home/marks  quota     10G    local
639.Ed
640.It Sy Example 21 No Removing ZFS Delegated Permissions on a ZFS Dataset
641The following example shows how to remove the snapshot permission from the
642.Sy staff
643group on the
644.Em tank/users
645file system.
646The permissions on
647.Em tank/users
648are also displayed.
649.Bd -literal
650# zfs unallow staff snapshot tank/users
651# zfs allow tank/users
652---- Permissions on tank/users ---------------------------------------
653Permission sets:
654        @pset create,destroy,mount,snapshot
655Local+Descendent permissions:
656        group staff @pset
657.Ed
658.It Sy Example 22 No Showing the differences between a snapshot and a ZFS Dataset
659The following example shows how to see what has changed between a prior
660snapshot of a ZFS dataset and its current state.
661The
662.Fl F
663option is used to indicate type information for the files affected.
664.Bd -literal
665# zfs diff -F tank/test@before tank/test
666M       /       /tank/test/
667M       F       /tank/test/linked      (+1)
668R       F       /tank/test/oldname -> /tank/test/newname
669-       F       /tank/test/deleted
670+       F       /tank/test/created
671M       F       /tank/test/modified
672.Ed
673.It Sy Example 23 No Creating a bookmark
674The following example create a bookmark to a snapshot.
675This bookmark can then be used instead of snapshot in send streams.
676.Bd -literal
677# zfs bookmark rpool@snapshot rpool#bookmark
678.Ed
679.It Sy Example 24 No Setting sharesmb Property Options on a ZFS File System
680The following example show how to share SMB filesystem through ZFS.
681Note that that a user and his/her password must be given.
682.Bd -literal
683# smbmount //127.0.0.1/share_tmp /mnt/tmp \\
684  -o user=workgroup/turbo,password=obrut,uid=1000
685.Ed
686.Pp
687Minimal
688.Em /etc/samba/smb.conf
689configuration required:
690.Pp
691Samba will need to listen to 'localhost' (127.0.0.1) for the ZFS utilities to
692communicate with Samba.
693This is the default behavior for most Linux distributions.
694.Pp
695Samba must be able to authenticate a user.
696This can be done in a number of ways, depending on if using the system password file, LDAP or the Samba
697specific smbpasswd file.
698How to do this is outside the scope of this manual.
699Please refer to the
700.Xr smb.conf 5
701man page for more information.
702.Pp
703See the
704.Sy USERSHARE section
705of the
706.Xr smb.conf 5
707man page for all configuration options in case you need to modify any options
708to the share afterwards.
709Do note that any changes done with the
710.Xr net 8
711command will be undone if the share is ever unshared (such as at a reboot etc).
712.El
713.Sh ENVIRONMENT VARIABLES
714.Bl -tag -width "ZFS_MOUNT_HELPER"
715.It Ev ZFS_MOUNT_HELPER
716Cause
717.Nm zfs mount
718to use
719.Em /bin/mount
720to mount zfs datasets. This option is provided for backwards compatibility with older zfs versions.
721.El
722.Sh INTERFACE STABILITY
723.Sy Committed .
724.Sh SEE ALSO
725.Xr attr 1 ,
726.Xr gzip 1 ,
727.Xr ssh 1 ,
728.Xr chmod 2 ,
729.Xr fsync 2 ,
730.Xr stat 2 ,
731.Xr write 2 ,
732.Xr acl 5 ,
733.Xr attributes 5 ,
734.Xr exports 5 ,
735.Xr exportfs 8 ,
736.Xr mount 8 ,
737.Xr net 8 ,
738.Xr selinux 8 ,
739.Xr zfs-allow 8 ,
740.Xr zfs-bookmark 8 ,
741.Xr zfs-change-key 8 ,
742.Xr zfs-clone 8 ,
743.Xr zfs-create 8 ,
744.Xr zfs-destroy 8 ,
745.Xr zfs-diff 8 ,
746.Xr zfs-get 8 ,
747.Xr zfs-groupspace 8 ,
748.Xr zfs-hold 8 ,
749.Xr zfs-inherit 8 ,
750.Xr zfs-jail 8 ,
751.Xr zfs-list 8 ,
752.Xr zfs-load-key 8 ,
753.Xr zfs-mount 8 ,
754.Xr zfs-program 8 ,
755.Xr zfs-project 8 ,
756.Xr zfs-projectspace 8 ,
757.Xr zfs-promote 8 ,
758.Xr zfs-receive 8 ,
759.Xr zfs-redact 8 ,
760.Xr zfs-release 8 ,
761.Xr zfs-rename 8 ,
762.Xr zfs-rollback 8 ,
763.Xr zfs-send 8 ,
764.Xr zfs-set 8 ,
765.Xr zfs-share 8 ,
766.Xr zfs-snapshot 8 ,
767.Xr zfs-unallow 8 ,
768.Xr zfs-unjail 8 ,
769.Xr zfs-unload-key 8 ,
770.Xr zfs-unmount 8 ,
771.Xr zfs-unshare 8 ,
772.Xr zfs-upgrade 8 ,
773.Xr zfs-userspace 8 ,
774.Xr zfs-wait 8 ,
775.Xr zfsconcepts 8 ,
776.Xr zfsprops 8 ,
777.Xr zpool 8
778