1*01869ca4Swiz.\" $NetBSD: mount_mfs.8,v 1.18 2017/07/03 21:33:42 wiz Exp $ 204e7d8d5Slukem.\" 304e7d8d5Slukem.\" Copyright (c) 1983, 1987, 1991, 1993, 1994 404e7d8d5Slukem.\" The Regents of the University of California. All rights reserved. 504e7d8d5Slukem.\" 604e7d8d5Slukem.\" Redistribution and use in source and binary forms, with or without 704e7d8d5Slukem.\" modification, are permitted provided that the following conditions 804e7d8d5Slukem.\" are met: 904e7d8d5Slukem.\" 1. Redistributions of source code must retain the above copyright 1004e7d8d5Slukem.\" notice, this list of conditions and the following disclaimer. 1104e7d8d5Slukem.\" 2. Redistributions in binary form must reproduce the above copyright 1204e7d8d5Slukem.\" notice, this list of conditions and the following disclaimer in the 1304e7d8d5Slukem.\" documentation and/or other materials provided with the distribution. 14276d62f6Sagc.\" 3. Neither the name of the University nor the names of its contributors 1504e7d8d5Slukem.\" may be used to endorse or promote products derived from this software 1604e7d8d5Slukem.\" without specific prior written permission. 1704e7d8d5Slukem.\" 1804e7d8d5Slukem.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1904e7d8d5Slukem.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2004e7d8d5Slukem.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2104e7d8d5Slukem.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2204e7d8d5Slukem.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2304e7d8d5Slukem.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2404e7d8d5Slukem.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2504e7d8d5Slukem.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2604e7d8d5Slukem.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2704e7d8d5Slukem.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2804e7d8d5Slukem.\" SUCH DAMAGE. 2904e7d8d5Slukem.\" 3004e7d8d5Slukem.\" @(#)newfs.8 8.6 (Berkeley) 5/3/95 3104e7d8d5Slukem.\" 3265286eb5Ssevan.Dd September 12, 2016 3304e7d8d5Slukem.Dt MOUNT_MFS 8 3404e7d8d5Slukem.Os 3504e7d8d5Slukem.Sh NAME 3604e7d8d5Slukem.Nm mount_mfs 3704e7d8d5Slukem.Nd mount a memory based file system 3804e7d8d5Slukem.Sh SYNOPSIS 3904e7d8d5Slukem.Nm mount_mfs 4004e7d8d5Slukem.Op Fl N 4104e7d8d5Slukem.Op Fl a Ar maxcontig 4204e7d8d5Slukem.Op Fl b Ar block-size 4304e7d8d5Slukem.Op Fl d Ar rotdelay 4404e7d8d5Slukem.Op Fl e Ar maxbpg 4504e7d8d5Slukem.Op Fl f Ar frag-size 46ab5ccee6Ssimonb.Op Fl g Ar groupname 4704e7d8d5Slukem.Op Fl i Ar bytes-per-inode 4804e7d8d5Slukem.Op Fl m Ar free-space 49a8376531Sdsl.Op Fl n Ar inodes 5004e7d8d5Slukem.Op Fl o Ar options 51ab5ccee6Ssimonb.Op Fl p Ar permissions 5204e7d8d5Slukem.Op Fl s Ar size 53ab5ccee6Ssimonb.Op Fl u Ar username 54afbe178eSdsl.Op Fl V Ar verbose 5504e7d8d5Slukem.Ar special node 5604e7d8d5Slukem.Sh DESCRIPTION 5704e7d8d5Slukem.Nm 5804e7d8d5Slukemis used to build a file system in virtual memory and then mount it 5904e7d8d5Slukemon a specified node. 6004e7d8d5Slukem.Nm 6104e7d8d5Slukemexits and the contents of the file system are lost 6204e7d8d5Slukemwhen the file system is unmounted. 6304e7d8d5SlukemIf 6404e7d8d5Slukem.Nm 6504e7d8d5Slukemis sent a signal while running, 6604e7d8d5Slukemfor example during system shutdown, 6704e7d8d5Slukemit will attempt to unmount its 6804e7d8d5Slukemcorresponding file system. 6904e7d8d5Slukem.Ar special 7004e7d8d5Slukemis ignored. 7104e7d8d5Slukem.Pp 7204e7d8d5SlukemOptions with numeric arguments may contain an optional (case-insensitive) 7304e7d8d5Slukemsuffix: 7404e7d8d5Slukem.Bl -tag -width 3n -offset indent -compact 7504e7d8d5Slukem.It b 762fb4b1dbSwizBytes; causes no modification. 772fb4b1dbSwiz(Default) 7804e7d8d5Slukem.It k 7904e7d8d5SlukemKilo; multiply the argument by 1024 8004e7d8d5Slukem.It m 8104e7d8d5SlukemMega; multiply the argument by 1048576 8204e7d8d5Slukem.It g 8304e7d8d5SlukemGiga; multiply the argument by 1073741824 8404e7d8d5Slukem.El 8504e7d8d5Slukem.Pp 8668e38c12SjmmvThe following options define the general layout policies: 8704e7d8d5Slukem.Bl -tag -width Fl 8804e7d8d5Slukem.It Fl N 8904e7d8d5SlukemCauses the memory file system parameters to be printed out 9004e7d8d5Slukemwithout really mounting the memory file system. 9104e7d8d5Slukem.It Fl a Ar maxcontig 9204e7d8d5SlukemThis specifies the maximum number of contiguous blocks that will be 9304e7d8d5Slukemlaid out before forcing a rotational delay (see the 9404e7d8d5Slukem.Fl d 9504e7d8d5Slukemoption). 9604e7d8d5SlukemThe default value is 8. 9704e7d8d5SlukemSee 9804e7d8d5Slukem.Xr tunefs 8 9904e7d8d5Slukemfor more details on how to set this option. 10004e7d8d5Slukem.It Fl b Ar block-size 10104e7d8d5SlukemThe block size of the file system, in bytes. 10204e7d8d5SlukemIt must be a power of two. 10304e7d8d5SlukemThe smallest allowable size is 4096 bytes. 10404e7d8d5SlukemThe default size depends upon the size of the file system: 10504e7d8d5Slukem.Pp 10604e7d8d5Slukem.Bl -tag -width "file system size" -compact -offset indent 10704e7d8d5Slukem.It Sy "file system size" 10804e7d8d5Slukem.Ar block-size 109*01869ca4Swiz.It \&< 20 MB 11004e7d8d5Slukem4 KB 111*01869ca4Swiz.It \&< 1024 MB 11204e7d8d5Slukem8 KB 113*01869ca4Swiz.It \&>\&= 1024 MB 11404e7d8d5Slukem16 KB 11504e7d8d5Slukem.El 11604e7d8d5Slukem.It Fl d Ar rotdelay 11704e7d8d5SlukemThis specifies the expected time (in milliseconds) to service a transfer 11804e7d8d5Slukemcompletion interrupt and initiate a new transfer on the same disk. 11904e7d8d5SlukemThe default is 0 milliseconds. 12004e7d8d5SlukemSee 12104e7d8d5Slukem.Xr tunefs 8 12204e7d8d5Slukemfor more details on how to set this option. 12304e7d8d5Slukem.ne 1i 12404e7d8d5Slukem.It Fl e Ar maxbpg 12504e7d8d5SlukemThis indicates the maximum number of blocks any single file can 12604e7d8d5Slukemallocate out of a cylinder group before it is forced to begin 12704e7d8d5Slukemallocating blocks from another cylinder group. 12804e7d8d5SlukemThe default is about one quarter of the total blocks in a cylinder group. 12904e7d8d5SlukemSee 13004e7d8d5Slukem.Xr tunefs 8 13104e7d8d5Slukemfor more details on how to set this option. 13204e7d8d5Slukem.It Fl f Ar frag-size 13304e7d8d5SlukemThe fragment size of the file system in bytes. 13404e7d8d5SlukemIt must be a power of two ranging in value between 13504e7d8d5Slukem.Ar block-size Ns /8 13604e7d8d5Slukemand 13704e7d8d5Slukem.Ar block-size . 13804e7d8d5SlukemThe optimal 1392ae34280Swiz.Ar block-size : Ns Ar frag-size 14004e7d8d5Slukemratio is 8:1. 14104e7d8d5SlukemOther ratios are possible, but are not recommended, 14204e7d8d5Slukemand may produce unpredictable results. 14304e7d8d5SlukemThe default size depends upon the size of the file system: 14404e7d8d5Slukem.Pp 14504e7d8d5Slukem.Bl -tag -width "file system size" -compact -offset indent 14604e7d8d5Slukem.It Sy "file system size" 14704e7d8d5Slukem.Ar frag-size 148*01869ca4Swiz.It \&< 20 MB 14904e7d8d5Slukem0.5 KB 150*01869ca4Swiz.It \&< 1024 MB 15104e7d8d5Slukem1 KB 152*01869ca4Swiz.It \&>\&= 1024 MB 15304e7d8d5Slukem2 KB 15404e7d8d5Slukem.El 155ab5ccee6Ssimonb.It Fl g Ar groupname 156ab5ccee6SsimonbThis specifies the group name or group id of the root 157ab5ccee6Ssimonbinode of the file system. 15804e7d8d5Slukem.It Fl i Ar bytes-per-inode 15904e7d8d5SlukemThis specifies the density of inodes in the file system. 16004e7d8d5SlukemIf fewer inodes are desired, a larger number should be used; 16104e7d8d5Slukemto create more inodes a smaller number should be given. 16204e7d8d5SlukemThe default is to create an inode for every 16304e7d8d5Slukem.Pq 4 * Ar frag-size 16404e7d8d5Slukembytes of data space: 16504e7d8d5Slukem.Pp 16604e7d8d5Slukem.Bl -tag -width "file system size" -compact -offset indent 16704e7d8d5Slukem.It Sy "file system size" 16804e7d8d5Slukem.Ar bytes-per-inode 169*01869ca4Swiz.It \&< 20 MB 17004e7d8d5Slukem2 KB 171*01869ca4Swiz.It \&< 1024 MB 17204e7d8d5Slukem4 KB 173*01869ca4Swiz.It \&>\&= 1024 MB 17404e7d8d5Slukem8 KB 17504e7d8d5Slukem.El 17604e7d8d5Slukem.It Fl m Ar free-space 17704e7d8d5SlukemThe percentage of space reserved from normal users; the minimum free 17804e7d8d5Slukemspace threshold. 17904e7d8d5SlukemThe default value used is 5%. 18004e7d8d5SlukemSee 18104e7d8d5Slukem.Xr tunefs 8 18204e7d8d5Slukemfor more details on how to set this option. 183a8376531Sdsl.It Fl n Ar inodes 184a8376531SdslThis specifies the number of inodes for the filesystem. 185a8376531SdslIf both 186a8376531Sdsl.Fl i 187a8376531Sdsland 188a8376531Sdsl.Fl n 189a8376531Sdslare specified then 190a8376531Sdsl.Fl n 191a8376531Sdsltakes precedence. 19204e7d8d5Slukem.It Fl o 19304e7d8d5SlukemOptions are specified with a 19404e7d8d5Slukem.Fl o 19504e7d8d5Slukemflag followed by a comma separated string of options. 19604e7d8d5SlukemSee the 19704e7d8d5Slukem.Xr mount 8 19804e7d8d5Slukemman page for possible options and their meanings. 199ab5ccee6Ssimonb.It Fl p Ar permissions 200ab5ccee6SsimonbThis specifies the permissions of the root 201ab5ccee6Ssimonbinode of the file system. 20204e7d8d5Slukem.It Fl s Ar size 20304e7d8d5SlukemThe size of the file system in sectors. 20404e7d8d5SlukemAn 20504e7d8d5Slukem.Sq s 20604e7d8d5Slukemsuffix will be interpreted as the number of sectors (the default). 20704e7d8d5SlukemAll other suffixes are interpreted as per other numeric arguments, 20804e7d8d5Slukemexcept that the number is converted into sectors by dividing by the 209415d88d5Sjnemethdefault sector size (which is 512 bytes) 21004e7d8d5Slukemafter suffix interpretation. 211ab5ccee6Ssimonb.It Fl u Ar username 212ab5ccee6SsimonbThis specifies the user name or user id of the root 213ab5ccee6Ssimonbinode of the file system. 214afbe178eSdsl.It Fl V Ar verbose 215afbe178eSdslThis controls the amount of information written to stdout: 216afbe178eSdsl.Bl -tag -width 3n -offset indent -compact 217afbe178eSdsl.It 0 218afbe178eSdslNo output 219afbe178eSdsl.It 1 220afbe178eSdslOverall size and cylinder group details. 221afbe178eSdsl.It 2 222afbe178eSdslA progress bar (dots ending at right hand margin). 223afbe178eSdsl.It 3 224afbe178eSdslThe first few super-block backup sector numbers are displayed before the 225afbe178eSdslprogress bar. 226afbe178eSdsl.It 4 227afbe178eSdslAll the super-block backup sector numbers are displayed (no progress bar). 228afbe178eSdsl.El 229afbe178eSdslThe default is 0. 230afbe178eSdslIf 231afbe178eSdsl.Fl N 2328f657e21Swizis specified 233afbe178eSdsl.Nm 234afbe178eSdslstops before outputting the progress bar. 23504e7d8d5Slukem.El 23604e7d8d5Slukem.Sh NOTES 23704e7d8d5SlukemThe owner and group ids of the root node of the new file system 23804e7d8d5Slukemare set to the effective uid and gid of the user mounting 23904e7d8d5Slukemthe file system. 240e5aacbc0Slukem.Sh EXAMPLES 241e5aacbc0SlukemMount a 32 MB mfs on /tmp: 242e5aacbc0Slukem.Pp 243e5aacbc0Slukem.Dl mount_mfs -s 32m swap /tmp 24404e7d8d5Slukem.Sh SEE ALSO 24504e7d8d5Slukem.Xr disktab 5 , 24604e7d8d5Slukem.Xr fs 5 , 24704e7d8d5Slukem.Xr disklabel 8 , 24804e7d8d5Slukem.Xr diskpart 8 , 24904e7d8d5Slukem.Xr dumpfs 8 , 25004e7d8d5Slukem.\" .Xr format 8 , 25104e7d8d5Slukem.Xr fsck_ffs 8 , 25204e7d8d5Slukem.Xr fsirand 8 , 25304e7d8d5Slukem.Xr mount 8 , 25404e7d8d5Slukem.Xr newfs 8 , 25504e7d8d5Slukem.Xr tunefs 8 25604e7d8d5Slukem.Rs 25704e7d8d5Slukem.%A M. McKusick 25804e7d8d5Slukem.%A W. Joy 25904e7d8d5Slukem.%A S. Leffler 26004e7d8d5Slukem.%A R. Fabry 26104e7d8d5Slukem.%T A Fast File System for UNIX , 26204e7d8d5Slukem.%J ACM Transactions on Computer Systems 2 26304e7d8d5Slukem.%V 3 26404e7d8d5Slukem.%P pp 181-197 26504e7d8d5Slukem.%D August 1984 26604e7d8d5Slukem.%O (reprinted in the BSD System Manager's Manual) 26704e7d8d5Slukem.Re 26804e7d8d5Slukem.Sh HISTORY 26904e7d8d5SlukemThe 27004e7d8d5Slukem.Nm 27104e7d8d5Slukemcommand appeared in 27265286eb5Ssevan.Bx 4.4 . 273a054d0ccSwiz.Sh BUGS 274a054d0ccSwizThe 275a054d0ccSwiz.Cm async 276a054d0ccSwiz.Xr mount 8 277a054d0ccSwizoption is currently disabled in this file system because it causes 278a054d0ccSwizhangs when writing lots of data. 279a054d0ccSwizThe problem is that MFS needs to allocate pages to clean pages, so if 280a054d0ccSwizit waits until the last minute to clean pages then there may not be 281a054d0ccSwizany of them available to do the cleaning. 282