[0m


MKFS(8)             UNIX Programmer's Manual		  MKFS(8)



[1mNAME
     [0mmkfs - construct a file system

[1mSYNOPSIS
     /usr/sbin/mkfs [0m[ -N ] _s_p_e_c_i_a_l _s_i_z_e [ _n_s_e_c_t ] [ _n_t_r_a_c_k ]
	  [ _b_l_k_s_i_z_e ] [ _f_r_a_g_s_i_z_e ] [ _n_c_p_g ] [ _m_i_n_f_r_e_e ]
	  [ _r_p_s ] [ _n_b_p_i ] [ _o_p_t ]

[1mDESCRIPTION
     N.B.: [0mfile system are normally created with the _n_e_w_f_s(8)
     command.

     _M_k_f_s constructs a file system by writing on the special file
     _s_p_e_c_i_a_l unless the -N flag has been specified.  The numeric
     size specifies the number of sectors in the file system.
     _M_k_f_s builds a file system with a root directory and a
     _l_o_s_t+_f_o_u_n_d directory.  (see _f_s_c_k(8)) The number of i-nodes
     is calculated as a function of the file system size.  No
     boot program is initialized by _m_k_f_s (see _n_e_w_f_s(8),) indeed,
     the boot block is specifically trashed to prevent any other
     OS from recognising one of its (ex-) disks.

     The _s_i_z_e parameter can optionally take the form:
	  _t_o_t_a_l_s_e_c_t_o_r_s@_b_y_t_e_s_p_e_r_s_e_c_t_o_r
     when the bytes per sector is not the default 512.

     The optional arguments allow fine tune control over the
     parameters of the file system.  [1mNsect [0mspecify the number of
     sectors per track on the disk.  [1mNtrack [0mspecify the number of
     tracks per cylinder on the disk.  [1mBlksize [0mgives the primary
     block size for files on the file system.  It must be a power
     of two, currently selected from 4096 or 8192.  [1mFragsize
     [0mgives the fragment size for files on the file system.  The
     [1mfragsize [0mrepresents 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.  [1mNcpg [0mspeci-
     fies the number of disk cylinders per cylinder group.  This
     number must be in the range 1 to 32.  [1mMinfree [0mspecifies 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 [1mrps [0mparameter may be specified.  If a file
     system will have more or less than the average number of
     files the [1mnbpi [0m(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 [1mopt [0mvalues 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.




Printed 5/7/99	    Revision 1.5 of 06/07/90			1






MKFS(8)             UNIX Programmer's Manual		  MKFS(8)



[1mSEE ALSO
     [0mfs(5), dir(5), fsck(8), newfs(8), tunefs(8)

     M. McKusick, W. Joy, S. Leffler, R. Fabry, ``A Fast File
     System for UNIX'', _A_C_M _T_r_a_n_s_a_c_t_i_o_n_s _o_n _C_o_m_p_u_t_e_r _S_y_s_t_e_m_s _2,
     3.  pp 181-197, August 1984.  (reprinted in the System
     Manager's Manual, SMM:14)

[1mBUGS
     [0mThere should be some way to specify bad blocks.

     In reality, despite setting a sector size, _m_k_f_s internally
     regards the file system as having 512 byte sectors. This is
     because most of UNIX has this sector size locked into it.
     The sector size given is just used to condition the parame-
     ters fed into, and the printout generated by _m_k_f_s.







































Printed 5/7/99	    Revision 1.5 of 06/07/90			2



[0m