aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-12-11 11:58:37 -0800
committerBrian Behlendorf <[email protected]>2019-12-11 11:58:37 -0800
commit4bc721965ff272ad59c6e8a130a544e1e2c01b34 (patch)
tree0a177852b0609de4e6dc19a4ec73ec1c3e7e382d /man
parent657ce253575295ef680eb33cf4ef698548212a46 (diff)
Add FreeBSD jail support hooks
Add the 'zfs jail/unjail' subcommands along with the relevant documentation from FreeBSD. This feature is not supported on Linux and still requires the match kernel ioctls which will be included when the FreeBSD platform code is integrated. Reviewed-by: Jorgen Lundman <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #9686
Diffstat (limited to 'man')
-rw-r--r--man/man8/Makefile.am2
-rw-r--r--man/man8/zfs-jail.8119
l---------man/man8/zfs-unjail.81
-rw-r--r--man/man8/zfs.814
-rw-r--r--man/man8/zfsprops.817
5 files changed, 152 insertions, 1 deletions
diff --git a/man/man8/Makefile.am b/man/man8/Makefile.am
index 33e502ed2..a4cd9f567 100644
--- a/man/man8/Makefile.am
+++ b/man/man8/Makefile.am
@@ -17,6 +17,7 @@ dist_man_MANS = \
zfs-groupspace.8 \
zfs-hold.8 \
zfs-inherit.8 \
+ zfs-jail.8 \
zfs-list.8 \
zfs-load-key.8 \
zfs-mount.8 \
@@ -35,6 +36,7 @@ dist_man_MANS = \
zfs-share.8 \
zfs-snapshot.8 \
zfs-unallow.8 \
+ zfs-unjail.8 \
zfs-unload-key.8 \
zfs-unmount.8 \
zfs-upgrade.8 \
diff --git a/man/man8/zfs-jail.8 b/man/man8/zfs-jail.8
new file mode 100644
index 000000000..8274179bb
--- /dev/null
+++ b/man/man8/zfs-jail.8
@@ -0,0 +1,119 @@
+.\"
+.\" CDDL HEADER START
+.\"
+.\" The contents of this file are subject to the terms of the
+.\" Common Development and Distribution License (the "License").
+.\" You may not use this file except in compliance with the License.
+.\"
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+.\" or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions
+.\" and limitations under the License.
+.\"
+.\" When distributing Covered Code, include this CDDL HEADER in each
+.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+.\" If applicable, add the following below this CDDL HEADER, with the
+.\" fields enclosed by brackets "[]" replaced with your own identifying
+.\" information: Portions Copyright [yyyy] [name of copyright owner]
+.\"
+.\" CDDL HEADER END
+.\"
+.\"
+.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 2011 Joshua M. Clulow <[email protected]>
+.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
+.\" Copyright (c) 2011, Pawel Jakub Dawidek <[email protected]>
+.\" Copyright (c) 2012, Glen Barber <[email protected]>
+.\" Copyright (c) 2012, Bryan Drewery <[email protected]>
+.\" Copyright (c) 2013, Steven Hartland <[email protected]>
+.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
+.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
+.\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
+.\" Copyright (c) 2014 Integros [integros.com]
+.\" Copyright (c) 2014, Xin LI <[email protected]>
+.\" Copyright (c) 2014-2015, The FreeBSD Foundation, All Rights Reserved.
+.\" Copyright (c) 2016 Nexenta Systems, Inc. All Rights Reserved.
+.\" Copyright 2019 Richard Laager. All rights reserved.
+.\" Copyright 2018 Nexenta Systems, Inc.
+.\" Copyright 2019 Joyent, Inc.
+.\"
+.Dd December 9, 2019
+.Dt ZFS-JAIL 8
+.Os FreeBSD
+.Sh NAME
+.Nm zfs Ns Pf - Cm jail
+.Nd Attaches and detaches ZFS filesystems from FreeBSD jails.
+.No A Tn ZFS
+dataset can be attached to a jail by using the
+.Qq Nm Cm jail
+subcommand. You cannot attach a dataset to one jail and the children of the
+same dataset to another jail. You can also not attach the root file system
+of the jail or any dataset which needs to be mounted before the zfs rc script
+is run inside the jail, as it would be attached unmounted until it is
+mounted from the rc script inside the jail. To allow management of the
+dataset from within a jail, the
+.Sy jailed
+property has to be set and the jail needs access to the
+.Pa /dev/zfs
+device. The
+.Sy quota
+property cannot be changed from within a jail. See
+.Xr jail 8
+for information on how to allow mounting
+.Tn ZFS
+datasets from within a jail.
+.Pp
+.No A Tn ZFS
+dataset can be detached from a jail using the
+.Qq Nm Cm unjail
+subcommand.
+.Pp
+After a dataset is attached to a jail and the jailed property is set, a jailed
+file system cannot be mounted outside the jail, since the jail administrator
+might have set the mount point to an unacceptable value.
+.Sh SYNOPSIS
+.Nm
+.Cm jail
+.Ar jailid Ns | Ns Ar jailname filesystem
+.Nm
+.Cm unjail
+.Ar jailid Ns | Ns Ar jailname filesystem
+.Sh DESCRIPTION
+.Bl -tag -width ""
+.It Xo
+.Nm
+.Cm jail
+.Ar jailid filesystem
+.Xc
+.Pp
+Attaches the specified
+.Ar filesystem
+to the jail identified by JID
+.Ar jailid .
+From now on this file system tree can be managed from within a jail if the
+.Sy jailed
+property has been set. To use this functuinality, the jail needs the
+.Va allow.mount
+and
+.Va allow.mount.zfs
+parameters set to 1 and the
+.Va enforce_statfs
+parameter set to a value lower than 2.
+.Pp
+See
+.Xr jail 8
+for more information on managing jails and configuring the parameters above.
+.It Xo
+.Nm
+.Cm unjail
+.Ar jailid filesystem
+.Xc
+.Pp
+Detaches the specified
+.Ar filesystem
+from the jail identified by JID
+.Ar jailid .
+.El
+.Sh SEE ALSO
+.Xr jail 8 ,
+.Xr zfsprops 8
diff --git a/man/man8/zfs-unjail.8 b/man/man8/zfs-unjail.8
new file mode 120000
index 000000000..04cc05a00
--- /dev/null
+++ b/man/man8/zfs-unjail.8
@@ -0,0 +1 @@
+zfs-jail.8 \ No newline at end of file
diff --git a/man/man8/zfs.8 b/man/man8/zfs.8
index 1f100ab9e..62b7f1f8a 100644
--- a/man/man8/zfs.8
+++ b/man/man8/zfs.8
@@ -22,10 +22,17 @@
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <[email protected]>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
+.\" Copyright (c) 2011, Pawel Jakub Dawidek <[email protected]>
+.\" Copyright (c) 2012, Glen Barber <[email protected]>
+.\" Copyright (c) 2012, Bryan Drewery <[email protected]>
+.\" Copyright (c) 2013, Steven Hartland <[email protected]>
.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
.\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
.\" Copyright (c) 2014 Integros [integros.com]
+.\" Copyright (c) 2014, Xin LI <[email protected]>
+.\" Copyright (c) 2014-2015, The FreeBSD Foundation, All Rights Reserved.
+.\" Copyright (c) 2016 Nexenta Systems, Inc. All Rights Reserved.
.\" Copyright 2019 Richard Laager. All rights reserved.
.\" Copyright 2018 Nexenta Systems, Inc.
.\" Copyright 2019 Joyent, Inc.
@@ -267,6 +274,13 @@ Unload a key for the specified dataset, removing the ability to access the datas
Execute ZFS administrative operations
programmatically via a Lua script-language channel program.
.El
+.Ss Jails
+.Bl -tag -width ""
+.It Xr zfs-jail 8
+Attaches a filesystem to a jail.
+.It Xr zfs-unjail 8
+Detaches a filesystem from a jail.
+.El
.Sh EXIT STATUS
The
.Nm
diff --git a/man/man8/zfsprops.8 b/man/man8/zfsprops.8
index 7318361af..da3280a9f 100644
--- a/man/man8/zfsprops.8
+++ b/man/man8/zfsprops.8
@@ -22,10 +22,17 @@
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <[email protected]>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
+.\" Copyright (c) 2011, Pawel Jakub Dawidek <[email protected]>
+.\" Copyright (c) 2012, Glen Barber <[email protected]>
+.\" Copyright (c) 2012, Bryan Drewery <[email protected]>
+.\" Copyright (c) 2013, Steven Hartland <[email protected]>
.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
.\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
.\" Copyright (c) 2014 Integros [integros.com]
+.\" Copyright (c) 2016 Nexenta Systems, Inc. All Rights Reserved.
+.\" Copyright (c) 2014, Xin LI <[email protected]>
+.\" Copyright (c) 2014-2015, The FreeBSD Foundation, All Rights Reserved.
.\" Copyright 2019 Richard Laager. All rights reserved.
.\" Copyright 2018 Nexenta Systems, Inc.
.\" Copyright 2019 Joyent, Inc.
@@ -1709,9 +1716,17 @@ are equivalent to the
and
.Sy noxattr
mount options.
+.It Sy jailed Ns = Ns Cm off | on
+Controls whether the dataset is managed from a jail. See the
+.Qq Sx Jails
+section in
+.Xr zfs 8
+for more information. Jails are a FreeBSD feature and are not relevant on
+other platforms. The default value is
+.Cm off .
.It Sy zoned Ns = Ns Sy on Ns | Ns Sy off
Controls whether the dataset is managed from a non-global zone. Zones are a
-Solaris feature and are not relevant on Linux. The default value is
+Solaris feature and are not relevant on other platforms. The default value is
.Sy off .
.El
.Pp