- online man pages   

SunOS man pages : mkfs_ufs (1)

Maintenance Commands                                 mkfs_ufs(1M)


mkfs_ufs - construct a ufs file system


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


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 argu- ment 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: -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 actu- ally 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. The sun4u architecture does not support the 4096 block size. fragsize=n The smallest amount of disk space in bytes to allocate to a file. The smallest amout of disk space in bytes SunOS 5.8 Last change: 11 May 1999 1 Maintenance Commands mkfs_ufs(1M) 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. 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, 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. 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 thres- hold, 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 subse- quently 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 ini- tiate a new transfer on the same disk. The value is SunOS 5.8 Last change: 11 May 1999 2 Maintenance Commands mkfs_ufs(1M) 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) com- mand. 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. 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.


The following operands are supported: raw_device_file The disk partition on which to write.


See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | SUNWcsu | |_____________________________|_____________________________|


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


SunOS 5.8 Last change: 11 May 1999 3 Maintenance Commands mkfs_ufs(1M) The following error message occurs typically on very high density disks. On such disks, the file system structure can- not 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 pos- sible cause is the specified size being smaller than the partition size. Warning: num sector(s) in last cylinder group unallocated SunOS 5.8 Last change: 11 May 1999 4