Annotation of coherent/a/usr/man/COHERENT/mkfs, revision 1.1.1.1

1.1       root        1: 
                      2: 
                      3: mkfs                         Command                         mkfs
                      4: 
                      5: 
                      6: 
                      7: 
                      8: Make a new file system
                      9: 
                     10: /eettcc/mmkkffss _f_i_l_e_s_y_s_t_e_m _p_r_o_t_o
                     11: 
                     12: mkfs makes  a new file system.  filesystem  names the file (norm-
                     13: ally a block special file) where the new file system will reside.
                     14: The contents  of the newly  created file system  are described in
                     15: proto.  proto can be either a number or a file name.
                     16: 
                     17: If proto  is a  number, mkfs creates  an empty file  system (con-
                     18: taining only  a root  directory) of the  size in blocks  given by
                     19: proto.  The  number of i-nodes  is calculated as  a percentage of
                     20: this number.  The command
                     21: 
                     22: 
                     23:         /etc/mkfs /dev/fha0 2400
                     24: 
                     25: 
                     26: creates a  file system on  a high-density, 5.25-inch  diskette in
                     27: drive 0.   If the disk is a  high-density, 3.5-inch diskette, use
                     28: the command:
                     29: 
                     30: 
                     31:         /etc/mkfs /dev/fva0 2880
                     32: 
                     33: 
                     34: If proto is a file name,  however, the contents of that file will
                     35: be used  as a prototype  for modeling the new  file system.  This
                     36: prototype file must be laid out in the following manner:
                     37: 
                     38: 
                     39:      _b_o_o_t_s_t_r_a_p__f_i_l_e__n_a_m_e  _f_i_l_e__s_y_s_t_e_m__n_a_m_e  _d_e_v_i_c_e__n_a_m_e
                     40:      _n_o.__o_f__b_l_o_c_k_s  _n_o.__o_f__i-_n_o_d_e_s  _m  _n
                     41:      %_b _X_X _X_X _X_X
                     42:      ...
                     43:      _d_i_r_e_c_t_o_r_y__n_a_m_e
                     44:              _d_i_r_e_c_t_o_r_y__n_a_m_e _m_o_d_e _u_s_e_r__i_d _g_r_o_u_p__i_d _c_o_n_t_e_n_t_s
                     45:              ...
                     46:              $
                     47:      $
                     48: 
                     49: 
                     50: Each line is described below.
                     51: 
                     52: The first  line has three fields.   Field 1, bootstrap_file_name,
                     53: contains the name of a file that holds the boot strap, which must
                     54: fit into  block 0 of the disk.   Field 2, file_system_name, gives
                     55: the name of the file  system; and field 3, device_name, gives the
                     56: name of  file system's  physical device (for  example, /ddeevv/hhdd11).
                     57: Only the  first six characters in  fields 2 and  the  first 11 in
                     58: field 3 are significant; all characters after them are ignored.
                     59: 
                     60: The second  line contains  four fields.  Field  1, no._of_blocks,
                     61: gives the  size of the  file system in blocks;  field 2, no_of_i-
                     62: 
                     63: 
                     64: COHERENT Lexicon                                           Page 1
                     65: 
                     66: 
                     67: 
                     68: 
                     69: mkfs                         Command                         mkfs
                     70: 
                     71: 
                     72: 
                     73: nodes, gives  the number of i-nodes in  the file system.  Because
                     74: each  file   or  directory  requires  one   i-node,  this  number
                     75: represents the  limit on the number of files  that may be created
                     76: in the file system.  A ratio of seven blocks per i-node generally
                     77: works well.  Fields 3 and 4 control interleaving on your disk.  m
                     78: tells the  system how many blocks to skip  when it increments the
                     79: virtual block  number.  n is the size  of a ``virtual cylinder''.
                     80: All the blocks on a virtual cylinder will be allocated before ad-
                     81: vancing to  the next virtual  cylinder.  The value of  _n need not
                     82: correspond to  the size of  an actual cylinder,  although perfor-
                     83: mance is  improved when it does.   m and n are  specific for your
                     84: hardware.
                     85: 
                     86: Next, the third line and following begin with %bb.  These list the
                     87: bad blocks on your storage device.  One or more block numbers may
                     88: appear on each line,  separated by white space.  These blocks are
                     89: allocated to the bad block file (i-node 1).
                     90: 
                     91: The remaining  lines in the  _p_r_o_t_o file define  the names, modes,
                     92: and contents  of the  directories and  files in the  file system.
                     93: These  lines are  divided into  fields  separated by  white space
                     94: (blanks or tabs) as follows:
                     95: 
                     96: *  The  first field  names the file  or directory to  be created.
                     97:    This field  is missing on the first  line, which describes the
                     98:    root directory of the file system.
                     99: 
                    100: *  The second field describes the  mode of the file, which is six
                    101:    characters  long.  The  first character  gives the  file type,
                    102:    that is, whether  the file is ordinary (`-'), directory (`d'),
                    103:    block special (`b'),   or character special (`c').  The second
                    104:    character is `u' for set user id on execution,  and `-' other-
                    105:    wise.  The  third character is `g' for set  group id on execu-
                    106:    tion,  and `-' otherwise.  Characters 4 through 6 specify per-
                    107:    missions in  octal; for example, 664444  specifies read and write
                    108:    permission for the owner, read permission for other users from
                    109:    the  same group,  and  read permission  for  users from  other
                    110:    groups.
                    111:    If the above file  type were a directory, subsequent files are
                    112:    recursively  defined under that  directory, until  the current
                    113:    level of  directory is terminated  by a line  containing a `$'
                    114:    character.
                    115: 
                    116: *  The next two fields  specify the owner's numerical user id and
                    117:    group id.
                    118: 
                    119: *  The  last field describes file contents.   For a directory, it
                    120:    is not  needed.  For  an ordinary  file, it is  the name  of a
                    121:    COHERENT file that will be copied into the newly created file.
                    122:    For  block or  character-special files,  there are  two fields
                    123:    that specify the numbers of the major and minor devices.
                    124: 
                    125: Finally, each  directory's description and the  entire _p_r_o_t_o file
                    126: must terminate with dollar signs `$'.
                    127: 
                    128: 
                    129: 
                    130: COHERENT Lexicon                                           Page 2
                    131: 
                    132: 
                    133: 
                    134: 
                    135: mkfs                         Command                         mkfs
                    136: 
                    137: 
                    138: 
                    139: The  proto  file  need  not  contain  all of  the  above  fields.
                    140: However, it must contain the name of the boot block (line 1), the
                    141: number of blocks and the number  of i-nodes (line 2), the list of
                    142: bad blocks,  the name of  at least one directory,  and the dollar
                    143: sign that ends the file.
                    144: 
                    145: The following example  specifies a proto file for a high-density,
                    146: 5.25-inch floppy  disk; note that this floppy  disk is faulty and
                    147: contains a number of bad blocks:
                    148: 
                    149: 
                    150: /conf/boot.fha
                    151: 2400 100
                    152: %b 55
                    153: %b 185 86
                    154: d--755 3 1
                    155:      coherent ---644 3 1 /coherent
                    156:      tmp     d--777 3 1
                    157:      $
                    158:      bin     d--755 3 1
                    159:              mail   -u-755 0 1 /bin/mail
                    160:      $
                    161:      dev     d--755 3 1
                    162:              tty30  c--644 0 1 3 0
                    163:              tty35  c--644 0 1 3 5
                    164:              mt0    b--600 0 1 12 0
                    165:      $
                    166: $
                    167: 
                    168: 
                    169: You can use the command badscan to draw up the list of bad blocks
                    170: on your disk and create a skeleton _p_r_o_t_o file.
                    171: 
                    172: ***** See Also  ***** badscan, chmod, commands, fsck, mount, res-
                    173: tor, unmkfs
                    174: 
                    175: ***** Diagnostics *****
                    176: 
                    177: Diagnostic  message  are generated  for  badly constructed  proto
                    178: files or for I/O errors on the file system.
                    179: 
                    180: 
                    181: 
                    182: 
                    183: 
                    184: 
                    185: 
                    186: 
                    187: 
                    188: 
                    189: 
                    190: 
                    191: 
                    192: 
                    193: 
                    194: 
                    195: 
                    196: COHERENT Lexicon                                           Page 3
                    197: 
                    198: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.