xref: /netbsd/sbin/newfs/mount_mfs.8 (revision bf9ec67e)
1.\"	$NetBSD: mount_mfs.8,v 1.4 2002/05/21 11:25:38 lukem 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. (Default)
81.It k
82Kilo; multiply the argument by 1024
83.It m
84Mega; multiply the argument by 1048576
85.It g
86Giga; multiply the argument by 1073741824
87.El
88.Pp
89The following options define the general layout policies.
90.Bl -tag -width Fl
91.It Fl N
92Causes the memory file system parameters to be printed out
93without really mounting the memory file system.
94.It Fl a Ar maxcontig
95This specifies the maximum number of contiguous blocks that will be
96laid out before forcing a rotational delay (see the
97.Fl d
98option).
99The default value is 8.
100See
101.Xr tunefs 8
102for more details on how to set this option.
103.It Fl b Ar block-size
104The block size of the file system, in bytes.
105It must be a power of two.
106The smallest allowable size is 4096 bytes.
107The default size depends upon the size of the file system:
108.Pp
109.Bl -tag -width "file system size" -compact -offset indent
110.It Sy "file system size"
111.Ar block-size
112.It \&\*[Lt] 20 MB
1134 KB
114.It \&\*[Lt] 1024 MB
1158 KB
116.It \&\*[Gt]\&= 1024 MB
11716 KB
118.El
119.It Fl c Ar cpg
120The number of cylinders per cylinder group in a file system.
121The default is to compute the maximum allowed by the other parameters.
122This value is dependent on a number of other parameters, in particular
123the block size and the number of bytes per inode.
124.It Fl d Ar rotdelay
125This specifies the expected time (in milliseconds) to service a transfer
126completion interrupt and initiate a new transfer on the same disk.
127The default is 0 milliseconds.
128See
129.Xr tunefs 8
130for more details on how to set this option.
131.ne 1i
132.It Fl e Ar maxbpg
133This indicates the maximum number of blocks any single file can
134allocate out of a cylinder group before it is forced to begin
135allocating blocks from another cylinder group.
136The default is about one quarter of the total blocks in a cylinder group.
137See
138.Xr tunefs 8
139for more details on how to set this option.
140.It Fl f Ar frag-size
141The fragment size of the file system in bytes.
142It must be a power of two ranging in value between
143.Ar block-size Ns /8
144and
145.Ar block-size .
146The optimal
147.Ar block-size Ns : Ns Ar frag-size
148ratio is 8:1.
149Other ratios are possible, but are not recommended,
150and may produce unpredictable results.
151The default size depends upon the size of the file system:
152.Pp
153.Bl -tag -width "file system size" -compact -offset indent
154.It Sy "file system size"
155.Ar frag-size
156.It \&\*[Lt] 20 MB
1570.5 KB
158.It \&\*[Lt] 1024 MB
1591 KB
160.It \&\*[Gt]\&= 1024 MB
1612 KB
162.El
163.It Fl g Ar groupname
164This specifies the group name or group id of the root
165inode of the file system.
166.It Fl i Ar bytes-per-inode
167This specifies the density of inodes in the file system.
168If fewer inodes are desired, a larger number should be used;
169to create more inodes a smaller number should be given.
170The default is to create an inode for every
171.Pq 4 * Ar frag-size
172bytes of data space:
173.Pp
174.Bl -tag -width "file system size" -compact -offset indent
175.It Sy "file system size"
176.Ar bytes-per-inode
177.It \&\*[Lt] 20 MB
1782 KB
179.It \&\*[Lt] 1024 MB
1804 KB
181.It \&\*[Gt]\&= 1024 MB
1828 KB
183.El
184.It Fl m Ar free-space
185The percentage of space reserved from normal users; the minimum free
186space threshold.
187The default value used is 5%.
188See
189.Xr tunefs 8
190for more details on how to set this option.
191.It Fl n Ar rotational-positions
192Determines how many rotational time slots there are in
193one revolution of the disk.
194.It Fl o
195Options are specified with a
196.Fl o
197flag followed by a comma separated string of options.
198See the
199.Xr mount 8
200man page for possible options and their meanings.
201.It Fl p Ar permissions
202This specifies the permissions of the root
203inode of the file system.
204.It Fl s Ar size
205The size of the file system in sectors.
206An
207.Sq s
208suffix will be interpreted as the number of sectors (the default).
209All other suffixes are interpreted as per other numeric arguments,
210except that the number is converted into sectors by dividing by the
211sector size (as specified by
212.Fl S Ar secsize )
213after suffix interpretation.
214.It Fl u Ar username
215This specifies the user name or user id of the root
216inode of the file system.
217.El
218.Sh NOTES
219The owner and group ids of the root node of the new file system
220are set to the effective uid and gid of the user mounting
221the file system.
222.Sh EXAMPLES
223Mount a 32 MB mfs on /tmp:
224.Pp
225.Dl mount_mfs -s 32m swap /tmp
226.Sh SEE ALSO
227.Xr disktab 5 ,
228.Xr fs 5 ,
229.Xr disklabel 8 ,
230.Xr diskpart 8 ,
231.Xr dumpfs 8 ,
232.\" .Xr format 8 ,
233.Xr fsck_ffs 8 ,
234.Xr fsirand 8 ,
235.Xr mount 8 ,
236.Xr newfs 8 ,
237.Xr tunefs 8
238.Rs
239.%A M. McKusick
240.%A W. Joy
241.%A S. Leffler
242.%A R. Fabry
243.%T A Fast File System for UNIX ,
244.%J ACM Transactions on Computer Systems 2
245.%V 3
246.%P pp 181-197
247.%D August 1984
248.%O (reprinted in the BSD System Manager's Manual)
249.Re
250.Sh HISTORY
251The
252.Nm
253command appeared in
254.Bx 4.2 .
255