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