finally no longer need setuid root except for rmthost()
[unix-history] / usr / src / sbin / newfs / newfs.8
CommitLineData
4d8369df
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
2c6735dc 5.\" @(#)newfs.8 6.3 (Berkeley) %G%
4d8369df 6.\"
1ad9b5f3 7.TH NEWFS 8 ""
4d8369df
KM
8.UC 5
9.SH NAME
10newfs \- construct a new file system
11.SH SYNOPSIS
12.B /etc/newfs
13[
96099622
KM
14.B \-N
15] [
4d8369df
KM
16.B \-v
17] [
18.B \-n
19] [
20.B mkfs-options
21]
22.B special disk-type
23.SH DESCRIPTION
24.I Newfs
25is a ``friendly'' front-end to the
26.IR mkfs (8)
27program.
28.I Newfs
29will look up the type of disk a file system is
30being created on in the disk description
31file
32.IR /etc/disktab ,
33calculate the appropriate
34parameters to use in calling
35.IR mkfs ,
36then build the file system by forking
37.I mkfs
38and, if the file system is a root partition,
39install the necessary bootstrap programs
40in the initial 8 sectors of the device.
41The
42.B \-n
43option prevents the
44bootstrap programs from being installed.
96099622
KM
45The
46.B \-N
47option causes the file system parameters to be printed out
48without actually creating the file system.
4d8369df
KM
49.PP
50If the
51.B \-v
52option is supplied,
53.I newfs
54will print out its actions, including
55the parameters passed to
56.IR mkfs .
57.PP
58Options which may be used to override default
59parameters passed to
60.I mkfs
61are:
62.TP 10
63.B \-s size
64The size of the file system in sectors.
65.TP 10
66.B \-b block-size
67The block size of the file system in bytes.
68.TP 10
69.B \-f frag-size
70The fragment size of the file system in bytes.
71.TP 10
72.B \-t #tracks/cylinder
73.TP 10
74.B \-c #cylinders/group
75The number of cylinders per cylinder group in a file system.
76The default value used is 16.
77.TP 10
78.B \-m free space %
79The percentage of space reserved from normal users; the minimum
80free space threshhold. The default value used is 10%.
81.TP 10
96099622
KM
82.B \-o optimization preference (``space'' or ``time'')
83The file system can either be instructed to try to minimize the time spent
84allocating blocks, or to try to minimize the space fragmentation on the disk.
85If the value of minfree (see above) is less than 10%,
86the default is to optimize for space;
87if the value of minfree greater than or equal to 10%,
88the default is to optimize for time.
89.TP 10
4d8369df
KM
90.B \-r revolutions/minute
91The speed of the disk in revolutions per minute (normally 3600).
92.TP 10
93.B \-S sector-size
94The size of a sector in bytes (almost never anything but 512).
95.TP 10
96.B \-i number of bytes per inode
97This specifies the density of inodes in the file system.
98The default is to create an inode for each 2048 bytes of data space.
99If fewer inodes are desired, a larger number should be used;
100to create more inodes a smaller number should be given.
101.SH FILES
102/etc/disktab for disk geometry and file system partition information
103.br
104/etc/mkfs to actually build the file system
105.br
106/usr/mdec for boot strapping programs
107.SH "SEE ALSO"
108disktab(5),
109fs(5),
110diskpart(8),
111fsck(8),
112format(8),
113mkfs(8),
114tunefs(8)
115.PP
96099622
KM
116M. McKusick, W. Joy, S. Leffler, R. Fabry,
117``A Fast File System for UNIX'',
118\fIACM Transactions on Computer Systems 2\fP, 3.
119pp 181-197, August 1984.
2c6735dc 120(reprinted in the System Manager's Manual, SMM:14)
4d8369df
KM
121.SH BUGS
122Should figure out the type of the disk without the user's help.