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 $
10 .Dd September 28, 2009
17 To compile this driver into the kernel,
18 place the following line in your
19 kernel configuration file:
20 .Bd -ragged -offset indent
24 Alternatively, to load the driver as a module at boot time, place the
26 .Pa /boot/loader.conf :
27 .Bd -literal -offset indent
31 To specify the default maximum size of
34 .Cd options MD_NSECT=20000
38 driver provides support for two kinds of memory backed virtual disks:
41 and pre-loaded module backed.
47 are severely limited in size by constraints imposed by
49 Specifically, only one malloc bucket is used, which means that all
53 backing must share the malloc per-bucket quota.
54 The exact size of this quota varies,
55 in particular with the amount of RAM in the system.
56 The exact value can be determined with
59 A sector filled with identical bytes does not consume storage,
60 and therefore the storage allocated by a
62 disk can be freed with a command such as this:
63 .Bd -literal -offset indent
64 dd if=/dev/zero of=/dev/md567
67 The default maximum size of a
72 is 20,000 sectors of 512 bytes each.
74 with the kernel option
79 driver will search for pre-loaded modules of type
83 device for each of these modules.
86 is also allowed for backward compatibility.
87 These devices are backed by the RAM reserved by the
89 and as such not limited by the
92 However, this also means that the storage cannot be released.
96 detection is not applicable.
103 whereby opening device number N creates device instance number N+1.
107 utility can be used to monitor memory usage by
112 but not those backed by pre-loaded modules.
121 if [ -e /dev/md0 ]; then
123 mount /dev/md0 /tmp && \\
137 driver first appeared in
139 as a cleaner replacement
140 for the MFS functionality previously used in PicoBSD
143 installation process.
147 driver was written by
148 .An Poul-Henning Kamp Aq Mt phk@FreeBSD.org .