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.
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.
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]
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.
45 .Nd Attaches and detaches ZFS filesystems from FreeBSD jails.
47 dataset can be attached to a jail by using the
49 subcommand. You cannot attach a dataset to one jail and the children of the
50 same dataset to another jail. You can also not attach the root file system
51 of the jail or any dataset which needs to be mounted before the zfs rc script
52 is run inside the jail, as it would be attached unmounted until it is
53 mounted from the rc script inside the jail. To allow management of the
54 dataset from within a jail, the
56 property has to be set and the jail needs access to the
60 property cannot be changed from within a jail. See
62 for information on how to allow mounting
64 datasets from within a jail.
67 dataset can be detached from a jail using the
71 After a dataset is attached to a jail and the jailed property is set, a jailed
72 file system cannot be mounted outside the jail, since the jail administrator
73 might have set the mount point to an unacceptable value.
77 .Ar jailid Ns | Ns Ar jailname filesystem
80 .Ar jailid Ns | Ns Ar jailname filesystem
89 Attaches the specified
91 to the jail identified by JID
93 From now on this file system tree can be managed from within a jail if the
95 property has been set. To use this functuinality, the jail needs the
99 parameters set to 1 and the
101 parameter set to a value lower than 2.
105 for more information on managing jails and configuring the parameters above.
109 .Ar jailid filesystem
112 Detaches the specified
114 from the jail identified by JID