Changeset View
Changeset View
Standalone View
Standalone View
sbin/mdconfig/mdconfig.8
Show All 31 Lines | ||||||||||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |||||||||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | |||||||||||
.\" | .\" | |||||||||||
.\" @(#)vnconfig.8 8.1 (Berkeley) 6/5/93 | .\" @(#)vnconfig.8 8.1 (Berkeley) 6/5/93 | |||||||||||
.\" from: src/usr.sbin/vnconfig/vnconfig.8,v 1.19 2000/12/27 15:30:29 | .\" from: src/usr.sbin/vnconfig/vnconfig.8,v 1.19 2000/12/27 15:30:29 | |||||||||||
.\" | .\" | |||||||||||
.\" $FreeBSD$ | .\" $FreeBSD$ | |||||||||||
.\" | .\" | |||||||||||
.Dd November 6, 2020 | .Dd August 27, 2021 | |||||||||||
.Dt MDCONFIG 8 | .Dt MDCONFIG 8 | |||||||||||
.Os | .Os | |||||||||||
.Sh NAME | .Sh NAME | |||||||||||
.Nm mdconfig | .Nm mdconfig | |||||||||||
.Nd create and control memory disks | .Nd create and control memory disks | |||||||||||
.Sh SYNOPSIS | .Sh SYNOPSIS | |||||||||||
.Nm | .Nm | |||||||||||
.Fl a | .Fl a | |||||||||||
▲ Show 20 Lines • Show All 192 Lines • ▼ Show 20 Lines | ||||||||||||
.It Oo Cm no Oc Ns Cm force | .It Oo Cm no Oc Ns Cm force | |||||||||||
Disable/enable extra sanity checks to prevent the user from doing something | Disable/enable extra sanity checks to prevent the user from doing something | |||||||||||
that might adversely affect the system. | that might adversely affect the system. | |||||||||||
This can be used with the | This can be used with the | |||||||||||
.Fl d | .Fl d | |||||||||||
flag to forcibly destroy an | flag to forcibly destroy an | |||||||||||
.Xr md 4 | .Xr md 4 | |||||||||||
disk that is still in use. | disk that is still in use. | |||||||||||
.It Oo Cm no Oc Ns Cm mustdealloc | ||||||||||||
For | ||||||||||||
.Cm vnode | ||||||||||||
backed devices: detect whether hole-punching is supported by the underlying file | ||||||||||||
markjUnsubmitted Done Inline Actions
markj: | ||||||||||||
system. | ||||||||||||
If the file system supports hole-punching, then to handle a | ||||||||||||
Done Inline Actions
markj: | ||||||||||||
.Dv BIO_DELETE | ||||||||||||
request, some or all of the request's operation range may be turned into a hole | ||||||||||||
Done Inline Actions
markj: | ||||||||||||
in the file used for backing store. | ||||||||||||
Any parts which are not turned into holes are zero-filled in | ||||||||||||
the file. | ||||||||||||
If the file system does not support | ||||||||||||
Done Inline Actions
markj: | ||||||||||||
hole-punching, | ||||||||||||
.Dv BIO_DELETE | ||||||||||||
requests to the device are not handled and will fail with | ||||||||||||
Done Inline Actions
markj: | ||||||||||||
.Er EOPNOTSUPP . | ||||||||||||
.Pp | ||||||||||||
Done Inline Actions
markj: | ||||||||||||
When | ||||||||||||
.Cm mustdealloc | ||||||||||||
is not specified or | ||||||||||||
.Oo Cm no Oc Ns Cm mustdealloc | ||||||||||||
is specified, for a | ||||||||||||
.Dv BIO_DELETE | ||||||||||||
Done Inline Actions
markj: | ||||||||||||
request, if the file system supports hole-punching, some or all of the request's | ||||||||||||
operation range may be turned into a hole in the file used for backing store. | ||||||||||||
Any parts which are not turned into holes are zero-filled in the file. | ||||||||||||
If the file system of the vnode type memory disk does not support hole-punching, | ||||||||||||
the request's operation range is zero-filled in the file. | ||||||||||||
.It Oo Cm no Oc Ns Cm readonly | .It Oo Cm no Oc Ns Cm readonly | |||||||||||
Enable/disable readonly mode. | Enable/disable readonly mode. | |||||||||||
.It Oo Cm no Oc Ns Cm verify | .It Oo Cm no Oc Ns Cm verify | |||||||||||
For | For | |||||||||||
.Cm vnode | .Cm vnode | |||||||||||
backed devices: enable/disable requesting verification of the | backed devices: enable/disable requesting verification of the | |||||||||||
file used for backing store. | file used for backing store. | |||||||||||
The type of verification depends on which security features are available. | The type of verification depends on which security features are available. | |||||||||||
One example of verification is testing file integrity with | One example of verification is testing file integrity with | |||||||||||
checksums or cryptographic signatures. | checksums or cryptographic signatures. | |||||||||||
.El | .El | |||||||||||
.It Fl u Ar unit | .It Fl u Ar unit | |||||||||||
Not Done Inline ActionsI think it could be a bit more clear:
"autounmap" also seems like a somewhat strange name to me. Is it named after something similar elsewhere? markj: I think it could be a bit more clear:
- Start the description with "For .Cm vnode backed… | ||||||||||||
Not Done Inline ActionsDo you think "mayunmap" is a better name? khng: Do you think "mayunmap" is a better name? | ||||||||||||
Not Done Inline ActionsIs "unmap" the usual terminology? fspacectl.2 refers to space deallocation, and we have _PC_DEALLOC_PRESENT, so maybe "mustdealloc"? markj: Is "unmap" the usual terminology? fspacectl.2 refers to space deallocation, and we have… | ||||||||||||
Request a specific unit number or device name for the | Request a specific unit number or device name for the | |||||||||||
.Xr md 4 | .Xr md 4 | |||||||||||
Done Inline Actions
markj: | ||||||||||||
device instead of automatic allocation. | device instead of automatic allocation. | |||||||||||
If a device name is specified, it must start with | If a device name is specified, it must start with | |||||||||||
.Dq md | .Dq md | |||||||||||
followed by the unit number. | followed by the unit number. | |||||||||||
.El | .El | |||||||||||
.Pp | .Pp | |||||||||||
The last form, | The last form, | |||||||||||
.Nm | .Nm | |||||||||||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | ||||||||||||
.Pa md1.nop | .Pa md1.nop | |||||||||||
to the start of the filesystem in the image. | to the start of the filesystem in the image. | |||||||||||
.Bd -literal -offset indent | .Bd -literal -offset indent | |||||||||||
mdconfig -u md1 -f diskimage.img | mdconfig -u md1 -f diskimage.img | |||||||||||
gnop create -o 512K md1 | gnop create -o 512K md1 | |||||||||||
mount /dev/md1.nop /mnt | mount /dev/md1.nop /mnt | |||||||||||
.Ed | .Ed | |||||||||||
.Sh SEE ALSO | .Sh SEE ALSO | |||||||||||
.Xr fpathconf 2 , | ||||||||||||
.Xr fspacectl 2 , | ||||||||||||
.Xr open 2 , | .Xr open 2 , | |||||||||||
.Xr md 4 , | .Xr md 4 , | |||||||||||
.Xr ffs 7 , | .Xr ffs 7 , | |||||||||||
.Xr gpart 8 , | .Xr gpart 8 , | |||||||||||
.Xr mdmfs 8 , | .Xr mdmfs 8 , | |||||||||||
.Xr malloc 9 | .Xr malloc 9 , | |||||||||||
.Xr vn_deallocate 9 | ||||||||||||
.Sh HISTORY | .Sh HISTORY | |||||||||||
The | The | |||||||||||
.Nm | .Nm | |||||||||||
utility first appeared in | utility first appeared in | |||||||||||
.Fx 5.0 | .Fx 5.0 | |||||||||||
as a cleaner replacement for the vn kernel module | as a cleaner replacement for the vn kernel module | |||||||||||
and the vnconfig utility combo. | and the vnconfig utility combo. | |||||||||||
.Sh AUTHORS | .Sh AUTHORS | |||||||||||
The | The | |||||||||||
.Nm | .Nm | |||||||||||
utility was written by | utility was written by | |||||||||||
.An Poul-Henning Kamp Aq Mt phk@FreeBSD.org . | .An Poul-Henning Kamp Aq Mt phk@FreeBSD.org . |