[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    mkfs_ufs(1M) manual page Table of Contents

Name

mkfs_ufs - construct a ufs file system

Synopsis

mkfs -F ufs [ generic_options ] [ -o FSType_specific_options ] raw_device_file [ size ]

Availability

SUNWcsu

Description

The ufs-specific module of mkfs builds a ufs file system with a root directory and a lost+found directory (see fsck(1M) ).

Note: The ufs-specific mkfs is rarely run directly; use the newfs(1M) command instead.

raw_device_file indicates the disk partition to write on unless the -o N option has been specified, or either the -V or -m generic options are passed from the generic mkfs module. size specifies the number of sectors in the file system. This argument must follow the raw_device_file argument, and is required (even with -o N) unless the -V or -m generic options are specified.

generic_options are supported by the generic mkfs command. See mkfs(1M) for a description of these options.

Options

-o
Use one or more of the following values separated by commas (with no intervening spaces) to specify ufs-specific options:
N
Print out the file system parameters without actually creating the file system.
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.
bsize=n
Logical block size, either 4096 or 8192. The default is 8192.
fragsize=n
The smallest amount of disk space in bytes to allocate to a file. The value must be a power of 2 selected from the range 512 to the logical block size. If logical block size is 4096, legal values are 512, 1024, 2048 and 4096; if logical block size is 8192, 8192 is also a legal value. The default is 1024.
cgsize=n
The number of cylinders per cylinder group. The default is 16.
free=n
The minimum percentage of free space to maintain in the file system. This space is off-limits to normal users. Once the file system is filled to this threshold, only the superuser can continue writing to the file system. This parameter can be subsequently changed using the tunefs(1M) command. The default is 10%.
rps=n
The rotational speed of the disk, in revolutions per second. The default is 60.
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 fixed number of inodes to create. It should reflect the expected average size of files in the file system. 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.
opt=a
Space or time optimization preference; s specifies optimization for space, t specifies optimization for time. The default is t. This parameter may be subsequently changed with the tunefs(1M) command.
apc=n
The number of alternates per cylinder to reserve for bad block replacement (SCSI devices only). The default is 0.
gap=n
Rotational delay. The expected time (in milliseconds) to service a transfer completion interrupt and initiate a new transfer on the same disk. The value is used to decide how much rotational spacing to place between successive blocks in a file. This parameter can be subsequently changed using the tunefs(1M) command. The default is disk-type dependent.
nrpos=n
The number of different rotational positions in which to divide a cylinder group. The default is 8.
maxcontig=n
The maximum number of blocks, belonging to one file, that will be allocated contiguously before inserting a rotational delay. For a 4K file system, the default is 14; for an 8K file system it is 7. This parameter can be subsequently changed using the tunefs(1M) command.
Note:
This parameter also controls clustering. Regardless of the value of gap, clustering is enabled only when maxcontig is greater than 1. Clustering allows higher I/O rates for sequential I/O and is described in tunefs(1M) .

Alternatively, parameters can be entered as a list of space-separated values (without keywords) whose meaning 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.

See Also

fsck(1M) , mkfs(1M) , newfs(1M) , tunefs(1M) , dir_ufs(4) , fs_ufs(4)

Diagnostics

Warning: insufficient space in super block for rotational
layout tables with nsect sblock.fs_nsect and ntrak sblock.fs_ntrak. (File system performance may be impaired.)
Occurs typically on very high density disks.
On such disks, the file system structure cannot encode the proper disk layout information, resulting in suboptimal performance.
Warning: inode blocks/cyl group (grp) >= data blocks (num) in last cylinder
User request for inodes/byte (with the nbpi keyword) and the disk geometry results in a situation in which the last truncated cylinder group can not contain the correct number of data blocks; some disk space is wasted.
Warning: num sector(s) in last cylinder group unallocated
User parameters and disk geometry conflict; some disk space is lost. A possible cause is the specified size being smaller than the partition size.


Table of Contents