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
20 To specify the default maximum size of
23 .Cd options MD_NSECT=20000
25 Alternatively, to load the driver as a module at boot time, place the
27 .Pa /boot/loader.conf :
28 .Bd -literal -offset indent
35 driver provides support for two kinds of memory backed virtual disks:
38 and pre-loaded module backed.
44 are severely limited in size by constraints imposed by
46 Specifically, only one malloc bucket is used, which means that all
50 backing must share the malloc per-bucket quota.
51 The exact size of this quota varies,
52 in particular with the amount of RAM in the system.
53 The exact value can be determined with
56 A sector filled with identical bytes does not consume storage,
57 and therefore the storage allocated by a
59 disk can be freed with a command such as this:
60 .Bd -literal -offset indent
61 dd if=/dev/zero of=/dev/md567
64 The default maximum size of a
69 is 20,000 sectors of 512 bytes each.
71 with the kernel option
76 driver will search for pre-loaded modules of type
80 device for each of these modules.
83 is also allowed for backward compatibility.
84 These devices are backed by the RAM reserved by the
86 and as such not limited by the
89 However, this also means that the storage cannot be released.
93 detection is not applicable.
100 whereby opening device number N creates device instance number N+1.
104 utility can be used to monitor memory usage by
109 but not those backed by pre-loaded modules.
118 if [ -e /dev/md0 ]; then
120 mount /dev/md0 /tmp && \\
134 driver first appeared in
136 as a cleaner replacement
137 for the MFS functionality previously used in PicoBSD
140 installation process.
144 driver was written by
145 .An Poul-Henning Kamp
146 .Aq phk@FreeBSD.org .