System Administration Commands mkfsufs(1M)
NAME
mkfsufs - construct a UFS file system
SYNOPSIS
mkfs -F ufs [genericoptions] [-o FSTypespecificoptions] rawdevicefile
[size]
DESCRIPTION
The UFS-specific module of mkfs builds a UFS file system
with a root directory and a lost]found directory (see
fsck(1M)).
The UFS-specific mkfs is rarely run directly. Use the
newfs(1M) command instead.
rawdevicefile indicates the disk partition on which to
create the new file system. If the -o N, -V, or -m options
are specified, the rawdevicefile is not actually modified.
size specifies the number of disk sectors in the file sys-
tem, where a disk sector is usually 512 bytes. This argument
must follow the rawdevicefile argument and is required
(even with -o N), unless the -V or -m generic options are
specified.
genericoptions are supported by the generic mkfs command.
See mkfs(1M) for a description of these options.
OPTIONS
The following generic options are supported:
-m Print the command line that was used to create the
existing file system.
-V Print the current mkfs command line.
OPTIONS
The following UFS-specific options are supported:
-o Use one or more of the following values separated by
commas (with no intervening spaces) to specify UFS-
specific options:
apc=n The number of alternate sectors per
cylinder to reserve for bad block
replacement for SCSI devices only. The
default is 0.
SunOS 5.11 Last change: 8 Mar 2006 1
System Administration Commands mkfsufs(1M)
This option is not applicable for disks
with EFI labels and is ignored.
bsize=n The logical block size of the file sys-
tem in bytes, either 4096 or 8192. The
default is 8192. The sun4u architecture
does not support the 4096 block size.
calcbinsb Sends to stdout a binary (machine-
readable) version of the superblock
that would be used to create a file
system with the specified configuration
parameters.
calcsb Sends to stdout a human-readable ver-
sion of the superblock that would be
used to create a file system with the
specified configuration parameters.
cgsize=n The number of cylinders per cylinder
group, ranging from 16 to 256. The
default is calculated by dividing the
number of sectors in the file system by
the number of sectors in a gigabyte.
Then, the result is multiplied by 32.
The default value is always between 16
and 256.
The per-cylinder-group meta data must
fit in a space no larger than what is
available in one logical file system
block. If too large a cgsize is
requested, it is changed by the minimum
amount necessary.
fragsize=n The smallest amount of disk space in
bytes that can be allocated to a file.
fragsize must be a power of 2 divisor
of bsize, where:
bsize / fragsize is 1, 2, 4, or 8.
This means that if the logical block
size is 4096, legal values for fragsize
are 512, 1024, 2048, and 4096. When the
logical block size is 8192, legal
values are 1024, 2048, 4096, and 8192.
SunOS 5.11 Last change: 8 Mar 2006 2
System Administration Commands mkfsufs(1M)
The default value is 1024.
For file systems greater than 1 tera-
byte or for file systems created with
the mtb=y option, fragsize is forced to
match block size (bsize).
free=n The minimum percentage of free space to
maintain in the file system between 0%
and 99%, inclusively. This space is
off-limits to users. Once the file sys-
tem is filled to this threshold, only
the superuser can continue writing to
the file system.
The default is ((64 Mbytes/partition
size) * 100), rounded down to the
nearest integer and limited between 1%
and 10%, inclusively.
This parameter can be subsequently
changed using the tunefs(1M) command.
gap=n Rotational delay. This option is
obsolete in the Solaris 10 release. The
value is always set to 0, regardless of
the input value.
maxcontig=n The maximum number of logical blocks,
belonging to one file, that are allo-
cated contiguously. The default is cal-
culated as follows:
maxcontig = disk drive maximum transfer size / disk block size
If the disk drive's maximum transfer
size cannot be determined, the default
value for maxcontig is calculated from
kernel parameters as follows:
If maxphys is less than ufsmaxmaxphys,
which is typically 1 Mbyte, then max-
contig is set to maxphys. Otherwise,
maxcontig is set to ufsmaxmaxphys.
You can set maxcontig to any positive
integer value.
SunOS 5.11 Last change: 8 Mar 2006 3
System Administration Commands mkfsufs(1M)
The actual value will be the lesser of
what has been specified and what the
hardware supports.
You can subsequently change this param-
eter by using tunefs(1M).
mtb=y Set the parameters of the file system
to allow eventual growth to over a ter-
abyte in total file system size. This
option sets fragsize to be the same as
bsize, and sets nbpi to 1 Mbyte, unless
the -i option is used to make it even
larger. If you explicitly set the frag-
size or nbpi parameters to values that
are incompatible with this option, the
user-supplied value of fragsize or nbpi
is ignored.
N Print out the file system parameters
that would be used to create the file
system without actually creating the
file system.
nbpi=n The number of bytes per inode, which
specifies the density of inodes in the
file system. The number is divided into
the total size of the file system to
determine the number of inodes to
create.
This value should reflect the expected
average size of files in the file sys-
tem. If fewer inodes are desired, a
larger number should be used. To create
more inodes, a smaller number should be
given. The default is 2048.
The number of inodes can increase if
the file system is expanded with the
growfs command.
nrpos=n The number of different rotational
positions in which to divide a cylinder
group. The default is 8.
This option is not applicable for disks
with EFI labels and is ignored.
SunOS 5.11 Last change: 8 Mar 2006 4
System Administration Commands mkfsufs(1M)
nsect=n The number of sectors per track on the
disk. The default is 32.
ntrack=n The number of tracks per cylinder on
the disk. The default is 16.
This option is not applicable for disks
with EFI labels and is ignored.
opt=st The file system can either be
instructed to try to minimize the time
spent allocating blocks, or to try to
minimize the space fragmentation on the
disk. The default is time.
This parameter can be subsequently
changed with the tunefs(1M) command.
rps=n The rotational speed of the disk, in
revolutions per second. The default is
60.
Note that you specify rps for mkfs and
rpm for newfs.
This option is not applicable for disks
with EFI labels and is ignored.
Alternatively, parameters can be entered as a list of
space-separated values (without keywords) whose mean-
ing is positional. In this case, the -o option is
omitted and the list follows the size operand. This is
the way newfs passes the parameters to mkfs.
OPERANDS
The following operands are supported:
rawdevicefile The disk partition on which to write.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 8 Mar 2006 5
System Administration Commands mkfsufs(1M)
ATRIBUTE TYPE ATRIBUTE VALUE
Availability SUNWcsu
SEE ALSO
fsck(1M), mkfs(1M), newfs(1M), tunefs(1M), dirufs(4),
attributes(5), ufs(7FS)
DIAGNOSTICS
The following error message typically occurs with very high
density disks. On such disks, the file system structure can-
not encode the proper disk layout information. However, such
disks have enough onboard intelligence to make up for any
layout deficiencies, so there is no actual impact on perfor-
mance. The warning that performance might be impaired can be
safely ignored.
Warning: insufficient space in super block for
rotational layout tables with nsect sblock.fsnsect
and ntrak sblock.fsntrak. (File system performance may be impaired.)
The following error message occurs when the disk geometry
results in a situation where the last truncated cylinder
group cannot contain the correct number of data blocks. Some
disk space is wasted.
Warning: inode blocks/cyl group (grp) >= data blocks (num) in last cylinder
If there is only one cylinder group and if the above condi-
tion holds true, mkfs fails with the following error:
File system creation failed. There is only one cylinder group and that is
not even big enough to hold the inodes.
The following error message occurs when the best calculated
file system layout is unable to include the last few sectors
in the last cylinder group. This is due to the interaction
between how much space is used for various pieces of meta
data and the total blocks available in a cylinder group.
Modifying nbpi and cpg might reduce this number, but it is
SunOS 5.11 Last change: 8 Mar 2006 6
System Administration Commands mkfsufs(1M)
rarely worth the effort.
Warning: num sector(s) in last cylinder group unallocated
NOTES
You can use lofiadm to create a file that appears to the
mkfs command (for example, mkfspcfs or mkfsufs) as a raw
device. You can then use the mkfs command to create a file
system on that device. See lofiadm(1M) for examples of
creating a UFS and a PC (FAT) file system on a device
created by lofiadm.
Both the block and character devices, such as devices in
/dev/dsk and /dev/rdsk, must be available prior to running
the mkfs command.
SunOS 5.11 Last change: 8 Mar 2006 7
|