xref: /freebsd/sys/contrib/openzfs/man/man8/zfs-share.8 (revision 271171e0d97b88ba2a7c3bf750c9672b484c1c13)
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
9*271171e0SMartin Matuska.\" or https://opensource.org/licenses/CDDL-1.0.
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) 2013 by Saso Kiselkov. All rights reserved.
25eda14cbcSMatt Macy.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
26eda14cbcSMatt Macy.\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
27eda14cbcSMatt Macy.\" Copyright (c) 2014 Integros [integros.com]
28eda14cbcSMatt Macy.\" Copyright 2019 Richard Laager. All rights reserved.
29eda14cbcSMatt Macy.\" Copyright 2018 Nexenta Systems, Inc.
30eda14cbcSMatt Macy.\" Copyright 2019 Joyent, Inc.
31eda14cbcSMatt Macy.\"
32e92ffd9bSMartin Matuska.Dd May 17, 2021
33eda14cbcSMatt Macy.Dt ZFS-SHARE 8
34eda14cbcSMatt Macy.Os
3516038816SMartin Matuska.
36eda14cbcSMatt Macy.Sh NAME
377877fdebSMatt Macy.Nm zfs-share
3816038816SMartin Matuska.Nd share and unshare ZFS filesystems
39eda14cbcSMatt Macy.Sh SYNOPSIS
407877fdebSMatt Macy.Nm zfs
41eda14cbcSMatt Macy.Cm share
42e92ffd9bSMartin Matuska.Op Fl l
4316038816SMartin Matuska.Fl a Ns | Ns Ar filesystem
447877fdebSMatt Macy.Nm zfs
45eda14cbcSMatt Macy.Cm unshare
4616038816SMartin Matuska.Fl a Ns | Ns Ar filesystem Ns | Ns Ar mountpoint
4716038816SMartin Matuska.
48eda14cbcSMatt Macy.Sh DESCRIPTION
49eda14cbcSMatt Macy.Bl -tag -width ""
50eda14cbcSMatt Macy.It Xo
517877fdebSMatt Macy.Nm zfs
52eda14cbcSMatt Macy.Cm share
53e92ffd9bSMartin Matuska.Op Fl l
5416038816SMartin Matuska.Fl a Ns | Ns Ar filesystem
55eda14cbcSMatt Macy.Xc
56eda14cbcSMatt MacyShares available ZFS file systems.
57eda14cbcSMatt Macy.Bl -tag -width "-a"
58e92ffd9bSMartin Matuska.It Fl l
59e92ffd9bSMartin MatuskaLoad keys for encrypted filesystems as they are being mounted.
60e92ffd9bSMartin MatuskaThis is equivalent to executing
61e92ffd9bSMartin Matuska.Nm zfs Cm load-key
62e92ffd9bSMartin Matuskaon each encryption root before mounting it.
63e92ffd9bSMartin MatuskaNote that if a filesystem has
64e92ffd9bSMartin Matuska.Sy keylocation Ns = Ns Sy prompt ,
65e92ffd9bSMartin Matuskathis will cause the terminal to interactively block after asking for the key.
66eda14cbcSMatt Macy.It Fl a
67eda14cbcSMatt MacyShare all available ZFS file systems.
68eda14cbcSMatt MacyInvoked automatically as part of the boot process.
69eda14cbcSMatt Macy.It Ar filesystem
70eda14cbcSMatt MacyShare the specified filesystem according to the
71eda14cbcSMatt Macy.Sy sharenfs
72eda14cbcSMatt Macyand
73eda14cbcSMatt Macy.Sy sharesmb
74eda14cbcSMatt Macyproperties.
75eda14cbcSMatt MacyFile systems are shared when the
76eda14cbcSMatt Macy.Sy sharenfs
77eda14cbcSMatt Macyor
78eda14cbcSMatt Macy.Sy sharesmb
79eda14cbcSMatt Macyproperty is set.
80eda14cbcSMatt Macy.El
81eda14cbcSMatt Macy.It Xo
827877fdebSMatt Macy.Nm zfs
83eda14cbcSMatt Macy.Cm unshare
8416038816SMartin Matuska.Fl a Ns | Ns Ar filesystem Ns | Ns Ar mountpoint
85eda14cbcSMatt Macy.Xc
86eda14cbcSMatt MacyUnshares currently shared ZFS file systems.
87eda14cbcSMatt Macy.Bl -tag -width "-a"
88eda14cbcSMatt Macy.It Fl a
89eda14cbcSMatt MacyUnshare all available ZFS file systems.
90eda14cbcSMatt MacyInvoked automatically as part of the shutdown process.
91eda14cbcSMatt Macy.It Ar filesystem Ns | Ns Ar mountpoint
92eda14cbcSMatt MacyUnshare the specified filesystem.
93eda14cbcSMatt MacyThe command can also be given a path to a ZFS file system shared on the system.
94eda14cbcSMatt Macy.El
95eda14cbcSMatt Macy.El
9616038816SMartin Matuska.
97eda14cbcSMatt Macy.Sh SEE ALSO
98eda14cbcSMatt Macy.Xr exports 5 ,
99eda14cbcSMatt Macy.Xr smb.conf 5 ,
1003ff01b23SMartin Matuska.Xr zfsprops 7
101