|
|
1.1 root 1: .\" Copyright (c) 1983, 1987 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)newfs.8 6.6 (Berkeley) 10/1/87
6: .\"
7: .TH NEWFS 8 "October 1, 1987"
8: .UC 5
9: .SH NAME
10: newfs \- construct a new file system
11: .SH SYNOPSIS
12: .B /etc/newfs
13: [
14: .B \-N
15: ] [
16: .B mkfs-options
17: ]
18: .B special
19: .SH DESCRIPTION
20: .I Newfs
21: replaces the more obtuse
22: .IR mkfs (8)
23: program.
24: Before running
25: .IR newfs ,
26: the disk must be labeled using
27: .IR disklabel (8).
28: .I Newfs
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.
34: The
35: .B \-N
36: option causes the file system parameters to be printed out
37: without really creating the file system.
38: .PP
39: The following options define the general layout policies.
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
47: .B \-m free space %
48: The percentage of space reserved from normal users; the minimum
49: free space threshold. The default value used is 10%.
50: See
51: .IR tunefs (8)
52: for more details on how to set this option.
53: .TP 10
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.
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.
90: .TP 10
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.
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).
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.
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
122: .B \-u sectors/track
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.
135: They are not counted as part of the sectors/track (\fB\-u\fP)
136: since they are not available to the file system for data allocation.
137: .TP 10
138: .B \-x spare sectors per cylinder
139: Spare sectors (bad sector replacements) are physical sectors
140: that occupy space at the end of the last track in the cylinder.
141: They are deducted from the sectors/track (\fB\-u\fP)
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.
162: .SH "SEE ALSO"
163: disktab(5),
164: fs(5),
165: disklabel(8),
166: diskpart(8),
167: fsck(8),
168: format(8),
169: tunefs(8)
170: .PP
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.
175: (reprinted in the System Manager's Manual, SMM:14)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.