'\"macro stdmacro
.if n .pH g1a.mkfs_ufs @(#)mkfs_ufs	40.11 of 1/17/90
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} mkfs 1M "UFS" "\&"
.if \nX=1 .ds x} mkfs 1M "UFS"
.if \nX=2 .ds x} mkfs 1M "" "\&"
.if \nX=3 .ds x} mkfs "" "" "\&"
.TH \*(x}
.SH NAME
\f4mkfs\f1 (ufs) \- construct a \f4ufs\fP file system
.SH SYNOPSIS
\f4mkfs\f1
[
\f4\-F ufs\f1
]
[\f2generic_options\f1]
\f2special\f1
.br
\f4mkfs\f1
[
\f4\-F ufs\f1
]
[\f2generic_options\f1]
[\f4\-o\f2 specific_options\f1]
.I special size
.SH DESCRIPTION
.I generic_options
are options supported by the generic \f4mkfs\f1 command.
\f2current_options\f1
are options supported by the \f4s5\f1-specific module of the \f4mkfs\f1 command.
.PP
\f4mkfs\f1
constructs a file system by writing on the special file
.I special
unless the
\f1`\f4\-o N\f1'
flag has been specified.
The numeric
.I size
specifies the number of sectors in the file system.
\f4mkfs\f1
builds a file system with a root directory and a
\f4lost+found\f1
directory [see
\f4fsck\f1(1M)].
The number of inodes is calculated as a
function of the file system size.
.P
The options are:
.PP
.TP
\f4\-F ufs\f1
Specifies the \f4ufs\f1-FSType.
.TP
\f4\-o \f1
Specify the 
\f4ufs\f1
specific suboptions. 
The following suboptions are available:
.RS
.TP
\f4N\f1
Do not write the file system to the
.I special
file.
This suboption gives all the information
needed to create a file system but does
not create it.
.TP
.I nsect
The number of sectors per track on the disk.
The default is
\f418\f1.
.TP
.I ntrack
The number of tracks per cylinder on the disk.
The default is
\f49\f1.
.TP
.I bsize
The primary block size for files on the file system.
It must be a power of two, currently selected from
\f44096\f1
or
\f48192\f1
(the default).
.TP
.I fragsize
The fragment size for files on the file system.
The
.I 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
\f4512\f1
to
\f48192\f1.
The default is
\f41024\f1.
.TP
.I cgsize
The number of disk cylinders per cylinder group.
This number must be in the range
\f41\f1
to
\f432\f1.
The default is
\f416\f1.
.TP
.I free
The minimum percentage of free disk space allowed.
Once the file system capacity reaches this threshold, only
a privileged user is allowed to allocate disk blocks.
The default value is 
\f410%\f1.
.TP
.I rps
The rotational speed of the disk, in revolutions per second.
The default is
\f460\f1.
.TP
.I nbpi
The number of bytes for which one inode block is allocated.
This parameter is
currently set at one inode block for every 2048 bytes.
.TP
.I opt
Space or time optimization preference;
\f4s\f1
specifies optimization for space,
\f4t\f1
specifies optimization for time.
The default is
\f4t\f1.
.TP
.I apc
The number of alternates per cylinder (\s-1SCSI\s0 devices only). 
The default is
\f40\f1.
.TP
.I gap
The expected time (in milliseconds)
to service a transfer completion
interrupt and initiate a new transfer on the same disk.
It is used to decide how much rotational spacing to place between
successive blocks in a file.
The default is 4.
.RE
.SH NOTES
The value of the \f4nbpi\fP operand in the output of
\f4mkfs -m\fP is always 2048, even if the file system was
created with some other value.
.SH "SEE ALSO"
\f4fsck\fP(1M),
generic \f4mkfs\fP(1M),
\f4dir\fP(4),
\f4ufs\fP(4).
