Commit | Line | Data |
---|---|---|
48609c27 KM |
1 | .\" Copyright (c) 1983, 1987 The Regents of the University of California. |
2 | .\" All rights reserved. | |
4d8369df | 3 | .\" |
48609c27 KM |
4 | .\" Redistribution and use in source and binary forms are permitted |
5 | .\" provided that the above copyright notice and this paragraph are | |
6 | .\" duplicated in all such forms and that any documentation, | |
7 | .\" advertising materials, and other materials related to such | |
8 | .\" distribution and use acknowledge that the software was developed | |
9 | .\" by the University of California, Berkeley. The name of the | |
10 | .\" University may not be used to endorse or promote products derived | |
11 | .\" from this software without specific prior written permission. | |
12 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
13 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
14 | .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
15 | .\" | |
16 | .\" @(#)newfs.8 6.7 (Berkeley) %G% | |
4d8369df | 17 | .\" |
1ad9b5f3 | 18 | .TH NEWFS 8 "" |
4d8369df KM |
19 | .UC 5 |
20 | .SH NAME | |
21 | newfs \- construct a new file system | |
22 | .SH SYNOPSIS | |
23 | .B /etc/newfs | |
24 | [ | |
96099622 KM |
25 | .B \-N |
26 | ] [ | |
4d8369df KM |
27 | .B mkfs-options |
28 | ] | |
d024f4bd | 29 | .B special |
4d8369df KM |
30 | .SH DESCRIPTION |
31 | .I Newfs | |
d024f4bd | 32 | replaces the more obtuse |
4d8369df KM |
33 | .IR mkfs (8) |
34 | program. | |
d024f4bd KM |
35 | Before running |
36 | .IR newfs , | |
37 | the disk must be labeled using | |
38 | .IR disklabel (8). | |
4d8369df | 39 | .I Newfs |
d024f4bd KM |
40 | builds a file system on the specified special device |
41 | basing its defaults on the information in the disk label. | |
42 | Typically the defaults are reasonable, however | |
43 | .I newfs | |
44 | has numerous options to allow the defaults to be selectively overridden. | |
96099622 KM |
45 | The |
46 | .B \-N | |
47 | option causes the file system parameters to be printed out | |
d069d05b | 48 | without really creating the file system. |
4d8369df | 49 | .PP |
d024f4bd | 50 | The following options define the general layout policies. |
4d8369df KM |
51 | .TP 10 |
52 | .B \-b block-size | |
53 | The block size of the file system in bytes. | |
54 | .TP 10 | |
55 | .B \-f frag-size | |
56 | The fragment size of the file system in bytes. | |
57 | .TP 10 | |
4d8369df KM |
58 | .B \-m free space % |
59 | The percentage of space reserved from normal users; the minimum | |
d069d05b | 60 | free space threshold. The default value used is 10%. |
39970f0e KM |
61 | See |
62 | .IR tunefs (8) | |
63 | for more details on how to set this option. | |
4d8369df | 64 | .TP 10 |
96099622 KM |
65 | .B \-o optimization preference (``space'' or ``time'') |
66 | The file system can either be instructed to try to minimize the time spent | |
67 | allocating blocks, or to try to minimize the space fragmentation on the disk. | |
68 | If the value of minfree (see above) is less than 10%, | |
69 | the default is to optimize for space; | |
70 | if the value of minfree greater than or equal to 10%, | |
71 | the default is to optimize for time. | |
39970f0e KM |
72 | See |
73 | .IR tunefs (8) | |
74 | for more details on how to set this option. | |
75 | .TP 10 | |
76 | .B \-a maxcontig | |
77 | This specifies the maximum number of contiguous blocks that will | |
78 | be laid out before forcing a rotational delay (see \-d below). | |
79 | The default value is one. | |
80 | See | |
81 | .IR tunefs (8) | |
82 | for more details on how to set this option. | |
83 | .TP 10 | |
84 | .B \-d rotdelay | |
85 | This specifies the expected time (in milliseconds) | |
86 | to service a transfer completion | |
87 | interrupt and initiate a new transfer on the same disk. | |
88 | The default is 4 milliseconds. | |
89 | See | |
90 | .IR tunefs (8) | |
91 | for more details on how to set this option. | |
92 | .TP 10 | |
93 | .B \-e maxbpg | |
94 | This indicates the maximum number of blocks any single file can | |
95 | allocate out of a cylinder group before it is forced to begin | |
96 | allocating blocks from another cylinder group. | |
97 | The default is about one quarter of the total blocks in a cylinder group. | |
98 | See | |
99 | .IR tunefs (8) | |
100 | for more details on how to set this option. | |
96099622 | 101 | .TP 10 |
4d8369df KM |
102 | .B \-i number of bytes per inode |
103 | This specifies the density of inodes in the file system. | |
104 | The default is to create an inode for each 2048 bytes of data space. | |
105 | If fewer inodes are desired, a larger number should be used; | |
106 | to create more inodes a smaller number should be given. | |
d024f4bd KM |
107 | .TP 10 |
108 | .B \-c #cylinders/group | |
109 | The number of cylinders per cylinder group in a file system. | |
110 | The default value used is 16. | |
111 | .TP 10 | |
112 | .B \-s size | |
113 | The size of the file system in sectors. | |
114 | .PP | |
115 | The following options override the standard sizes for the disk geometry. | |
116 | Their default values are taken from the disk label. | |
117 | Changing these defaults is useful only when using | |
118 | .I newfs | |
119 | to build a file system whose raw image will eventually be used | |
120 | on a different type of disk than the one on which it is initially | |
121 | created (for example on a write-once disk). | |
d069d05b KM |
122 | Note that changing any of these values from their |
123 | defaults will make it impossible for | |
124 | .I fsck | |
125 | to find the alternate superblocks if the standard super block is lost. | |
d024f4bd KM |
126 | .TP 10 |
127 | .B \-r revolutions/minute | |
128 | The speed of the disk in revolutions per minute. | |
129 | .TP 10 | |
130 | .B \-S sector-size | |
131 | The size of a sector in bytes (almost never anything but 512). | |
132 | .TP 10 | |
39970f0e | 133 | .B \-u sectors/track |
d024f4bd KM |
134 | The number of sectors/track available for data |
135 | allocation by the file system. | |
136 | This does not include sectors reserved at the end of each track for | |
137 | bad block replacement (see \fB\-p\fP below). | |
138 | .TP 10 | |
139 | .B \-t #tracks/cylinder | |
140 | The number of tracks/cylinder available for data | |
141 | allocation by the file system. | |
142 | .TP 10 | |
143 | .B \-p spare sectors per track | |
144 | Spare sectors (bad sector replacements) are physical sectors | |
145 | that occupy space at the end of each track. | |
39970f0e | 146 | They are not counted as part of the sectors/track (\fB\-u\fP) |
d024f4bd KM |
147 | since they are not available to the file system for data allocation. |
148 | .TP 10 | |
39970f0e | 149 | .B \-x spare sectors per cylinder |
d024f4bd KM |
150 | Spare sectors (bad sector replacements) are physical sectors |
151 | that occupy space at the end of the last track in the cylinder. | |
39970f0e | 152 | They are deducted from the sectors/track (\fB\-u\fP) |
d024f4bd KM |
153 | of the last track of each cylinder |
154 | since they are not available to the file system for data allocation. | |
155 | .TP 10 | |
156 | .B \-l hardware sector interleave | |
157 | Used to describe perturbations in the media format to | |
158 | compensate for a slow controller. | |
159 | Interleave is physical sector interleave on each track, | |
160 | specified as the denominator of the ratio: | |
161 | .nf | |
162 | sectors read / sectors passed over | |
163 | .fi | |
164 | Thus an interleave of 1/1 implies contiguous layout, while 1/2 | |
165 | implies logical sector 0 is separated by one sector from logical | |
166 | sector 1. | |
167 | .TP 10 | |
168 | .B \-k sector 0 skew, per track | |
169 | Used to describe perturbations in the media format to | |
170 | compensate for a slow controller. | |
171 | Track skew is the offset of sector 0 on track N | |
172 | relative to sector 0 on track N-1 on the same cylinder. | |
4d8369df KM |
173 | .SH "SEE ALSO" |
174 | disktab(5), | |
175 | fs(5), | |
d024f4bd | 176 | disklabel(8), |
4d8369df KM |
177 | diskpart(8), |
178 | fsck(8), | |
179 | format(8), | |
4d8369df KM |
180 | tunefs(8) |
181 | .PP | |
96099622 KM |
182 | M. McKusick, W. Joy, S. Leffler, R. Fabry, |
183 | ``A Fast File System for UNIX'', | |
184 | \fIACM Transactions on Computer Systems 2\fP, 3. | |
185 | pp 181-197, August 1984. | |
2c6735dc | 186 | (reprinted in the System Manager's Manual, SMM:14) |