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 $
20 To specify the default maximum size of
23 .Cd options MD_NSECT=20000
27 driver provides support for two kinds of memory backed virtual disks:
30 and pre-loaded module backed.
36 are severely limited in size by constraints imposed by
38 Specifically, only one malloc bucket is used, which means that all
42 backing must share the malloc per-bucket quota.
43 The exact size of this quota varies,
44 in particular with the amount of RAM in the system.
45 The exact value can be determined with
48 A sector filled with identical bytes does not consume storage,
49 and therefore the storage allocated by a
51 disk can be freed with a command such as this:
52 .Bd -literal -offset indent
53 dd if=/dev/zero of=/dev/md567
56 The default maximum size of a
61 is 20,000 sectors of 512 bytes each.
63 with the kernel option
68 driver will search for pre-loaded modules of type
72 device for each of these modules.
75 is also allowed for backward compatibility.
76 These devices are backed by the RAM reserved by the
78 and as such not limited by the
81 However, this also means that the storage cannot be released.
85 detection is not applicable.
92 whereby opening device number N creates device instance number N+1.
96 utility can be used to monitor memory usage by
101 but not those backed by pre-loaded modules.
110 if [ -e /dev/md0s0 -a -e /dev/md0s0c ]; then
111 disklabel -r -w md0s0 auto && \\
112 newfs /dev/md0s0c && \\
113 mount /dev/md0s0c /tmp && \\
127 driver first appeared in
129 as a cleaner replacement
130 for the MFS functionality previously used in PicoBSD
133 installation process.
137 driver was written by
138 .An Poul-Henning Kamp
139 .Aq phk@FreeBSD.org .