14d7de91fSDima Dorfman.\" 2d69f5deeSDima Dorfman.\" Copyright (c) 2001 Dima Dorfman. 34d7de91fSDima Dorfman.\" All rights reserved. 44d7de91fSDima Dorfman.\" 54d7de91fSDima Dorfman.\" Redistribution and use in source and binary forms, with or without 64d7de91fSDima Dorfman.\" modification, are permitted provided that the following conditions 74d7de91fSDima Dorfman.\" are met: 84d7de91fSDima Dorfman.\" 1. Redistributions of source code must retain the above copyright 94d7de91fSDima Dorfman.\" notice, this list of conditions and the following disclaimer. 104d7de91fSDima Dorfman.\" 2. Redistributions in binary form must reproduce the above copyright 114d7de91fSDima Dorfman.\" notice, this list of conditions and the following disclaimer in the 124d7de91fSDima Dorfman.\" documentation and/or other materials provided with the distribution. 134d7de91fSDima Dorfman.\" 144d7de91fSDima Dorfman.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 154d7de91fSDima Dorfman.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 164d7de91fSDima Dorfman.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 174d7de91fSDima Dorfman.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 184d7de91fSDima Dorfman.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 194d7de91fSDima Dorfman.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 204d7de91fSDima Dorfman.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 214d7de91fSDima Dorfman.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 224d7de91fSDima Dorfman.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 234d7de91fSDima Dorfman.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 244d7de91fSDima Dorfman.\" SUCH DAMAGE. 254d7de91fSDima Dorfman.\" 264d7de91fSDima Dorfman.\" $FreeBSD$ 274d7de91fSDima Dorfman.\" 284d7de91fSDima Dorfman.Dd May 26, 2001 294d7de91fSDima Dorfman.Dt MDMFS 8 304d7de91fSDima Dorfman.Os 314d7de91fSDima Dorfman.Sh NAME 324d7de91fSDima Dorfman.Nm mdmfs 334d7de91fSDima Dorfman.Nd configure and mount an in-memory filesystem using the 344d7de91fSDima Dorfman.Xr md 4 354d7de91fSDima Dorfmandriver 364d7de91fSDima Dorfman.Sh SYNOPSIS 374d7de91fSDima Dorfman.Nm 384d7de91fSDima Dorfman.Op Fl DLMNSX 394d7de91fSDima Dorfman.Op Fl a Ar maxcontig 404d7de91fSDima Dorfman.Op Fl b Ar block-size 414d7de91fSDima Dorfman.Op Fl c Ar cylinders 424d7de91fSDima Dorfman.Op Fl d Ar rotdelay 434d7de91fSDima Dorfman.Op Fl e Ar maxbpg 444d7de91fSDima Dorfman.Op Fl F Ar file 454d7de91fSDima Dorfman.Op Fl f Ar frag-size 464d7de91fSDima Dorfman.Op Fl i Ar bytes 474d7de91fSDima Dorfman.Op Fl m Ar percent-free 484d7de91fSDima Dorfman.Op Fl n Ar rotational-positions 494d7de91fSDima Dorfman.Op Fl O Ar optimization 504d7de91fSDima Dorfman.Op Fl o Ar mount-options 514d7de91fSDima Dorfman.Op Fl p Ar permissions 524d7de91fSDima Dorfman.Op Fl s Ar size 539dde6035SDima Dorfman.Op Fl w Ar user : Ns Ar group 544d7de91fSDima Dorfman.Ar md-device 554d7de91fSDima Dorfman.Ar mount-point 564d7de91fSDima Dorfman.Sh DESCRIPTION 574d7de91fSDima DorfmanThe 584d7de91fSDima Dorfman.Nm 594d7de91fSDima Dorfmanprogram is designed to be a work-alike and look-alike of the deprecated 604d7de91fSDima Dorfman.Xr mount_mfs 8 . 614d7de91fSDima DorfmanThe end result is essentially the same, 624d7de91fSDima Dorfmanbut is accomplished in a completely different way. 634d7de91fSDima Dorfman.Nm 644d7de91fSDima Dorfmanconfigures an 654d7de91fSDima Dorfman.Xr md 4 664d7de91fSDima Dorfmandisk using 674d7de91fSDima Dorfman.Xr mdconfig 8 , 684d7de91fSDima Dorfmanlabels it using 694d7de91fSDima Dorfman.Xr disklabel 8 , 704d7de91fSDima Dorfmanputs a UFS filesystem on it using 714d7de91fSDima Dorfman.Xr newfs 8 , 724d7de91fSDima Dorfmanand mounts it using 734d7de91fSDima Dorfman.Xr mount 8 . 744d7de91fSDima DorfmanAll the command line options are passed to the appropriate program 754d7de91fSDima Dorfmanat the appropriate stage in order to achieve the desired effect. 764d7de91fSDima Dorfman.Pp 774d7de91fSDima DorfmanBy default, 784d7de91fSDima Dorfman.Nm 794d7de91fSDima Dorfmancreates a swap-based 804d7de91fSDima Dorfman.Pq Dv MD_SWAP 814d7de91fSDima Dorfmandisk with soft-updates enabled 824d7de91fSDima Dorfmanand mounts it on 834d7de91fSDima Dorfman.Ar mount-point . 844d7de91fSDima DorfmanIt uses the 854d7de91fSDima Dorfman.Xr md 4 864d7de91fSDima Dorfmandevice specified by 874d7de91fSDima Dorfman.Ar md-device . 884d7de91fSDima DorfmanIf 894d7de91fSDima Dorfman.Ar md-device 904d7de91fSDima Dorfmanis 914d7de91fSDima Dorfman.Ql md 924d7de91fSDima Dorfman(no unit number), 934d7de91fSDima Dorfmanit will use 944d7de91fSDima Dorfman.Xr md 4 Ns 's 954d7de91fSDima Dorfmanauto-unit feature to automatically select an unused device. 964d7de91fSDima DorfmanUnless otherwise specified with one of the options below, 974d7de91fSDima Dorfmanit uses the default arguments to all the helper programs. 984d7de91fSDima Dorfman.Pp 994d7de91fSDima DorfmanThe following options are available. 1004d7de91fSDima DorfmanWhere possible, 1014d7de91fSDima Dorfmanthe option letter matches the one used by 1024d7de91fSDima Dorfman.Xr mount_mfs 8 1034d7de91fSDima Dorfmanfor the same thing. 1049dde6035SDima Dorfman.Bl -tag -width indent 1054d7de91fSDima Dorfman.It Fl a Ar maxcontig 1064d7de91fSDima DorfmanSpecify the maximum number of contiguous blocks that will be laid 1074d7de91fSDima Dorfmanout before forcing a rotational delay 1084d7de91fSDima Dorfman(see the 1094d7de91fSDima Dorfman.Fl d 1104d7de91fSDima Dorfmanoption). 1114d7de91fSDima Dorfman.It Fl b Ar block-size 1124d7de91fSDima DorfmanThe block size of the filesystem, in bytes. 1134d7de91fSDima Dorfman.It Fl c Ar cylinders 1144d7de91fSDima DorfmanThe number of cylinders per cylinder group in the filesystem. 1154d7de91fSDima Dorfman.It Fl D 1164d7de91fSDima DorfmanIf not using auto-unit, 1179dde6035SDima Dorfmando not run 1184d7de91fSDima Dorfman.Xr mdconfig 8 1194d7de91fSDima Dorfmanto try to detach the unit before attaching it. 1204d7de91fSDima Dorfman.It Fl d Ar rotdelay 1214d7de91fSDima DorfmanSpecify the mininum time in milliseconds required to initiate another 1224d7de91fSDima Dorfmandisk transfer on the same cylinder. 1234d7de91fSDima DorfmanModern disks with read/write-behind achieve higher performance without 1244d7de91fSDima Dorfmanthis feature, 1254d7de91fSDima Dorfmanso it is best to leave it at 0 milliseconds. 1264d7de91fSDima Dorfman.It Fl e Ar maxbpg 1274d7de91fSDima DorfmanIndicate the maximum number of blocks any single file can allocate 1284d7de91fSDima Dorfmanout of a cylinder group before it is forced to begin allocating 1294d7de91fSDima Dorfmanblocks from another cylinder group. 1304d7de91fSDima Dorfman.It Fl F Ar file 1314d7de91fSDima DorfmanCreate a vnode-backed 1324d7de91fSDima Dorfman.Pq Dv MD_VNODE 1334d7de91fSDima Dorfmanmemory disk backed by 1344d7de91fSDima Dorfman.Ar file . 1354d7de91fSDima Dorfman.It Fl f Ar frag-size 1364d7de91fSDima DorfmanThe fragment size of the filesystem in bytes. 1374d7de91fSDima Dorfman.It Fl i Ar bytes 1384d7de91fSDima DorfmanNumber of bytes per inode. 1394d7de91fSDima Dorfman.It Fl L 1404d7de91fSDima DorfmanShow the output of the helper programs. 1414d7de91fSDima DorfmanBy default, 1424d7de91fSDima Dorfmanit is sent to 1434d7de91fSDima Dorfman.Pa /dev/null . 1444d7de91fSDima Dorfman.It Fl M 1454d7de91fSDima DorfmanCreate a 1464d7de91fSDima Dorfman.Xr malloc 9 1474d7de91fSDima Dorfmanbacked disk 1484d7de91fSDima Dorfman.Pq Dv MD_MALLOC 1494d7de91fSDima Dorfmaninstead of a swap-backed disk. 1504d7de91fSDima Dorfman.It Fl m Ar percent-free 1514d7de91fSDima DorfmanThe percentage of space reserved for the superuser. 1524d7de91fSDima Dorfman.It Fl N 1539dde6035SDima DorfmanDo not actually run the helper programs. 1544d7de91fSDima DorfmanThis is most useful in conjunction with 1554d7de91fSDima Dorfman.Fl X . 1564d7de91fSDima Dorfman.It Fl n Ar rotational-positions 1574d7de91fSDima DorfmanThe default number of rotational positions to distinguish. 1584d7de91fSDima Dorfman.It Fl O Ar optimization 1594d7de91fSDima DorfmanSelect the optimization preference; 1604d7de91fSDima Dorfmanvalid choices are 1619dde6035SDima Dorfman.Cm space 1624d7de91fSDima Dorfmanand 1639dde6035SDima Dorfman.Cm time , 1644d7de91fSDima Dorfmanwhich will optimize for minimum space fragmentation and 1654d7de91fSDima Dorfmanminimum time spent allocating blocks, 1664d7de91fSDima Dorfmanrespectively. 1674d7de91fSDima Dorfman.It Fl o Ar mount-options 1684d7de91fSDima DorfmanSpecify the mount options with which to mount the filesystem. 1694d7de91fSDima DorfmanSee 1704d7de91fSDima Dorfman.Xr mount 8 1714d7de91fSDima Dorfmanfor more information. 1724d7de91fSDima Dorfman.It Fl p Ar permissions 1734d7de91fSDima DorfmanSet the file (directory) permissions of the mount point 1744d7de91fSDima Dorfman.Ar mount-point 1754d7de91fSDima Dorfmanto 1764d7de91fSDima Dorfman.Ar permissions . 1774d7de91fSDima Dorfman.It Fl S 1789dde6035SDima DorfmanDo not enable soft-updates on the filesystem. 1794d7de91fSDima Dorfman.It Fl s Ar size 1804d7de91fSDima DorfmanSpecify the size of the disk to create. 1814d7de91fSDima DorfmanThis only makes sense if 1824d7de91fSDima Dorfman.Fl F 1834d7de91fSDima Dorfmanis 1844d7de91fSDima Dorfman.Em not 1854d7de91fSDima Dorfmanspecified. 1864d7de91fSDima DorfmanThat is, 1874d7de91fSDima Dorfmanthis will work for the default swap-backed 1884d7de91fSDima Dorfman.Pq Dv MD_SWAP 1894d7de91fSDima Dorfmandisks, 1904d7de91fSDima Dorfmanand the optional 1914d7de91fSDima Dorfman.Pq Fl M 1924d7de91fSDima Dorfman.Xr malloc 9 1934d7de91fSDima Dorfmanbacked disks 1944d7de91fSDima Dorfman.Pq Dv MD_MALLOC . 1959dde6035SDima Dorfman.It Fl w Ar user : Ns Ar group 1969dde6035SDima DorfmanSet the owner and group to 1974d7de91fSDima Dorfman.Ar user 1984d7de91fSDima Dorfmanand 1994d7de91fSDima Dorfman.Ar group , 2004d7de91fSDima Dorfmanrespectively. 2014d7de91fSDima DorfmanThe arguments have the same semantics as with 2024d7de91fSDima Dorfman.Xr chown 8 , 2039dde6035SDima Dorfmanbut specifying just a 2049dde6035SDima Dorfman.Ar user 2059dde6035SDima Dorfmanor just a 2069dde6035SDima Dorfman.Ar group 2079dde6035SDima Dorfmanis not supported. 208ab1d004fSDima Dorfman.It Fl X 209ab1d004fSDima DorfmanPrint what command will be run before running it, and 210ab1d004fSDima Dorfmanother assorted debugging information. 2114d7de91fSDima Dorfman.El 2124d7de91fSDima Dorfman.Pp 2134d7de91fSDima DorfmanThe 2144d7de91fSDima Dorfman.Fl F 2154d7de91fSDima Dorfmanand 2164d7de91fSDima Dorfman.Fl s 2174d7de91fSDima Dorfmanoptions are passed to 2184d7de91fSDima Dorfman.Xr mdconfig 8 2194d7de91fSDima Dorfmanas 2204d7de91fSDima Dorfman.Fl f 2214d7de91fSDima Dorfmanand 2224d7de91fSDima Dorfman.Fl s , 2234d7de91fSDima Dorfmanrespectively. 2244d7de91fSDima DorfmanThe 2259dde6035SDima Dorfman.Fl a , b , c , d , e , f , i , m 2264d7de91fSDima Dorfmanand 2274d7de91fSDima Dorfman.Fl n 2284d7de91fSDima Dorfmanoptions are passed to 2294d7de91fSDima Dorfman.Xr newfs 8 2304d7de91fSDima Dorfmanwith the same letter; 2314d7de91fSDima Dorfmanthe 2324d7de91fSDima Dorfman.Fl O 2334d7de91fSDima Dorfmanoption is passed to 2344d7de91fSDima Dorfman.Xr newfs 8 2354d7de91fSDima Dorfmanas 2364d7de91fSDima Dorfman.Fl o . 2374d7de91fSDima DorfmanThe 2384d7de91fSDima Dorfman.Fl o 2394d7de91fSDima Dorfmanoption is passed to 2404d7de91fSDima Dorfman.Xr mount 8 2414d7de91fSDima Dorfmanwith the same letter. 2424d7de91fSDima DorfmanSee the programs that the options are passed to for more information 2434d7de91fSDima Dorfmanon their semantics. 2444d7de91fSDima Dorfman.Sh EXAMPLES 2454d7de91fSDima DorfmanCreate and mount a 32 megabyte swap-backed filesystem on 2464d7de91fSDima Dorfman.Pa /tmp : 2474d7de91fSDima Dorfman.Pp 2489dde6035SDima Dorfman.Dl "mdmfs -s 32m md /tmp" 2494d7de91fSDima Dorfman.Pp 2504d7de91fSDima DorfmanCreate and mount a 16 megabyte malloc-backed filesystem on 2514d7de91fSDima Dorfman.Pa /tmp 2524d7de91fSDima Dorfmanusing the 2534d7de91fSDima Dorfman.Pa /dev/md1 2544d7de91fSDima Dorfmandevice; 2554d7de91fSDima Dorfmanfurthermore, 256ba40ba47SDima Dorfmando not use soft-updates on it and mount it 2574d7de91fSDima Dorfman.Cm async : 2584d7de91fSDima Dorfman.Pp 2599dde6035SDima Dorfman.Dl "mdmfs -M -S -o async -s 16m md1 /tmp" 26029dfd70bSDima Dorfman.Sh SEE ALSO 26129dfd70bSDima Dorfman.Xr md 4 , 26229dfd70bSDima Dorfman.Xr disklabel 8 , 26329dfd70bSDima Dorfman.Xr mdconfig 8 , 26429dfd70bSDima Dorfman.Xr mount 8 , 26529dfd70bSDima Dorfman.Xr newfs 8 2669dde6035SDima Dorfman.Sh AUTHORS 2674d7de91fSDima Dorfman.An Dima Dorfman 268