summaryrefslogtreecommitdiff
path: root/static/plan9-4e/man8/fsconfig.8
blob: 76ea6742729f0e576258e3a23b52a5d8bb684532 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
.TH FSCONFIG 8
.SH NAME
fsconfig \- configuring a file server
.SH SYNOPSIS
.B service
.I name
.PP
.B config
.I device
.PP
.B filsys
.I name
.I device
.PP
.B ream
.I name
.PP
.B recover
.I name
.PP
.B ip
.I ipaddr
.PP
.B ipgw
.I ipaddr
.PP
.B ipmask
.I ipaddr
.PP
.B ipauth
.I ipaddr
.PP
.B ipsntp
.I ipaddr
.PP
.B end
.SH DESCRIPTION
When a file server's configuration has not been set,
or by explicit request early in the server's initialization (see
.IR fs (8)),
the server enters `config mode'.  The commands described here
apply only in that mode.  They establish configuration constants
that are typically valid for the life of the server, and therefore
need be run only once.  If the non-volatile RAM on the server
gets erased, it will be necessary to recreate the configuration.
.PP
In these commands,
.I ipaddr
is an IP address in the form
.BR 111.103.94.19
and
.I name
is a text string without white space.
The syntax of a
.I device
is more complicated:
.TP
.BI w n1 . n2 . n3
A SCSI disk on target id
.IR n2 ,
unit
.IR n1 ,
and partition
.IR n3 .
A single number specifies a unit, while two numbers specify
.IB unit . partition\f1,
with the missing numbers defaulting to zero.
Any one of the numbers may be replaced by
.BI < m - n >
to represent the values
.I m
through
.I n
inclusive.  For example,
.B (w<1-4>)
is the concatenation of SCSI targets 1 through 4.
.TP
.BI l n1 . n2 . n3
.TP
.BI r n1 . n2 . n3
The same as
.BR w ,
but leaving a single block at the beginning for a label
.BI ( l ),
or not.
These are are only really relevant when used as
.I device3
in the
.B j
device (see below).
.TP
.BI ( device... )
A pseudo-device formed from the concatenation of the
.I devices
in the list.  The devices are
.I not
blank- or comma-separated.
.TP
.BI [ device... ]
A pseudo-device formed from the block-wise interleaving of the
.I devices
in the list.  The size of the result is the number of devices times
the size of the smallest device.
.TP
.BI p device . n1 . n2
A partition starting at
.IR n1 %
from the beginning of
.I device
with a length
.IR n2 %
of the size of the device.
Parenthesize
.I device
if it contains periods.
.TP
.BR j (\f2device1\ device2\f1...)\f2device3
.I Device1
is the SCSI juke box interface.
The
.IR device2 s
are the SCSI drives in the jukebox and
.I device3
represents the demountable platters in the juke box.
.TP
.BI f device
A pseudo-WORM disk: blocks on
.I device
can be written only once and may not be read unless written.
.TP
.BI c device1device2
A cached WORM.  The first
.I device
is the cache, the second the WORM.
.TP
.BI o
(Letter o) The read-only (dump) file system
of the previously defined cached WORM file system.
.PP
The
.B service
command sets the textual name of the server as known in
the network databases.
.PP
The configuration information is stored in block zero on a
device whose device string is written in non-volatile RAM.
The
.B config
command identifies the
.I device
on which the information is recorded.
.PP
The
.I filsys
command configures a file system on
.I device
and calls it
.IR name .
.I Name
is used as the specifier in
.B attach
messages to connect to that file system.
(The file system
.CW main
is the one attached to if the specifier is null; see
.IR attach (5)).
.PP
The
.I ream
command initializes the named file system.  It overwrites
any previous file system on the same device
and creates an empty root directory
on the device.
If
.I name
is
.BR main ,
the file server, until the next reboot,
will accept
.B wstat
messages
(see
.IR stat (5))
that change the owner and group of files,
to enable initializing a fresh file system from a
.IR mkfs (8)
archive.
.PP
For the
.I recover
command, the
named file system
must be a cached WORM.
.I Recover
clears the associated magnetic cache and initializes the file
system, effectively resetting its contents to the last dump.
.PP
The rest of the commands record IP addresses: the file server's address
.RI ( ip ),
the local gateway's
.RI ( ipgw ),
the local authentication server's
.RI ( ipauth ),
the local subnet mask
.RI ( ipmask ),
and the address of a system running an SNTP server.
.I Ipauth
should be
.B 0.0.0.0
if the system is doing its own authentication rather than
calling an external authentication server.
.PP
The various configuration commands only record what to do; they write
no data to disk.  The command
.I end
exits config mode and begins running the file server proper.
The server will then perform whatever I/O is required to establish
the configuration.
.SH EXAMPLE
Initialize a file server
.B kgbsun
with a single file system interleaved between SCSI targets 3 and 4.
.IP
.EX
service kgbsun
config w3
filsys main [w<3-4>]
ream main
.EE
.PP
Initialize a file server
.B kremvax
with a single disk on target 0 partitioned as a cached pseudo-WORM
file system with the cache on the third quarter of the drive
and the pseudo-WORM on the interleave of the first, second, and
fourth quarters.
.IP
.EX
service kremvax
config p(w0)50.1
filsys main cp(w0)50.25f[p(w0)0.25p(w0)25.25p(w0)75.25]
filsys dump o
ream main
.EE
.SH SOURCE
.BR /sys/src/fs/port/config.c
.SH "SEE ALSO
Ken Thompson,
``The Plan 9 File Server''.