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.
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.
The following options are supported:
Print out the file system parameters without actually creating the file system.
The number of sectors per track on the disk. The default is 32.
The number of tracks per cylinder on the disk. The default is 16.
Logical block size, either 4096 or 8192. The default is 8192. The sun4u architecture does not support the 4096 block size.
The smallest amount of disk space in bytes to allocate to a file. The smallest amout of disk space in bytes to allocate to a file. If the logical block size is 4096, legal values are 512, 1024, 2048, and 4096. When the logical block size is 8192, legal values are 1024, 2048, 4096, and 8192. The default value is 1024.
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, and then multiplying the result by 32. The default value will always be between 16 and 256. The per-cylinder-group meta data must fit in a space no larger than that available in one logical file system block. If too large a cgsize is requested, it is decreased by the minimum amount necessary.
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%.
The rotational speed of the disk, in revolutions per second. The default is 60.
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.
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.
The number of alternates per cylinder to reserve for bad block replacement (SCSI devices only). The default is 0.
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.
The number of different rotational positions in which to divide a cylinder group. The default is 8.
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.
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 attributes(5) for descriptions of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|
The following error message 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: 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.)
The following error message occurs if a user request for inodes or bytes (with the nbpi keyword) and the disk geometry results in a situation in which 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
The following error message occurs if the user parameters and disk geometry conflict; some disk space is lost. A possible cause is the specified size being smaller than the partition size.
Warning: num sector(s) in last cylinder group unallocated