Skip to content

Commit bac17e4

Browse files
committed
zfs-jail.8: Add introductory sentence, refactor
Add an introductory sentance explaining why the reader may want to use this command, and establishing the requirement that the jail must be running. Move other requirements from the description of the subcommands to follow this for flow and structure. Move the caveat that this is for FreeBSD down to a cannonical CAVEATS section, and mention that this utility can not be used to delegate the root directory of the jail to that section also. Event: OpenZFS Production User Call Reported by: Jan Brankamp <crest@rlwinm.de> Signed-off-by: Alexander Ziaee <ziaee@FreeBSD.org>
1 parent f819b41 commit bac17e4

File tree

1 file changed

+44
-29
lines changed

1 file changed

+44
-29
lines changed

man/man8/zfs-jail.8

Lines changed: 44 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
.\" Copyright 2018 Nexenta Systems, Inc.
3838
.\" Copyright 2019 Joyent, Inc.
3939
.\"
40-
.Dd July 11, 2022
40+
.Dd October 30, 2025
4141
.Dt ZFS-JAIL 8
4242
.Os
4343
.
@@ -53,9 +53,40 @@
5353
.Ar filesystem
5454
.
5555
.Sh DESCRIPTION
56-
.Bl -tag -width ""
56+
The
57+
.Nm
58+
utility can be used to assign a dataset onto a running
59+
.Fx
60+
system
61+
.Xr jail 4 ,
62+
allowing
63+
.Xr zfs 8
64+
management utilities to be run inside of the
65+
.Xr jail 4 .
66+
.Pp
67+
To allow management of the dataset from within a jail, the
68+
.Sy jailed
69+
property has to be set and the jail needs access to the
70+
.Pa /dev/zfs
71+
device.
72+
The
73+
.Sy quota
74+
property cannot be changed from within a jail.
75+
.Pp
76+
To use this functionality, the jail needs the
77+
.Sy allow.mount
78+
and
79+
.Sy allow.mount.zfs
80+
parameters set to
81+
.Sy 1
82+
and the
83+
.Sy enforce_statfs
84+
parameter set to a value lower than
85+
.Sy 2 .
86+
.Pp
87+
The subcommands are as follows:
88+
.Bl -tag -width indent
5789
.It Xo
58-
.Nm zfs
5990
.Cm jail
6091
.Ar jailid Ns | Ns Ar jailname
6192
.Ar filesystem
@@ -69,46 +100,20 @@ or name
69100
From now on this file system tree can be managed from within a jail if the
70101
.Sy jailed
71102
property has been set.
72-
To use this functionality, the jail needs the
73-
.Sy allow.mount
74-
and
75-
.Sy allow.mount.zfs
76-
parameters set to
77-
.Sy 1
78-
and the
79-
.Sy enforce_statfs
80-
parameter set to a value lower than
81-
.Sy 2 .
82103
.Pp
83104
You cannot attach a jailed dataset's children to another jail.
84105
You can also not attach the root file system
85106
of the jail or any dataset which needs to be mounted before the zfs rc script
86107
is run inside the jail, as it would be attached unmounted until it is
87108
mounted from the rc script inside the jail.
88109
.Pp
89-
To allow management of the dataset from within a jail, the
90-
.Sy jailed
91-
property has to be set and the jail needs access to the
92-
.Pa /dev/zfs
93-
device.
94-
The
95-
.Sy quota
96-
property cannot be changed from within a jail.
97-
.Pp
98110
After a dataset is attached to a jail and the
99111
.Sy jailed
100112
property is set, a jailed file system cannot be mounted outside the jail,
101113
since the jail administrator might have set the mount point to an unacceptable
102114
value.
103115
.Pp
104-
See
105-
.Xr jail 8
106-
for more information on managing jails.
107-
Jails are a
108-
.Fx
109-
feature and are not relevant on other platforms.
110116
.It Xo
111-
.Nm zfs
112117
.Cm unjail
113118
.Ar jailid Ns | Ns Ar jailname
114119
.Ar filesystem
@@ -123,3 +128,13 @@ or name
123128
.Sh SEE ALSO
124129
.Xr zfsprops 7 ,
125130
.Xr jail 8
131+
.Sh CAVEATS
132+
The root directory of jail can not be delegated to the jail with this
133+
utility because the jail must be running with a valid root directory.
134+
.Pp
135+
Jails are a
136+
.Fx
137+
feature and are not relevant on other platforms.
138+
See
139+
.Xr jail 8
140+
for more information on managing jails.

0 commit comments

Comments
 (0)