BSD 4_2 development
[unix-history] / usr / man / man8 / mkfs.8
index 5f6288b..6d19f6b 100644 (file)
-.TH MKFS 8 
+.TH MKFS 8 "10 May 1981"
 .UC 4
 .SH NAME
 mkfs \- construct a file system
 .SH SYNOPSIS
 .B /etc/mkfs
 special size
 .UC 4
 .SH NAME
 mkfs \- construct a file system
 .SH SYNOPSIS
 .B /etc/mkfs
 special size
-.br
-.B /etc/mkfs
-special proto
+[ nsect ]
+[ ntrack ]
+[ blksize ]
+[ fragsize ]
+[ ncpg ]
+[ minfree ]
+[ rps ]
 .SH DESCRIPTION
 .SH DESCRIPTION
+.B N.B.:
+file system are normally created with the
+.IR newfs (8)
+command.
+.PP
 .I Mkfs
 constructs a file system
 by writing on the special file
 .I special.
 .I Mkfs
 constructs a file system
 by writing on the special file
 .I special.
-In the first form of the command a numeric size is given and
-.I mkfs
-builds a file system with a single empty directory on it.
-The number of i-nodes is calculated as a function of the filesystem size.
-(No boot program is initialized in this form of
-.I mkfs.)
-.PP
-.B N.B.:
-All filesystems should have a
+The numeric size specifies the number of sectors in the file system.
+.I Mkfs
+builds a file system with a root directory and a
 .I lost+found
 .I lost+found
-directory for
-.IR fsck (8);
-this should be created for each file system by running
-.IR mklost+found (8)
-in the root directory of a newly created file system, after
-the file system is first mounted.
-.PP
-In bootstrapping, the second form of
+directory.
+(see 
+.IR fsck (8))
+The number of i-nodes is calculated as a function of the file system size.
+No boot program is initialized by
 .I mkfs
 .I mkfs
-is sometimes used.
-In this form, the file system is constructed according to the directions
-found in the prototype file
-.I proto.
-The prototype file
-contains tokens separated by spaces or
-new lines.
-The first token is the name of a file
-to be copied onto block zero as
-the bootstrap program,
-see
-.IR bproc (8).
-The second token is a number specifying the
-size of the created file system.
-Typically it will be the number of blocks on the device,
-perhaps diminished
-by space for swapping.
-The next token is the number of i-nodes
-in the i-list.
-The next set of tokens comprise the specification
-for the root file.
-File specifications consist of tokens
-giving the mode,
-the user-id,
-the group id,
-and the initial contents of the file.
-The syntax of the contents field
-depends on the mode.
-.PP
-The mode token for a file is a 6 character string.
-The first character
-specifies the type of the file.
-(The characters
-.B \-bcd
-specify regular, block special,
-character special and directory files
-respectively.)
-The second character of the type
-is either
-.B u
-or
-.B \-
-to specify set-user-id mode or not.
-The third is
-.B g
-or
-.B \-
-for the set-group-id mode.
-The rest of the mode
-is a three digit octal number giving the
-owner, group, and other read, write, execute
-permissions, see
-.IR chmod (1).
-.PP
-Two decimal number
-tokens come after the mode; they specify the
-user and group ID's of the owner of the file.
+(see
+.IR newfs (8).)
 .PP
 .PP
-If the file is a regular file,
-the next token is a pathname
-whence the contents and size are copied.
-.PP
-If the file is a block or character special file,
-two decimal number tokens
-follow which give the major and minor device numbers.
-.PP
-If the file is a directory,
-.I mkfs
-makes the entries
-.BR . ""
-and
-.B  ..
-and then
-reads a list of names and
-(recursively)
-file specifications for the entries
-in the directory.
-The scan is terminated with the
-token
-.BR $ .
-.PP
-A sample prototype specification follows:
-.PP
-.nf
-.in +5
-/usr/mdec/uboot
-4872 55
-d\-\-777 3 1
-usr    d\-\-777 3 1
-       sh      \-\-\-755 3 1 /bin/sh
-       ken     d\-\-755 6 1
-               $
-       b0      b\-\-644 3 1 0 0
-       c0      c\-\-644 3 1 0 0
-       $
-$
-.in -5
-.fi
+The optional arguments allow fine tune control over the
+parameters of the file system.
+.B Nsect
+specify the number of sectors per track on the disk.
+.B Ntrack 
+specify the number of tracks per cylinder on the disk.
+.B Blksize 
+gives the primary block size for files on the file system.
+It must be a power of two, currently selected from 4096 or 8192.
+.B Fragsize
+gives the fragment size for files on the file system.
+The
+.B fragsize
+represents the smallest amount of disk space that will be allocated to a file.
+It must be a power of two currently selected from the range 512 to 8192.
+.B Ncpg
+specifies the number of disk cylinders per cylinder group.
+This number must be in the range 1 to 32.
+.B Minfree
+specifies the minimum percentage of free disk space allowed.
+Once the file system capacity reaches this threshold, only
+the super-user is allowed to allocate disk blocks.  The default
+value is 10%.
+If a disk does not revolve at 60 revolutions per second, the
+.B rps
+parameter may be specified.
+Users with special demands for their file systems are referred to
+the paper cited below for a discussion of the tradeoffs in using
+different configurations.
 .SH "SEE ALSO"
 .SH "SEE ALSO"
-filsys(5),
+fs(5),
 dir(5),
 dir(5),
-bproc(8),
 fsck(8),
 fsck(8),
-mklost+found(8)
-.SH BUGS
-There should be some way to specify links.
+newfs(8),
+tunefs(8)
 .PP
 .PP
+McKusick, Joy, Leffler; "A Fast File System for Unix",
+Computer Systems Research Group, Dept of EECS, Berkeley, CA 94720;
+TR #7, September 1982.
+.SH BUGS
 There should be some way to specify bad blocks.
 There should be some way to specify bad blocks.
-.PP
-Should make
-.I lost+found
-automatically.