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 | .\" | |
d069d05b | 5 | .\" @(#)newfs.8 6.5 (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%. |
4d8369df | 50 | .TP 10 |
96099622 KM |
51 | .B \-o optimization preference (``space'' or ``time'') |
52 | The file system can either be instructed to try to minimize the time spent | |
53 | allocating blocks, or to try to minimize the space fragmentation on the disk. | |
54 | If the value of minfree (see above) is less than 10%, | |
55 | the default is to optimize for space; | |
56 | if the value of minfree greater than or equal to 10%, | |
57 | the default is to optimize for time. | |
58 | .TP 10 | |
4d8369df KM |
59 | .B \-i number of bytes per inode |
60 | This specifies the density of inodes in the file system. | |
61 | The default is to create an inode for each 2048 bytes of data space. | |
62 | If fewer inodes are desired, a larger number should be used; | |
63 | to create more inodes a smaller number should be given. | |
d024f4bd KM |
64 | .TP 10 |
65 | .B \-c #cylinders/group | |
66 | The number of cylinders per cylinder group in a file system. | |
67 | The default value used is 16. | |
68 | .TP 10 | |
69 | .B \-s size | |
70 | The size of the file system in sectors. | |
71 | .PP | |
72 | The following options override the standard sizes for the disk geometry. | |
73 | Their default values are taken from the disk label. | |
74 | Changing these defaults is useful only when using | |
75 | .I newfs | |
76 | to build a file system whose raw image will eventually be used | |
77 | on a different type of disk than the one on which it is initially | |
78 | created (for example on a write-once disk). | |
d069d05b KM |
79 | Note that changing any of these values from their |
80 | defaults will make it impossible for | |
81 | .I fsck | |
82 | to find the alternate superblocks if the standard super block is lost. | |
d024f4bd KM |
83 | .TP 10 |
84 | .B \-r revolutions/minute | |
85 | The speed of the disk in revolutions per minute. | |
86 | .TP 10 | |
87 | .B \-S sector-size | |
88 | The size of a sector in bytes (almost never anything but 512). | |
89 | .TP 10 | |
90 | .B \-d sectors/track | |
91 | The number of sectors/track available for data | |
92 | allocation by the file system. | |
93 | This does not include sectors reserved at the end of each track for | |
94 | bad block replacement (see \fB\-p\fP below). | |
95 | .TP 10 | |
96 | .B \-t #tracks/cylinder | |
97 | The number of tracks/cylinder available for data | |
98 | allocation by the file system. | |
99 | .TP 10 | |
100 | .B \-p spare sectors per track | |
101 | Spare sectors (bad sector replacements) are physical sectors | |
102 | that occupy space at the end of each track. | |
103 | They are not counted as part of the sectors/track (\fB\-d\fP) | |
104 | since they are not available to the file system for data allocation. | |
105 | .TP 10 | |
106 | .B \-a spare sectors per cylinder | |
107 | Spare sectors (bad sector replacements) are physical sectors | |
108 | that occupy space at the end of the last track in the cylinder. | |
109 | They are deducted from the sectors/track (\fB\-d\fP) | |
110 | of the last track of each cylinder | |
111 | since they are not available to the file system for data allocation. | |
112 | .TP 10 | |
113 | .B \-l hardware sector interleave | |
114 | Used to describe perturbations in the media format to | |
115 | compensate for a slow controller. | |
116 | Interleave is physical sector interleave on each track, | |
117 | specified as the denominator of the ratio: | |
118 | .nf | |
119 | sectors read / sectors passed over | |
120 | .fi | |
121 | Thus an interleave of 1/1 implies contiguous layout, while 1/2 | |
122 | implies logical sector 0 is separated by one sector from logical | |
123 | sector 1. | |
124 | .TP 10 | |
125 | .B \-k sector 0 skew, per track | |
126 | Used to describe perturbations in the media format to | |
127 | compensate for a slow controller. | |
128 | Track skew is the offset of sector 0 on track N | |
129 | relative to sector 0 on track N-1 on the same cylinder. | |
4d8369df KM |
130 | .SH "SEE ALSO" |
131 | disktab(5), | |
132 | fs(5), | |
d024f4bd | 133 | disklabel(8), |
4d8369df KM |
134 | diskpart(8), |
135 | fsck(8), | |
136 | format(8), | |
4d8369df KM |
137 | tunefs(8) |
138 | .PP | |
96099622 KM |
139 | M. McKusick, W. Joy, S. Leffler, R. Fabry, |
140 | ``A Fast File System for UNIX'', | |
141 | \fIACM Transactions on Computer Systems 2\fP, 3. | |
142 | pp 181-197, August 1984. | |
2c6735dc | 143 | (reprinted in the System Manager's Manual, SMM:14) |