1.\" $NetBSD: mount_mfs.8,v 1.6 2002/10/01 13:40:46 wiz Exp $ 2.\" 3.\" Copyright (c) 1983, 1987, 1991, 1993, 1994 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by the University of 17.\" California, Berkeley and its contributors. 18.\" 4. Neither the name of the University nor the names of its contributors 19.\" may be used to endorse or promote products derived from this software 20.\" without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" @(#)newfs.8 8.6 (Berkeley) 5/3/95 35.\" 36.Dd May 21, 2002 37.Dt MOUNT_MFS 8 38.Os 39.Sh NAME 40.Nm mount_mfs 41.Nd mount a memory based file system 42.Sh SYNOPSIS 43.Nm mount_mfs 44.Op Fl N 45.Op Fl a Ar maxcontig 46.Op Fl b Ar block-size 47.Op Fl c Ar cpg 48.Op Fl d Ar rotdelay 49.Op Fl e Ar maxbpg 50.Op Fl f Ar frag-size 51.Op Fl g Ar groupname 52.Op Fl i Ar bytes-per-inode 53.Op Fl m Ar free-space 54.Op Fl n Ar rotational-positions 55.Op Fl o Ar options 56.Op Fl p Ar permissions 57.Op Fl s Ar size 58.Op Fl u Ar username 59.Ar special node 60.Sh DESCRIPTION 61.Nm 62is used to build a file system in virtual memory and then mount it 63on a specified node. 64.Nm 65exits and the contents of the file system are lost 66when the file system is unmounted. 67If 68.Nm 69is sent a signal while running, 70for example during system shutdown, 71it will attempt to unmount its 72corresponding file system. 73.Ar special 74is ignored. 75.Pp 76Options with numeric arguments may contain an optional (case-insensitive) 77suffix: 78.Bl -tag -width 3n -offset indent -compact 79.It b 80Bytes; causes no modification. 81(Default) 82.It k 83Kilo; multiply the argument by 1024 84.It m 85Mega; multiply the argument by 1048576 86.It g 87Giga; multiply the argument by 1073741824 88.El 89.Pp 90The following options define the general layout policies. 91.Bl -tag -width Fl 92.It Fl N 93Causes the memory file system parameters to be printed out 94without really mounting the memory file system. 95.It Fl a Ar maxcontig 96This specifies the maximum number of contiguous blocks that will be 97laid out before forcing a rotational delay (see the 98.Fl d 99option). 100The default value is 8. 101See 102.Xr tunefs 8 103for more details on how to set this option. 104.It Fl b Ar block-size 105The block size of the file system, in bytes. 106It must be a power of two. 107The smallest allowable size is 4096 bytes. 108The default size depends upon the size of the file system: 109.Pp 110.Bl -tag -width "file system size" -compact -offset indent 111.It Sy "file system size" 112.Ar block-size 113.It \&\*[Lt] 20 MB 1144 KB 115.It \&\*[Lt] 1024 MB 1168 KB 117.It \&\*[Gt]\&= 1024 MB 11816 KB 119.El 120.It Fl c Ar cpg 121The number of cylinders per cylinder group in a file system. 122The default is to compute the maximum allowed by the other parameters. 123This value is dependent on a number of other parameters, in particular 124the block size and the number of bytes per inode. 125.It Fl d Ar rotdelay 126This specifies the expected time (in milliseconds) to service a transfer 127completion interrupt and initiate a new transfer on the same disk. 128The default is 0 milliseconds. 129See 130.Xr tunefs 8 131for more details on how to set this option. 132.ne 1i 133.It Fl e Ar maxbpg 134This indicates the maximum number of blocks any single file can 135allocate out of a cylinder group before it is forced to begin 136allocating blocks from another cylinder group. 137The default is about one quarter of the total blocks in a cylinder group. 138See 139.Xr tunefs 8 140for more details on how to set this option. 141.It Fl f Ar frag-size 142The fragment size of the file system in bytes. 143It must be a power of two ranging in value between 144.Ar block-size Ns /8 145and 146.Ar block-size . 147The optimal 148.Ar block-size : Ns Ar frag-size 149ratio is 8:1. 150Other ratios are possible, but are not recommended, 151and may produce unpredictable results. 152The default size depends upon the size of the file system: 153.Pp 154.Bl -tag -width "file system size" -compact -offset indent 155.It Sy "file system size" 156.Ar frag-size 157.It \&\*[Lt] 20 MB 1580.5 KB 159.It \&\*[Lt] 1024 MB 1601 KB 161.It \&\*[Gt]\&= 1024 MB 1622 KB 163.El 164.It Fl g Ar groupname 165This specifies the group name or group id of the root 166inode of the file system. 167.It Fl i Ar bytes-per-inode 168This specifies the density of inodes in the file system. 169If fewer inodes are desired, a larger number should be used; 170to create more inodes a smaller number should be given. 171The default is to create an inode for every 172.Pq 4 * Ar frag-size 173bytes of data space: 174.Pp 175.Bl -tag -width "file system size" -compact -offset indent 176.It Sy "file system size" 177.Ar bytes-per-inode 178.It \&\*[Lt] 20 MB 1792 KB 180.It \&\*[Lt] 1024 MB 1814 KB 182.It \&\*[Gt]\&= 1024 MB 1838 KB 184.El 185.It Fl m Ar free-space 186The percentage of space reserved from normal users; the minimum free 187space threshold. 188The default value used is 5%. 189See 190.Xr tunefs 8 191for more details on how to set this option. 192.It Fl n Ar rotational-positions 193Determines how many rotational time slots there are in 194one revolution of the disk. 195.It Fl o 196Options are specified with a 197.Fl o 198flag followed by a comma separated string of options. 199See the 200.Xr mount 8 201man page for possible options and their meanings. 202.It Fl p Ar permissions 203This specifies the permissions of the root 204inode of the file system. 205.It Fl s Ar size 206The size of the file system in sectors. 207An 208.Sq s 209suffix will be interpreted as the number of sectors (the default). 210All other suffixes are interpreted as per other numeric arguments, 211except that the number is converted into sectors by dividing by the 212sector size (as specified by 213.Fl S Ar secsize ) 214after suffix interpretation. 215.It Fl u Ar username 216This specifies the user name or user id of the root 217inode of the file system. 218.El 219.Sh NOTES 220The owner and group ids of the root node of the new file system 221are set to the effective uid and gid of the user mounting 222the file system. 223.Sh EXAMPLES 224Mount a 32 MB mfs on /tmp: 225.Pp 226.Dl mount_mfs -s 32m swap /tmp 227.Sh SEE ALSO 228.Xr disktab 5 , 229.Xr fs 5 , 230.Xr disklabel 8 , 231.Xr diskpart 8 , 232.Xr dumpfs 8 , 233.\" .Xr format 8 , 234.Xr fsck_ffs 8 , 235.Xr fsirand 8 , 236.Xr mount 8 , 237.Xr newfs 8 , 238.Xr tunefs 8 239.Rs 240.%A M. McKusick 241.%A W. Joy 242.%A S. Leffler 243.%A R. Fabry 244.%T A Fast File System for UNIX , 245.%J ACM Transactions on Computer Systems 2 246.%V 3 247.%P pp 181-197 248.%D August 1984 249.%O (reprinted in the BSD System Manager's Manual) 250.Re 251.Sh HISTORY 252The 253.Nm 254command appeared in 255.Bx 4.2 . 256