.\" Copyright (c) 1980 Regents of the University of California. .\" All rights reserved. The Berkeley software License Agreement .\" specifies the terms and conditions for redistribution. .\" .\" @(#)mkfs.8 6.3 (Berkeley) 5/21/86 .\" .TH MKFS 8 "May 21, 1986" .UC 4 .SH NAME mkfs \- construct a file system .SH SYNOPSIS .B /etc/mkfs [ \-N ] special size [ nsect [ ntrack [ blksize [ fragsize [ ncpg [ minfree [ rps [ nbpi [ opt ] ] ] ] ] ] ] ] ] .SH DESCRIPTION .B N.B.: file system are normally created with the .IR newfs (8) command. .PP .I Mkfs constructs a file system by writing on the special file .I special unless the \-N flag has been specified. The numeric size specifies the number of sectors in the file system. .I Mkfs builds a file system with a root directory and a .I lost+found directory. (see .IR fsck (8)) The number of i-nodes is calculated as a function of the file system size. No boot program is initialized by .I mkfs (see .IR newfs (8).) .PP The optional arguments allow fine tune control over the parameters of the file system. .B Nsect specify the number of sectors per track on the disk. .B Ntrack specify the number of tracks per cylinder on the disk. .B Blksize gives the primary block size for files on the file system. It must be a power of two, currently selected from 4096 or 8192. .B Fragsize gives the fragment size for files on the file system. The .B 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 512 to 8192. .B Ncpg specifies the number of disk cylinders per cylinder group. This number must be in the range 1 to 32. .B Minfree specifies the minimum percentage of free disk space allowed. Once the file system capacity reaches this threshold, only the super-user is allowed to allocate disk blocks. The default value is 10%. If a disk does not revolve at 60 revolutions per second, the .B rps parameter may be specified. If a file system will have more or less than the average number of files the .B nbpi (number of bytes per inode) can be specified to increase or decrease the number of inodes that are created. Space or time optimization preference can be specified with .B opt values of ``s'' for space or ``t'' for time. Users with special demands for their file systems are referred to the paper cited below for a discussion of the tradeoffs in using different configurations. .SH "SEE ALSO" fs(5), dir(5), fsck(8), newfs(8), tunefs(8) .PP M. McKusick, W. Joy, S. Leffler, R. Fabry, ``A Fast File System for UNIX'', \fIACM Transactions on Computer Systems 2\fP, 3. pp 181-197, August 1984. (reprinted in the System Manager's Manual, SMM:14) .SH BUGS There should be some way to specify bad blocks.