]> git.proxmox.com Git - mirror_zfs.git/blame - man/man8/zfs-jail.8
Move properties, parameters, events, and concepts around manual sections
[mirror_zfs.git] / man / man8 / zfs-jail.8
CommitLineData
4bc72196
MM
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.\"
4bc72196
MM
21.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
22.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
23.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
24.\" Copyright (c) 2011, Pawel Jakub Dawidek <pjd@FreeBSD.org>
25.\" Copyright (c) 2012, Glen Barber <gjb@FreeBSD.org>
26.\" Copyright (c) 2012, Bryan Drewery <bdrewery@FreeBSD.org>
27.\" Copyright (c) 2013, Steven Hartland <smh@FreeBSD.org>
28.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
29.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
30.\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
31.\" Copyright (c) 2014 Integros [integros.com]
32.\" Copyright (c) 2014, Xin LI <delphij@FreeBSD.org>
33.\" Copyright (c) 2014-2015, The FreeBSD Foundation, All Rights Reserved.
34.\" Copyright (c) 2016 Nexenta Systems, Inc. All Rights Reserved.
35.\" Copyright 2019 Richard Laager. All rights reserved.
36.\" Copyright 2018 Nexenta Systems, Inc.
37.\" Copyright 2019 Joyent, Inc.
38.\"
f84fe3fc 39.Dd May 27, 2021
4bc72196 40.Dt ZFS-JAIL 8
f84fe3fc
AZ
41.Os
42.
4bc72196 43.Sh NAME
1e36af8c 44.Nm zfs-jail
f84fe3fc 45.Nd attach or detach ZFS filesystem from FreeBSD jail
4bc72196 46.Sh SYNOPSIS
f84fe3fc
AZ
47.Nm zfs Cm jail
48.Ar jailid Ns | Ns Ar jailname
49.Ar filesystem
50.Nm zfs Cm unjail
51.Ar jailid Ns | Ns Ar jailname
52.Ar filesystem
53.
4bc72196
MM
54.Sh DESCRIPTION
55.Bl -tag -width ""
56.It Xo
1e36af8c 57.Nm zfs
4bc72196 58.Cm jail
f84fe3fc
AZ
59.Ar jailid Ns | Ns Ar jailname
60.Ar filesystem
4bc72196 61.Xc
f84fe3fc 62Attach the specified
4bc72196
MM
63.Ar filesystem
64to the jail identified by JID
f84fe3fc
AZ
65.Ar jailid
66or name
67.Ar jailname .
4bc72196
MM
68From now on this file system tree can be managed from within a jail if the
69.Sy jailed
f84fe3fc
AZ
70property has been set.
71To use this functionality, the jail needs the
72.Sy allow.mount
4bc72196 73and
f84fe3fc
AZ
74.Sy allow.mount.zfs
75parameters set to
76.Sy 1
77and the
78.Sy enforce_statfs
79parameter set to a value lower than
80.Sy 2 .
81.Pp
82You cannot attach a jailed dataset's children to another jail.
83You can also not attach the root file system
84of the jail or any dataset which needs to be mounted before the zfs rc script
85is run inside the jail, as it would be attached unmounted until it is
86mounted from the rc script inside the jail.
87.Pp
88To allow management of the dataset from within a jail, the
89.Sy jailed
90property has to be set and the jail needs access to the
91.Pa /dev/zfs
92device.
93The
94.Sy quota
95property cannot be changed from within a jail.
96.Pp
97After a dataset is attached to a jail and the
98.Sy jailed
99property is set, a jailed file system cannot be mounted outside the jail,
100since the jail administrator might have set the mount point to an unacceptable value.
4bc72196
MM
101.Pp
102See
103.Xr jail 8
f84fe3fc
AZ
104for more information on managing jails.
105Jails are a
106.Fx
107feature and are not relevant on other platforms.
4bc72196 108.It Xo
1e36af8c 109.Nm zfs
4bc72196 110.Cm unjail
f84fe3fc
AZ
111.Ar jailid Ns | Ns Ar jailname
112.Ar filesystem
4bc72196 113.Xc
4bc72196
MM
114Detaches the specified
115.Ar filesystem
116from the jail identified by JID
f84fe3fc
AZ
117.Ar jailid
118or name
119.Ar jailname .
4bc72196
MM
120.El
121.Sh SEE ALSO
2badb345
AZ
122.Xr zfsprops 7 ,
123.Xr jail 8