Commit | Line | Data |
---|---|---|
48609c27 KM |
1 | .\" Copyright (c) 1983, 1987 The Regents of the University of California. |
2 | .\" All rights reserved. | |
4d8369df | 3 | .\" |
f7c99d97 | 4 | .\" %sccs.include.redist.man% |
48609c27 | 5 | .\" |
f7c99d97 | 6 | .\" @(#)newfs.8 6.9 (Berkeley) %G% |
4d8369df | 7 | .\" |
1ad9b5f3 | 8 | .TH NEWFS 8 "" |
4d8369df KM |
9 | .UC 5 |
10 | .SH NAME | |
c01742b3 | 11 | newfs, mfs \- construct a new file system |
4d8369df | 12 | .SH SYNOPSIS |
f7c99d97 | 13 | .B newfs |
4d8369df | 14 | [ |
96099622 KM |
15 | .B \-N |
16 | ] [ | |
c01742b3 | 17 | .B newfs-options |
4d8369df | 18 | ] |
d024f4bd | 19 | .B special |
c01742b3 | 20 | .br |
f7c99d97 | 21 | .B mfs |
c01742b3 KM |
22 | [ |
23 | .B \-F | |
24 | mount_flags | |
25 | ] [ | |
26 | .B newfs-options | |
27 | ] | |
28 | .B special node | |
4d8369df KM |
29 | .SH DESCRIPTION |
30 | .I Newfs | |
d024f4bd | 31 | replaces the more obtuse |
4d8369df KM |
32 | .IR mkfs (8) |
33 | program. | |
d024f4bd | 34 | Before running |
c01742b3 KM |
35 | .I newfs |
36 | or | |
37 | .IR mfs , | |
d024f4bd KM |
38 | the disk must be labeled using |
39 | .IR disklabel (8). | |
4d8369df | 40 | .I Newfs |
d024f4bd KM |
41 | builds a file system on the specified special device |
42 | basing its defaults on the information in the disk label. | |
43 | Typically the defaults are reasonable, however | |
44 | .I newfs | |
45 | has numerous options to allow the defaults to be selectively overridden. | |
96099622 KM |
46 | The |
47 | .B \-N | |
48 | option causes the file system parameters to be printed out | |
d069d05b | 49 | without really creating the file system. |
4d8369df | 50 | .PP |
c01742b3 KM |
51 | .I Mfs |
52 | is used to build a file system in virtual memory and then mount it | |
53 | on a specified node. | |
54 | .I Mfs | |
55 | exits and the contents of the file system are lost | |
56 | when the file system is unmounted. | |
57 | If | |
58 | .I mfs | |
59 | is sent a signal while running, | |
60 | for example during system shutdown, | |
61 | it will attempt to unmount its | |
62 | corresponding file system. | |
63 | The parameters to | |
64 | .I mfs | |
65 | are the same as those to | |
66 | .IR newfs . | |
67 | The special file is only used to read the disk label which provides | |
68 | a set of configuration parameters for the memory based file system. | |
69 | The special file is typically that of the primary swap area, | |
70 | since that is where the file system will be backed up when | |
71 | free memory gets low and the memory supporting | |
72 | the file system has to be paged. | |
73 | .PP | |
d024f4bd | 74 | The following options define the general layout policies. |
4d8369df KM |
75 | .TP 10 |
76 | .B \-b block-size | |
77 | The block size of the file system in bytes. | |
78 | .TP 10 | |
79 | .B \-f frag-size | |
80 | The fragment size of the file system in bytes. | |
81 | .TP 10 | |
4d8369df KM |
82 | .B \-m free space % |
83 | The percentage of space reserved from normal users; the minimum | |
d069d05b | 84 | free space threshold. The default value used is 10%. |
39970f0e KM |
85 | See |
86 | .IR tunefs (8) | |
87 | for more details on how to set this option. | |
4d8369df | 88 | .TP 10 |
96099622 KM |
89 | .B \-o optimization preference (``space'' or ``time'') |
90 | The file system can either be instructed to try to minimize the time spent | |
91 | allocating blocks, or to try to minimize the space fragmentation on the disk. | |
92 | If the value of minfree (see above) is less than 10%, | |
93 | the default is to optimize for space; | |
94 | if the value of minfree greater than or equal to 10%, | |
95 | the default is to optimize for time. | |
39970f0e KM |
96 | See |
97 | .IR tunefs (8) | |
98 | for more details on how to set this option. | |
99 | .TP 10 | |
100 | .B \-a maxcontig | |
101 | This specifies the maximum number of contiguous blocks that will | |
102 | be laid out before forcing a rotational delay (see \-d below). | |
103 | The default value is one. | |
104 | See | |
105 | .IR tunefs (8) | |
106 | for more details on how to set this option. | |
107 | .TP 10 | |
108 | .B \-d rotdelay | |
109 | This specifies the expected time (in milliseconds) | |
110 | to service a transfer completion | |
111 | interrupt and initiate a new transfer on the same disk. | |
112 | The default is 4 milliseconds. | |
113 | See | |
114 | .IR tunefs (8) | |
115 | for more details on how to set this option. | |
116 | .TP 10 | |
117 | .B \-e maxbpg | |
118 | This indicates the maximum number of blocks any single file can | |
119 | allocate out of a cylinder group before it is forced to begin | |
120 | allocating blocks from another cylinder group. | |
121 | The default is about one quarter of the total blocks in a cylinder group. | |
122 | See | |
123 | .IR tunefs (8) | |
124 | for more details on how to set this option. | |
96099622 | 125 | .TP 10 |
4d8369df KM |
126 | .B \-i number of bytes per inode |
127 | This specifies the density of inodes in the file system. | |
128 | The default is to create an inode for each 2048 bytes of data space. | |
129 | If fewer inodes are desired, a larger number should be used; | |
130 | to create more inodes a smaller number should be given. | |
d024f4bd KM |
131 | .TP 10 |
132 | .B \-c #cylinders/group | |
133 | The number of cylinders per cylinder group in a file system. | |
134 | The default value used is 16. | |
135 | .TP 10 | |
136 | .B \-s size | |
137 | The size of the file system in sectors. | |
138 | .PP | |
139 | The following options override the standard sizes for the disk geometry. | |
140 | Their default values are taken from the disk label. | |
141 | Changing these defaults is useful only when using | |
142 | .I newfs | |
143 | to build a file system whose raw image will eventually be used | |
144 | on a different type of disk than the one on which it is initially | |
145 | created (for example on a write-once disk). | |
d069d05b KM |
146 | Note that changing any of these values from their |
147 | defaults will make it impossible for | |
148 | .I fsck | |
149 | to find the alternate superblocks if the standard super block is lost. | |
d024f4bd KM |
150 | .TP 10 |
151 | .B \-r revolutions/minute | |
152 | The speed of the disk in revolutions per minute. | |
153 | .TP 10 | |
154 | .B \-S sector-size | |
155 | The size of a sector in bytes (almost never anything but 512). | |
156 | .TP 10 | |
39970f0e | 157 | .B \-u sectors/track |
d024f4bd KM |
158 | The number of sectors/track available for data |
159 | allocation by the file system. | |
160 | This does not include sectors reserved at the end of each track for | |
161 | bad block replacement (see \fB\-p\fP below). | |
162 | .TP 10 | |
163 | .B \-t #tracks/cylinder | |
164 | The number of tracks/cylinder available for data | |
165 | allocation by the file system. | |
166 | .TP 10 | |
167 | .B \-p spare sectors per track | |
168 | Spare sectors (bad sector replacements) are physical sectors | |
169 | that occupy space at the end of each track. | |
39970f0e | 170 | They are not counted as part of the sectors/track (\fB\-u\fP) |
d024f4bd KM |
171 | since they are not available to the file system for data allocation. |
172 | .TP 10 | |
39970f0e | 173 | .B \-x spare sectors per cylinder |
d024f4bd KM |
174 | Spare sectors (bad sector replacements) are physical sectors |
175 | that occupy space at the end of the last track in the cylinder. | |
39970f0e | 176 | They are deducted from the sectors/track (\fB\-u\fP) |
d024f4bd KM |
177 | of the last track of each cylinder |
178 | since they are not available to the file system for data allocation. | |
179 | .TP 10 | |
180 | .B \-l hardware sector interleave | |
181 | Used to describe perturbations in the media format to | |
182 | compensate for a slow controller. | |
183 | Interleave is physical sector interleave on each track, | |
184 | specified as the denominator of the ratio: | |
185 | .nf | |
186 | sectors read / sectors passed over | |
187 | .fi | |
188 | Thus an interleave of 1/1 implies contiguous layout, while 1/2 | |
189 | implies logical sector 0 is separated by one sector from logical | |
190 | sector 1. | |
191 | .TP 10 | |
192 | .B \-k sector 0 skew, per track | |
193 | Used to describe perturbations in the media format to | |
194 | compensate for a slow controller. | |
195 | Track skew is the offset of sector 0 on track N | |
196 | relative to sector 0 on track N-1 on the same cylinder. | |
c01742b3 KM |
197 | .PP |
198 | The following option applies only to | |
199 | .IR mfs . | |
200 | .TP 10 | |
201 | .B \-F mount flags | |
202 | Used to pass in a decimal numeric value to be passed | |
203 | as mount flags when running as a memory based file system. | |
204 | This option is primarily intended for use when | |
205 | .I mfs | |
206 | is started by the | |
207 | .IR mount (8) | |
208 | command. | |
4d8369df KM |
209 | .SH "SEE ALSO" |
210 | disktab(5), | |
211 | fs(5), | |
d024f4bd | 212 | disklabel(8), |
4d8369df KM |
213 | diskpart(8), |
214 | fsck(8), | |
215 | format(8), | |
4d8369df KM |
216 | tunefs(8) |
217 | .PP | |
96099622 KM |
218 | M. McKusick, W. Joy, S. Leffler, R. Fabry, |
219 | ``A Fast File System for UNIX'', | |
220 | \fIACM Transactions on Computer Systems 2\fP, 3. | |
221 | pp 181-197, August 1984. | |
2c6735dc | 222 | (reprinted in the System Manager's Manual, SMM:14) |