diff options
author | sheldonh <sheldonh@FreeBSD.org> | 2000-07-07 11:52:03 +0000 |
---|---|---|
committer | sheldonh <sheldonh@FreeBSD.org> | 2000-07-07 11:52:03 +0000 |
commit | d3d5fc1a489bbbd56225301389a4d9da2d8ccca4 (patch) | |
tree | ab0cc8f4d8daf41d58f5f3f3d651fb3e331f7bba /share/man/man4/md.4 | |
parent | 94bc8a09a9ae84427da54035cd40f378c9e1f675 (diff) | |
download | FreeBSD-src-d3d5fc1a489bbbd56225301389a4d9da2d8ccca4.zip FreeBSD-src-d3d5fc1a489bbbd56225301389a4d9da2d8ccca4.tar.gz |
Add phk's md(4) manual page, written by phk himself.
Diffstat (limited to 'share/man/man4/md.4')
-rw-r--r-- | share/man/man4/md.4 | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/share/man/man4/md.4 b/share/man/man4/md.4 new file mode 100644 index 0000000..1d1d798 --- /dev/null +++ b/share/man/man4/md.4 @@ -0,0 +1,113 @@ +.\" ---------------------------------------------------------------------------- +.\" "THE BEER-WARE LICENSE" (Revision 42): +.\" <phk@FreeBSD.ORG> wrote this file. As long as you retain this notice you +.\" can do whatever you want with this stuff. If we meet some day, and you think +.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp +.\" ---------------------------------------------------------------------------- +.\" +.\" $FreeBSD$ +.\" +.Dd July 4, 2000 +.Dt MD 4 +.Os +.Sh NAME +.Nm md +.Nd memory disk +.Sh SYNOPSIS +.Cd device md +.Sh DESCRIPTION +The +.Nm +driver provides support for two kinds of memory backed virtual disks: +.Xr malloc 9 +backed +and pre-loaded module backed. +.Pp +The +.Xr malloc 9 +backed +disks +are severely limited in size by constraints imposed by +.Xr malloc 9 . +The limit imposed depends on the amount of physical RAM in the machine, +and covers all +.Xr malloc 9 +backed instances of +.Nm +devices. +.Pp +A sector filled with identical bytes does not consume storage, +and therefore the storage allocated by a +.Nm +disk can be freed with a command such as this: +.Bd -literal -offset indent +dd if=/dev/zero of=/dev/md567 +.Ed +.Pp +The default maximum size of a +.Nm +disk +backed by +.Xr malloc 9 +is 20,000 sectors of 512 bytes each. +This can be changed +with the kernel option +.Dv MDNSECT . +.Pp +At boot time the +.Nm +driver will search for pre-loaded modules of type +.Sq md_image +and instantiate a +.Nm +device for each of these modules. +The type +.Sq mfs_root +is also allowed for backward compatibility. +These devices are backed by the RAM reserved by the +.Xr loader 8 , +and as such not limited by the +.Xr malloc 9 +size constraints. +However, this also means that the storage cannot be released. +For the same reason, +the +.Dq identical byte +detection is not applicable. +.Pp +The +.Nm +driver uses the +.Dq almost-clone +convention, +whereby opening device number N creates device instance number N+1. +.Pp +The +.Xr vmstat 8 +utility can be used to monitor memory usage by +.Xr malloc 9 +backed +.Nm +disks, +but not those backed by pre-loaded modules. +.Sh SEE ALSO +.Xr disklabel 5 , +.Xr disklabel 8 , +.Xr fdisk 8 , +.Xr loader 8 , +.Xr newfs 8 , +.Xr vmstat 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 4.0 +as a cleaner replacement +for the MFS functionality previously used in PicoBSD +and in the FreeBSD installation process. +.Sh AUTHORS +The +.Nm +driver was written by +.An Poul-Henning Kamp +.Aq phk@FreeBSD.org . |