1 .\" ----------------------------------------------------------------------------
2 .\" "THE BEER-WARE LICENSE" (Revision 42):
3 .\" <phk@FreeBSD.ORG> wrote this file. As long as you retain this notice you
4 .\" can do whatever you want with this stuff. If we meet some day, and you think
5 .\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
6 .\" ----------------------------------------------------------------------------
8 .\" $FreeBSD: src/share/man/man4/md.4,v 1.3.2.4 2001/06/18 22:00:12 dd Exp $
9 .\" $DragonFly: src/share/man/man4/md.4,v 1.5 2007/11/07 21:38:00 swildner Exp $
11 .Dd September 28, 2009
18 To compile this driver into the kernel,
19 place the following line in your
20 kernel configuration file:
21 .Bd -ragged -offset indent
25 Alternatively, to load the driver as a module at boot time, place the
27 .Pa /boot/loader.conf :
28 .Bd -literal -offset indent
32 To specify the default maximum size of
35 .Cd options MD_NSECT=20000
39 driver provides support for two kinds of memory backed virtual disks:
42 and pre-loaded module backed.
48 are severely limited in size by constraints imposed by
50 Specifically, only one malloc bucket is used, which means that all
54 backing must share the malloc per-bucket quota.
55 The exact size of this quota varies,
56 in particular with the amount of RAM in the system.
57 The exact value can be determined with
60 A sector filled with identical bytes does not consume storage,
61 and therefore the storage allocated by a
63 disk can be freed with a command such as this:
64 .Bd -literal -offset indent
65 dd if=/dev/zero of=/dev/md567
68 The default maximum size of a
73 is 20,000 sectors of 512 bytes each.
75 with the kernel option
80 driver will search for pre-loaded modules of type
84 device for each of these modules.
87 is also allowed for backward compatibility.
88 These devices are backed by the RAM reserved by the
90 and as such not limited by the
93 However, this also means that the storage cannot be released.
97 detection is not applicable.
104 whereby opening device number N creates device instance number N+1.
108 utility can be used to monitor memory usage by
113 but not those backed by pre-loaded modules.
122 if [ -e /dev/md0 ]; then
124 mount /dev/md0 /tmp && \\
138 driver first appeared in
140 as a cleaner replacement
141 for the MFS functionality previously used in PicoBSD
144 installation process.
148 driver was written by
149 .An Poul-Henning Kamp
150 .Aq phk@FreeBSD.org .