1.\" SPDX-License-Identifier: CDDL-1.0 2.\" 3.\" CDDL HEADER START 4.\" 5.\" The contents of this file are subject to the terms of the 6.\" Common Development and Distribution License (the "License"). 7.\" You may not use this file except in compliance with the License. 8.\" 9.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10.\" or https://opensource.org/licenses/CDDL-1.0. 11.\" See the License for the specific language governing permissions 12.\" and limitations under the License. 13.\" 14.\" When distributing Covered Code, include this CDDL HEADER in each 15.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16.\" If applicable, add the following below this CDDL HEADER, with the 17.\" fields enclosed by brackets "[]" replaced with your own identifying 18.\" information: Portions Copyright [yyyy] [name of copyright owner] 19.\" 20.\" CDDL HEADER END 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) 2013 by Saso Kiselkov. All rights reserved. 26.\" Copyright (c) 2014, Joyent, Inc. All rights reserved. 27.\" Copyright (c) 2014 by Adam Stevko. All rights reserved. 28.\" Copyright (c) 2014 Integros [integros.com] 29.\" Copyright 2019 Richard Laager. All rights reserved. 30.\" Copyright 2018 Nexenta Systems, Inc. 31.\" Copyright 2019 Joyent, Inc. 32.\" 33.Dd May 17, 2021 34.Dt ZFS-SHARE 8 35.Os 36. 37.Sh NAME 38.Nm zfs-share 39.Nd share and unshare ZFS filesystems 40.Sh SYNOPSIS 41.Nm zfs 42.Cm share 43.Op Fl l 44.Fl a Ns | Ns Ar filesystem 45.Nm zfs 46.Cm unshare 47.Fl a Ns | Ns Ar filesystem Ns | Ns Ar mountpoint 48. 49.Sh DESCRIPTION 50.Bl -tag -width "" 51.It Xo 52.Nm zfs 53.Cm share 54.Op Fl l 55.Fl a Ns | Ns Ar filesystem 56.Xc 57Shares available ZFS file systems. 58.Bl -tag -width "-a" 59.It Fl l 60Load keys for encrypted filesystems as they are being mounted. 61This is equivalent to executing 62.Nm zfs Cm load-key 63on each encryption root before mounting it. 64Note that if a filesystem has 65.Sy keylocation Ns = Ns Sy prompt , 66this will cause the terminal to interactively block after asking for the key. 67.It Fl a 68Share all available ZFS file systems. 69Invoked automatically as part of the boot process. 70.It Ar filesystem 71Share the specified filesystem according to the 72.Sy sharenfs 73and 74.Sy sharesmb 75properties. 76File systems are shared when the 77.Sy sharenfs 78or 79.Sy sharesmb 80property is set. 81.El 82.It Xo 83.Nm zfs 84.Cm unshare 85.Fl a Ns | Ns Ar filesystem Ns | Ns Ar mountpoint 86.Xc 87Unshares currently shared ZFS file systems. 88.Bl -tag -width "-a" 89.It Fl a 90Unshare all available ZFS file systems. 91Invoked automatically as part of the shutdown process. 92.It Ar filesystem Ns | Ns Ar mountpoint 93Unshare the specified filesystem. 94The command can also be given a path to a ZFS file system shared on the system. 95.El 96.El 97. 98.Sh SEE ALSO 99.Xr exports 5 , 100.Xr smb.conf 5 , 101.Xr zfsprops 7 102