Skip to content

Commit eeb46b5

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 crossreference Linux's equivelant functionality. 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> Co-authored-by: Allan Jude <allan@klarasystems.com> Signed-off-by: Alexander Ziaee <ziaee@FreeBSD.org>
1 parent f819b41 commit eeb46b5

File tree

1 file changed

+49
-29
lines changed

1 file changed

+49
-29
lines changed

man/man8/zfs-jail.8

Lines changed: 49 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 November 4, 2025
4141
.Dt ZFS-JAIL 8
4242
.Os
4343
.
@@ -53,9 +53,42 @@
5353
.Ar filesystem
5454
.
5555
.Sh DESCRIPTION
56-
.Bl -tag -width ""
56+
The
57+
.Nm
58+
functionality 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 should be set and the required
70+
.Xr devfs.conf 5
71+
entries to expose
72+
.Pa /dev/zfs
73+
device within the jail must be present.
74+
The
75+
.Sy quota
76+
property cannot be changed from within a jail.
77+
.Pp
78+
To use this functionality, the jail needs the
79+
.Sy allow.mount
80+
and
81+
.Sy allow.mount.zfs
82+
parameters set to
83+
.Sy 1
84+
and the
85+
.Sy enforce_statfs
86+
parameter set to a value lower than
87+
.Sy 2 .
88+
.Pp
89+
The subcommands are as follows:
90+
.Bl -tag -width indent
5791
.It Xo
58-
.Nm zfs
5992
.Cm jail
6093
.Ar jailid Ns | Ns Ar jailname
6194
.Ar filesystem
@@ -69,46 +102,20 @@ or name
69102
From now on this file system tree can be managed from within a jail if the
70103
.Sy jailed
71104
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 .
82105
.Pp
83106
You cannot attach a jailed dataset's children to another jail.
84107
You can also not attach the root file system
85108
of the jail or any dataset which needs to be mounted before the zfs rc script
86109
is run inside the jail, as it would be attached unmounted until it is
87110
mounted from the rc script inside the jail.
88111
.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
98112
After a dataset is attached to a jail and the
99113
.Sy jailed
100114
property is set, a jailed file system cannot be mounted outside the jail,
101115
since the jail administrator might have set the mount point to an unacceptable
102116
value.
103117
.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.
110118
.It Xo
111-
.Nm zfs
112119
.Cm unjail
113120
.Ar jailid Ns | Ns Ar jailname
114121
.Ar filesystem
@@ -121,5 +128,18 @@ or name
121128
.Ar jailname .
122129
.El
123130
.Sh SEE ALSO
131+
.Xr devfs.conf 5 ,
124132
.Xr zfsprops 7 ,
125133
.Xr jail 8
134+
.Sh CAVEATS
135+
The root directory of jail can not be delegated to the jail with this
136+
utility because the jail must be running with a valid root directory.
137+
.Pp
138+
Jails are a
139+
.Fx
140+
feature and are not relevant on other platforms.
141+
See
142+
.Xr jail 8
143+
for more information on managing jails, or
144+
.Xr zfs-zone 8
145+
for the equivelant functionality on Linux.

0 commit comments

Comments
 (0)