Blame


1 6f4d00ee 2013-09-23 0intro .TH FOSSIL 4
2 6f4d00ee 2013-09-23 0intro .SH NAME
3 6f4d00ee 2013-09-23 0intro fossil, flchk, flfmt \- archival file server
4 6f4d00ee 2013-09-23 0intro .SH SYNOPSIS
5 6f4d00ee 2013-09-23 0intro .B fossil/fossil
6 6f4d00ee 2013-09-23 0intro [
7 6f4d00ee 2013-09-23 0intro .B -Dt
8 6f4d00ee 2013-09-23 0intro ]
9 6f4d00ee 2013-09-23 0intro [
10 6f4d00ee 2013-09-23 0intro .B -c
11 6f4d00ee 2013-09-23 0intro .I cmd
12 6f4d00ee 2013-09-23 0intro ]...
13 6f4d00ee 2013-09-23 0intro [
14 6f4d00ee 2013-09-23 0intro .B -f
15 6f4d00ee 2013-09-23 0intro .I file
16 6f4d00ee 2013-09-23 0intro ]
17 6f4d00ee 2013-09-23 0intro [
18 6f4d00ee 2013-09-23 0intro .B -m
19 6f4d00ee 2013-09-23 0intro .I free-memory-percent
20 6f4d00ee 2013-09-23 0intro ]
21 6f4d00ee 2013-09-23 0intro .PP
22 6f4d00ee 2013-09-23 0intro .B fossil/flchk
23 6f4d00ee 2013-09-23 0intro [
24 6f4d00ee 2013-09-23 0intro .B -f
25 6f4d00ee 2013-09-23 0intro ]
26 6f4d00ee 2013-09-23 0intro [
27 6f4d00ee 2013-09-23 0intro .B -c
28 6f4d00ee 2013-09-23 0intro .I ncache
29 6f4d00ee 2013-09-23 0intro ]
30 6f4d00ee 2013-09-23 0intro [
31 6f4d00ee 2013-09-23 0intro .B -h
32 6f4d00ee 2013-09-23 0intro .I host
33 6f4d00ee 2013-09-23 0intro ]
34 6f4d00ee 2013-09-23 0intro .I file
35 6f4d00ee 2013-09-23 0intro .PP
36 6f4d00ee 2013-09-23 0intro .B fossil/flfmt
37 6f4d00ee 2013-09-23 0intro [
38 6f4d00ee 2013-09-23 0intro .B -y
39 6f4d00ee 2013-09-23 0intro ]
40 6f4d00ee 2013-09-23 0intro [
41 6f4d00ee 2013-09-23 0intro .B -b
42 6f4d00ee 2013-09-23 0intro .I blocksize
43 6f4d00ee 2013-09-23 0intro ]
44 6f4d00ee 2013-09-23 0intro [
45 6f4d00ee 2013-09-23 0intro .B -h
46 6f4d00ee 2013-09-23 0intro .I host
47 6f4d00ee 2013-09-23 0intro ]
48 6f4d00ee 2013-09-23 0intro [
49 6f4d00ee 2013-09-23 0intro .B -l
50 6f4d00ee 2013-09-23 0intro .I label
51 6f4d00ee 2013-09-23 0intro ]
52 6f4d00ee 2013-09-23 0intro [
53 6f4d00ee 2013-09-23 0intro .B -v
54 6f4d00ee 2013-09-23 0intro .I score
55 6f4d00ee 2013-09-23 0intro ]
56 6f4d00ee 2013-09-23 0intro .I file
57 6f4d00ee 2013-09-23 0intro .PP
58 6f4d00ee 2013-09-23 0intro .B fossil/conf
59 6f4d00ee 2013-09-23 0intro [
60 6f4d00ee 2013-09-23 0intro .B -w
61 6f4d00ee 2013-09-23 0intro ]
62 6f4d00ee 2013-09-23 0intro .I file
63 6f4d00ee 2013-09-23 0intro [
64 6f4d00ee 2013-09-23 0intro .I config
65 6f4d00ee 2013-09-23 0intro ]
66 6f4d00ee 2013-09-23 0intro .PP
67 6f4d00ee 2013-09-23 0intro .B fossil/last
68 6f4d00ee 2013-09-23 0intro .I file
69 6f4d00ee 2013-09-23 0intro .SH DESCRIPTION
70 6f4d00ee 2013-09-23 0intro .I Fossil
71 6f4d00ee 2013-09-23 0intro is the main file system for Plan 9.
72 6f4d00ee 2013-09-23 0intro Unlike the Plan 9 file servers of old,
73 6f4d00ee 2013-09-23 0intro .I fossil
74 6f4d00ee 2013-09-23 0intro is a collection of user-space programs that run on a standard Plan 9 kernel.
75 6f4d00ee 2013-09-23 0intro The name of the main fossil file server at Murray Hill is
76 6f4d00ee 2013-09-23 0intro .BR pie .
77 6f4d00ee 2013-09-23 0intro The Plan 9 distribution file server,
78 6f4d00ee 2013-09-23 0intro .BR sources ,
79 6f4d00ee 2013-09-23 0intro is also a fossil server.
80 6f4d00ee 2013-09-23 0intro .PP
81 6f4d00ee 2013-09-23 0intro .I Fossil
82 6f4d00ee 2013-09-23 0intro is structured as a magnetic disk write buffer
83 6f4d00ee 2013-09-23 0intro optionally backed by a Venti server for archival storage.
84 6f4d00ee 2013-09-23 0intro It serves the Plan 9 protocol via TCP.
85 6f4d00ee 2013-09-23 0intro A
86 6f4d00ee 2013-09-23 0intro .I fossil
87 6f4d00ee 2013-09-23 0intro file server conventionally presents
88 6f4d00ee 2013-09-23 0intro three trees in the root directory of each file system:
89 6f4d00ee 2013-09-23 0intro .BR active ,
90 6f4d00ee 2013-09-23 0intro .BR archive ,
91 6f4d00ee 2013-09-23 0intro and
92 6f4d00ee 2013-09-23 0intro .BR snapshot .
93 6f4d00ee 2013-09-23 0intro .B /active
94 6f4d00ee 2013-09-23 0intro is the root of a conventional file system
95 6f4d00ee 2013-09-23 0intro whose blocks are stored in a disk file.
96 6f4d00ee 2013-09-23 0intro In a typical configuration, the file server periodically
97 6f4d00ee 2013-09-23 0intro marks the entire file system copy-on-write, effectively
98 6f4d00ee 2013-09-23 0intro taking a snapshot of the file system at that moment.
99 6f4d00ee 2013-09-23 0intro This snapshot is made available in a name
100 6f4d00ee 2013-09-23 0intro created from the date and time of the snapshot:
101 6f4d00ee 2013-09-23 0intro .BI /snapshot/ yyyy / mmdd / hhmm \fR,
102 6f4d00ee 2013-09-23 0intro where
103 6f4d00ee 2013-09-23 0intro .I yyyy
104 6f4d00ee 2013-09-23 0intro is the full year,
105 6f4d00ee 2013-09-23 0intro .I mm
106 6f4d00ee 2013-09-23 0intro is the month number,
107 6f4d00ee 2013-09-23 0intro .I dd
108 6f4d00ee 2013-09-23 0intro is the day number,
109 6f4d00ee 2013-09-23 0intro .I hh
110 6f4d00ee 2013-09-23 0intro is the hour,
111 6f4d00ee 2013-09-23 0intro and
112 6f4d00ee 2013-09-23 0intro .I mm
113 6f4d00ee 2013-09-23 0intro is the minute.
114 6f4d00ee 2013-09-23 0intro The snapshots in
115 6f4d00ee 2013-09-23 0intro .B /snapshot
116 6f4d00ee 2013-09-23 0intro are ephemeral: eventually they are deleted
117 6f4d00ee 2013-09-23 0intro to reclaim the disk space they occupy.
118 6f4d00ee 2013-09-23 0intro Long-lasting snapshots stored on a Venti server
119 6f4d00ee 2013-09-23 0intro are kept in
120 6f4d00ee 2013-09-23 0intro .B /archive
121 6f4d00ee 2013-09-23 0intro and also named from the date (though not the time) of the snapshot:
122 6f4d00ee 2013-09-23 0intro .BI /archive/ yyyy / mmdds \fR,
123 6f4d00ee 2013-09-23 0intro where
124 6f4d00ee 2013-09-23 0intro .IR yyyy ,
125 6f4d00ee 2013-09-23 0intro .IR mm ,
126 6f4d00ee 2013-09-23 0intro and
127 6f4d00ee 2013-09-23 0intro .I dd
128 6f4d00ee 2013-09-23 0intro are year, month, and day as before,
129 6f4d00ee 2013-09-23 0intro and
130 6f4d00ee 2013-09-23 0intro .I s
131 6f4d00ee 2013-09-23 0intro is a sequence number if more than one
132 6f4d00ee 2013-09-23 0intro archival snapshot is done in a day.
133 6f4d00ee 2013-09-23 0intro For the first snapshot,
134 6f4d00ee 2013-09-23 0intro .I s
135 6f4d00ee 2013-09-23 0intro is null.
136 6f4d00ee 2013-09-23 0intro For the subsequent snapshots,
137 6f4d00ee 2013-09-23 0intro .I s
138 6f4d00ee 2013-09-23 0intro is
139 6f4d00ee 2013-09-23 0intro .BR .1 ,
140 6f4d00ee 2013-09-23 0intro .BR .2 ,
141 6f4d00ee 2013-09-23 0intro .BR .3 ,
142 6f4d00ee 2013-09-23 0intro etc.
143 6f4d00ee 2013-09-23 0intro The root of the main file system that is frozen
144 6f4d00ee 2013-09-23 0intro for the first archival snapshot of December 15, 2002
145 6f4d00ee 2013-09-23 0intro will be named
146 6f4d00ee 2013-09-23 0intro .BR /archive/2002/1215/ .
147 6f4d00ee 2013-09-23 0intro .PP
148 6f4d00ee 2013-09-23 0intro The attach name used in
149 6f4d00ee 2013-09-23 0intro .I mount
150 6f4d00ee 2013-09-23 0intro (see
151 d32deab1 2020-08-16 rsc .MR bind (1) ,
152 d32deab1 2020-08-16 rsc .MR bind (2)
153 6f4d00ee 2013-09-23 0intro and
154 d32deab1 2020-08-16 rsc .MR attach (5) )
155 6f4d00ee 2013-09-23 0intro selects a file system to be served
156 6f4d00ee 2013-09-23 0intro and optionally a subtree,
157 6f4d00ee 2013-09-23 0intro in the format
158 6f4d00ee 2013-09-23 0intro .IB fs \fR[\fB/ dir \fR].
159 6f4d00ee 2013-09-23 0intro An empty attach name selects
160 6f4d00ee 2013-09-23 0intro .BR main/active .
161 6f4d00ee 2013-09-23 0intro .PP
162 6f4d00ee 2013-09-23 0intro .I Fossil
163 6f4d00ee 2013-09-23 0intro normally requires all users except
164 6f4d00ee 2013-09-23 0intro .L none
165 6f4d00ee 2013-09-23 0intro to provide authentication tickets on each
166 d32deab1 2020-08-16 rsc .MR attach (5) .
167 6f4d00ee 2013-09-23 0intro To keep just anyone from connecting,
168 6f4d00ee 2013-09-23 0intro .L none
169 6f4d00ee 2013-09-23 0intro is only allowed to attach after another user
170 6f4d00ee 2013-09-23 0intro has successfully attached on the same
171 6f4d00ee 2013-09-23 0intro connection.
172 6f4d00ee 2013-09-23 0intro The other user effectively acts as a chaperone
173 6f4d00ee 2013-09-23 0intro for
174 6f4d00ee 2013-09-23 0intro .LR none .
175 6f4d00ee 2013-09-23 0intro Authentication can be disabled using the
176 6f4d00ee 2013-09-23 0intro .B -A
177 6f4d00ee 2013-09-23 0intro flag to
178 6f4d00ee 2013-09-23 0intro .B open
179 6f4d00ee 2013-09-23 0intro or
180 6f4d00ee 2013-09-23 0intro .B srv
181 6f4d00ee 2013-09-23 0intro (see
182 d32deab1 2020-08-16 rsc .MR fossilcons (8) ).
183 6f4d00ee 2013-09-23 0intro .PP
184 6f4d00ee 2013-09-23 0intro The groups called
185 6f4d00ee 2013-09-23 0intro .B noworld
186 6f4d00ee 2013-09-23 0intro and
187 6f4d00ee 2013-09-23 0intro .B write
188 6f4d00ee 2013-09-23 0intro are special on the file server.
189 6f4d00ee 2013-09-23 0intro Any user belonging to
190 6f4d00ee 2013-09-23 0intro .B noworld
191 6f4d00ee 2013-09-23 0intro has attenuated access privileges.
192 6f4d00ee 2013-09-23 0intro Specifically, when checking such a user's access to files,
193 6f4d00ee 2013-09-23 0intro the file's permission bits are first ANDed
194 6f4d00ee 2013-09-23 0intro with 0770 for normal files and 0771 for directories.
195 6f4d00ee 2013-09-23 0intro The effect is to deny world access permissions to
196 6f4d00ee 2013-09-23 0intro .B noworld
197 6f4d00ee 2013-09-23 0intro users, except when walking into directories.
198 6f4d00ee 2013-09-23 0intro If the
199 6f4d00ee 2013-09-23 0intro .B write
200 6f4d00ee 2013-09-23 0intro group exists, then the file system appears read-only
201 6f4d00ee 2013-09-23 0intro to users not in the group.
202 6f4d00ee 2013-09-23 0intro This is used to make the Plan 9 distribution file server
203 6f4d00ee 2013-09-23 0intro .RI ( sources.cs.bell-labs.com )
204 6f4d00ee 2013-09-23 0intro readable by the world but writable only to the developers.
205 6f4d00ee 2013-09-23 0intro .PP
206 6f4d00ee 2013-09-23 0intro .I Fossil
207 6f4d00ee 2013-09-23 0intro starts a new instance of the fossil file server.
208 6f4d00ee 2013-09-23 0intro It is configured mainly through console commands,
209 6f4d00ee 2013-09-23 0intro documented in
210 d32deab1 2020-08-16 rsc .MR fossilcons (8) .
211 6f4d00ee 2013-09-23 0intro .PP
212 6f4d00ee 2013-09-23 0intro The options are:
213 6f4d00ee 2013-09-23 0intro .TF "-c\fI cmd
214 6f4d00ee 2013-09-23 0intro .PD
215 6f4d00ee 2013-09-23 0intro .TP
216 6f4d00ee 2013-09-23 0intro .B -D
217 6f4d00ee 2013-09-23 0intro Toggle the debugging flag, which is initially off.
218 6f4d00ee 2013-09-23 0intro When the flag is set, information about authentication
219 6f4d00ee 2013-09-23 0intro and all protocol messages are written to standard error.
220 6f4d00ee 2013-09-23 0intro .TP
221 6f4d00ee 2013-09-23 0intro .B -t
222 6f4d00ee 2013-09-23 0intro Start a file server console on
223 6f4d00ee 2013-09-23 0intro .BR /dev/cons .
224 6f4d00ee 2013-09-23 0intro If this option is given,
225 6f4d00ee 2013-09-23 0intro .I fossil
226 6f4d00ee 2013-09-23 0intro does not fork itself into the background.
227 6f4d00ee 2013-09-23 0intro .TP
228 6f4d00ee 2013-09-23 0intro .BI -c " cmd
229 6f4d00ee 2013-09-23 0intro Execute the console command
230 6f4d00ee 2013-09-23 0intro .IR cmd .
231 6f4d00ee 2013-09-23 0intro This option may be repeated to give multiple
232 6f4d00ee 2013-09-23 0intro commands.
233 6f4d00ee 2013-09-23 0intro Typically the only commands given on the
234 6f4d00ee 2013-09-23 0intro command line are
235 6f4d00ee 2013-09-23 0intro .RB `` ".\fI file" ,''
236 6f4d00ee 2013-09-23 0intro which executes a file containing commands,
237 6f4d00ee 2013-09-23 0intro and
238 6f4d00ee 2013-09-23 0intro .RB `` "srv -p" \fIcons \fR,''
239 6f4d00ee 2013-09-23 0intro which starts a file server console on
240 6f4d00ee 2013-09-23 0intro .BI /srv/ cons \fR.
241 6f4d00ee 2013-09-23 0intro See
242 d32deab1 2020-08-16 rsc .MR fossilcons (8)
243 6f4d00ee 2013-09-23 0intro for more information.
244 6f4d00ee 2013-09-23 0intro .TP
245 6f4d00ee 2013-09-23 0intro .BI -f " file
246 6f4d00ee 2013-09-23 0intro Read and execute console commands stored in the Fossil disk
247 6f4d00ee 2013-09-23 0intro .IR file .
248 6f4d00ee 2013-09-23 0intro .I Conf
249 6f4d00ee 2013-09-23 0intro .RI ( q.v. )
250 6f4d00ee 2013-09-23 0intro reads and writes the command set stored in the disk.
251 6f4d00ee 2013-09-23 0intro .TP
252 6f4d00ee 2013-09-23 0intro .B -m
253 6f4d00ee 2013-09-23 0intro Allocate
254 6f4d00ee 2013-09-23 0intro .I free-memory-percent
255 6f4d00ee 2013-09-23 0intro percent of the available free RAM for buffers.
256 6f4d00ee 2013-09-23 0intro This overrides all other memory sizing parameters,
257 6f4d00ee 2013-09-23 0intro notably the
258 6f4d00ee 2013-09-23 0intro .B -c
259 6f4d00ee 2013-09-23 0intro option to
260 6f4d00ee 2013-09-23 0intro .BR open .
261 6f4d00ee 2013-09-23 0intro 30% is a reasonable choice.
262 6f4d00ee 2013-09-23 0intro .PD
263 6f4d00ee 2013-09-23 0intro .PP
264 6f4d00ee 2013-09-23 0intro .I Flchk
265 6f4d00ee 2013-09-23 0intro checks the fossil file system stored in
266 6f4d00ee 2013-09-23 0intro .I file
267 6f4d00ee 2013-09-23 0intro for inconsistencies.
268 6f4d00ee 2013-09-23 0intro .I Flchk
269 6f4d00ee 2013-09-23 0intro is deprecated in favor of the console
270 6f4d00ee 2013-09-23 0intro .B check
271 6f4d00ee 2013-09-23 0intro command (see
272 d32deab1 2020-08-16 rsc .MR fossilcons (8) ).
273 6f4d00ee 2013-09-23 0intro .I Flchk
274 6f4d00ee 2013-09-23 0intro prints
275 6f4d00ee 2013-09-23 0intro .I fossil
276 6f4d00ee 2013-09-23 0intro console commands that may be
277 6f4d00ee 2013-09-23 0intro executed to take care of
278 6f4d00ee 2013-09-23 0intro bad pointers
279 6f4d00ee 2013-09-23 0intro .RB ( clrp ),
280 6f4d00ee 2013-09-23 0intro bad entries
281 6f4d00ee 2013-09-23 0intro .RB ( clre ),
282 6f4d00ee 2013-09-23 0intro bad directory entries
283 6f4d00ee 2013-09-23 0intro .RB ( clri ),
284 6f4d00ee 2013-09-23 0intro unreachable blocks
285 6f4d00ee 2013-09-23 0intro .RB ( bfree ).
286 6f4d00ee 2013-09-23 0intro Console commands are interspersed with
287 6f4d00ee 2013-09-23 0intro more detailed commentary on the file system.
288 6f4d00ee 2013-09-23 0intro The commands are distinguished by being prefixed with
289 6f4d00ee 2013-09-23 0intro sharp signs.
290 6f4d00ee 2013-09-23 0intro Note that all proposed fixes are rather drastic: offending
291 6f4d00ee 2013-09-23 0intro pieces of file system are simply chopped off.
292 6f4d00ee 2013-09-23 0intro .PP
293 6f4d00ee 2013-09-23 0intro .I Flchk
294 6f4d00ee 2013-09-23 0intro does
295 6f4d00ee 2013-09-23 0intro .I not
296 6f4d00ee 2013-09-23 0intro modify the file system, so it is safe to
297 6f4d00ee 2013-09-23 0intro run concurrently with
298 6f4d00ee 2013-09-23 0intro .IR fossil ,
299 6f4d00ee 2013-09-23 0intro though in this case
300 6f4d00ee 2013-09-23 0intro the list of unreachable
301 6f4d00ee 2013-09-23 0intro blocks and any inconsistencies involving the active file system
302 6f4d00ee 2013-09-23 0intro should be taken with a grain of salt.
303 6f4d00ee 2013-09-23 0intro .PP
304 6f4d00ee 2013-09-23 0intro The options are:
305 6f4d00ee 2013-09-23 0intro .TF "-h\fI host
306 6f4d00ee 2013-09-23 0intro .PD
307 6f4d00ee 2013-09-23 0intro .TP
308 6f4d00ee 2013-09-23 0intro .B -f
309 6f4d00ee 2013-09-23 0intro Fast mode.
310 6f4d00ee 2013-09-23 0intro By default,
311 6f4d00ee 2013-09-23 0intro .I flchk
312 6f4d00ee 2013-09-23 0intro checks the entire file system image for consistency,
313 6f4d00ee 2013-09-23 0intro which includes all the archives to Venti
314 6f4d00ee 2013-09-23 0intro and can take a very long time.
315 6f4d00ee 2013-09-23 0intro In fast mode,
316 6f4d00ee 2013-09-23 0intro .I flchk
317 6f4d00ee 2013-09-23 0intro avoids walking in Venti blocks
318 6f4d00ee 2013-09-23 0intro whenever possible.
319 6f4d00ee 2013-09-23 0intro .TP
320 6f4d00ee 2013-09-23 0intro .BI -c " ncache
321 6f4d00ee 2013-09-23 0intro Keep a cache of
322 6f4d00ee 2013-09-23 0intro .I ncache
323 6f4d00ee 2013-09-23 0intro (by default, 1000)
324 6f4d00ee 2013-09-23 0intro file system blocks in memory during the check.
325 6f4d00ee 2013-09-23 0intro .TP
326 6f4d00ee 2013-09-23 0intro .BI -h " host
327 6f4d00ee 2013-09-23 0intro Use
328 6f4d00ee 2013-09-23 0intro .I host
329 6f4d00ee 2013-09-23 0intro as the Venti server.
330 6f4d00ee 2013-09-23 0intro .PD
331 6f4d00ee 2013-09-23 0intro .PP
332 6f4d00ee 2013-09-23 0intro .I Flfmt
333 6f4d00ee 2013-09-23 0intro prepares
334 6f4d00ee 2013-09-23 0intro .I file
335 6f4d00ee 2013-09-23 0intro as a new fossil file system.
336 6f4d00ee 2013-09-23 0intro The file system is initialized with three empty directories
337 6f4d00ee 2013-09-23 0intro .BR active ,
338 6f4d00ee 2013-09-23 0intro .BR archive ,
339 6f4d00ee 2013-09-23 0intro and
340 6f4d00ee 2013-09-23 0intro .BR snapshot ,
341 6f4d00ee 2013-09-23 0intro as described above.
342 6f4d00ee 2013-09-23 0intro The options are:
343 6f4d00ee 2013-09-23 0intro .TF "-b\fI blocksize
344 6f4d00ee 2013-09-23 0intro .PD
345 6f4d00ee 2013-09-23 0intro .TP
346 6f4d00ee 2013-09-23 0intro .B -y
347 6f4d00ee 2013-09-23 0intro Yes mode.
348 6f4d00ee 2013-09-23 0intro By default,
349 6f4d00ee 2013-09-23 0intro .I flfmt
350 6f4d00ee 2013-09-23 0intro will prompt for confirmation before formatting
351 6f4d00ee 2013-09-23 0intro a file that already contains a fossil file system,
352 6f4d00ee 2013-09-23 0intro and before formatting a file that is not served
353 6f4d00ee 2013-09-23 0intro directly by a kernel device.
354 6f4d00ee 2013-09-23 0intro If the
355 6f4d00ee 2013-09-23 0intro .B -y
356 6f4d00ee 2013-09-23 0intro flag is given, no such checks are made.
357 6f4d00ee 2013-09-23 0intro .TP
358 6f4d00ee 2013-09-23 0intro .BI -b " blocksize
359 6f4d00ee 2013-09-23 0intro Set the file system block size (by default, 8192).
360 6f4d00ee 2013-09-23 0intro .TP
361 6f4d00ee 2013-09-23 0intro .BI -h " host
362 6f4d00ee 2013-09-23 0intro Use
363 6f4d00ee 2013-09-23 0intro .I host
364 6f4d00ee 2013-09-23 0intro as the Venti server.
365 6f4d00ee 2013-09-23 0intro .TP
366 6f4d00ee 2013-09-23 0intro .BI -l " label
367 6f4d00ee 2013-09-23 0intro Set the textual label on the file system to
368 6f4d00ee 2013-09-23 0intro .IR label .
369 6f4d00ee 2013-09-23 0intro The label is only a comment.
370 6f4d00ee 2013-09-23 0intro .TP
371 6f4d00ee 2013-09-23 0intro .BI -v " score
372 6f4d00ee 2013-09-23 0intro Initialize the file system using the vac file
373 6f4d00ee 2013-09-23 0intro system stored on Venti at
374 6f4d00ee 2013-09-23 0intro .IR score .
375 6f4d00ee 2013-09-23 0intro The score should have been generated by
376 6f4d00ee 2013-09-23 0intro .I fossil
377 6f4d00ee 2013-09-23 0intro rather than by
378 d32deab1 2020-08-16 rsc .MR vac (1) ,
379 6f4d00ee 2013-09-23 0intro so that the appropriate snapshot metadata is present.
380 6f4d00ee 2013-09-23 0intro .PD
381 6f4d00ee 2013-09-23 0intro .PP
382 6f4d00ee 2013-09-23 0intro .I Conf
383 6f4d00ee 2013-09-23 0intro reads or writes the configuration branded on the Fossil disk
384 6f4d00ee 2013-09-23 0intro .IR file .
385 6f4d00ee 2013-09-23 0intro By default, it reads the configuration from the disk and prints it to
386 6f4d00ee 2013-09-23 0intro standard output.
387 6f4d00ee 2013-09-23 0intro If the
388 6f4d00ee 2013-09-23 0intro .B -w
389 6f4d00ee 2013-09-23 0intro flag is given,
390 6f4d00ee 2013-09-23 0intro .I conf
391 6f4d00ee 2013-09-23 0intro reads a new configuration from
392 6f4d00ee 2013-09-23 0intro .I config
393 6f4d00ee 2013-09-23 0intro (or else from standard input)
394 6f4d00ee 2013-09-23 0intro and writes it to the disk.
395 6f4d00ee 2013-09-23 0intro Inside the configuration file, the argument
396 6f4d00ee 2013-09-23 0intro .L *
397 6f4d00ee 2013-09-23 0intro may be used to stand in for the name of the disk holding the configuration.
398 6f4d00ee 2013-09-23 0intro The Plan 9 kernel boot process runs
399 6f4d00ee 2013-09-23 0intro .RB `` fossil
400 6f4d00ee 2013-09-23 0intro .B -f
401 6f4d00ee 2013-09-23 0intro .IR disk ''
402 6f4d00ee 2013-09-23 0intro to start a Fossil file server.
403 6f4d00ee 2013-09-23 0intro The disk is just a convenient place to store configuration
404 6f4d00ee 2013-09-23 0intro information.
405 6f4d00ee 2013-09-23 0intro .PP
406 6f4d00ee 2013-09-23 0intro .I Last
407 6f4d00ee 2013-09-23 0intro prints the vac score that resulted after the most recent archival snapshot
408 6f4d00ee 2013-09-23 0intro of the fossil in
409 6f4d00ee 2013-09-23 0intro .I file.
410 6f4d00ee 2013-09-23 0intro .SH EXAMPLES
411 6f4d00ee 2013-09-23 0intro .PP
412 6f4d00ee 2013-09-23 0intro Place the root of the archive file system on
413 6f4d00ee 2013-09-23 0intro .B /n/dump
414 6f4d00ee 2013-09-23 0intro and show the modified times of the MIPS C compiler
415 6f4d00ee 2013-09-23 0intro over all dumps in December 2002:
416 6f4d00ee 2013-09-23 0intro .IP
417 6f4d00ee 2013-09-23 0intro .EX
418 6f4d00ee 2013-09-23 0intro 9fs dump
419 6f4d00ee 2013-09-23 0intro ls -l /n/dump/2002/12*/mips/bin/vc
420 6f4d00ee 2013-09-23 0intro .EE
421 6f4d00ee 2013-09-23 0intro .PP
422 6f4d00ee 2013-09-23 0intro To get only one line of output for each version of the compiler:
423 6f4d00ee 2013-09-23 0intro .IP
424 6f4d00ee 2013-09-23 0intro .EX
425 6f4d00ee 2013-09-23 0intro ls -lp /n/dump/2002/12*/mips/bin/vc | uniq
426 6f4d00ee 2013-09-23 0intro .EE
427 6f4d00ee 2013-09-23 0intro .ne 14
428 6f4d00ee 2013-09-23 0intro .PP
429 6f4d00ee 2013-09-23 0intro Initialize a new file system, start the server with permission
430 6f4d00ee 2013-09-23 0intro checking turned off, create a users file, and mount the server:
431 6f4d00ee 2013-09-23 0intro .IP
432 6f4d00ee 2013-09-23 0intro .EX
433 6f4d00ee 2013-09-23 0intro fossil/flfmt /dev/sdC0/fossil
434 6f4d00ee 2013-09-23 0intro fossil/conf -w /dev/sdC0/fossil <<EOF
435 6f4d00ee 2013-09-23 0intro fsys main config
436 6f4d00ee 2013-09-23 0intro fsys main open -AWP
437 6f4d00ee 2013-09-23 0intro fsys main
438 6f4d00ee 2013-09-23 0intro create /active/adm adm sys d775
439 6f4d00ee 2013-09-23 0intro create /active/adm/users adm sys 664
440 6f4d00ee 2013-09-23 0intro users -w
441 6f4d00ee 2013-09-23 0intro srv -p fscons
442 6f4d00ee 2013-09-23 0intro srv fossil
443 6f4d00ee 2013-09-23 0intro EOF
444 6f4d00ee 2013-09-23 0intro fossil/fossil -f /dev/sdC0/fossil
445 6f4d00ee 2013-09-23 0intro mount /srv/fossil /n/fossil
446 6f4d00ee 2013-09-23 0intro .EE
447 6f4d00ee 2013-09-23 0intro .LP
448 6f4d00ee 2013-09-23 0intro See the discussion of the
449 6f4d00ee 2013-09-23 0intro .B users
450 6f4d00ee 2013-09-23 0intro and
451 6f4d00ee 2013-09-23 0intro .B uname
452 6f4d00ee 2013-09-23 0intro commands in
453 d32deab1 2020-08-16 rsc .MR fossilcons (8)
454 6f4d00ee 2013-09-23 0intro for more about the user table.
455 6f4d00ee 2013-09-23 0intro .ne 3
456 6f4d00ee 2013-09-23 0intro .PP
457 6f4d00ee 2013-09-23 0intro Perhaps because the disk has been corrupted or replaced,
458 6f4d00ee 2013-09-23 0intro format a new file system using the last archive score printed
459 6f4d00ee 2013-09-23 0intro on the console:
460 6f4d00ee 2013-09-23 0intro .IP
461 6f4d00ee 2013-09-23 0intro .EX
462 6f4d00ee 2013-09-23 0intro fossil/flfmt -v b9b3...5559 /dev/sdC0/fossil
463 6f4d00ee 2013-09-23 0intro .EE
464 6f4d00ee 2013-09-23 0intro .LP
465 6f4d00ee 2013-09-23 0intro Note that while
466 6f4d00ee 2013-09-23 0intro .B /snapshot
467 6f4d00ee 2013-09-23 0intro will be lost,
468 6f4d00ee 2013-09-23 0intro .B /active
469 6f4d00ee 2013-09-23 0intro and
470 6f4d00ee 2013-09-23 0intro .B /archive
471 6f4d00ee 2013-09-23 0intro will be restored to their contents at the time of the
472 6f4d00ee 2013-09-23 0intro last archival snapshot.
473 6f4d00ee 2013-09-23 0intro .ne 3
474 6f4d00ee 2013-09-23 0intro .PP
475 6f4d00ee 2013-09-23 0intro Blindly accept the changes prescribed by
476 6f4d00ee 2013-09-23 0intro .I flchk
477 6f4d00ee 2013-09-23 0intro (not recommended):
478 6f4d00ee 2013-09-23 0intro .IP
479 6f4d00ee 2013-09-23 0intro .EX
480 6f4d00ee 2013-09-23 0intro fossil/flchk /dev/sdC0/fossil | sed -n 's/^# //p' >>/srv/fscons
481 6f4d00ee 2013-09-23 0intro .EE
482 6f4d00ee 2013-09-23 0intro .LP
483 6f4d00ee 2013-09-23 0intro A better strategy is to vet the output,
484 6f4d00ee 2013-09-23 0intro filter out any suggestions you're not comfortable with,
485 6f4d00ee 2013-09-23 0intro and then use the
486 6f4d00ee 2013-09-23 0intro .I sed
487 6f4d00ee 2013-09-23 0intro command to prepare the script.
488 6f4d00ee 2013-09-23 0intro .SH SOURCE
489 b546bd6e 2017-07-16 rsc .B \*9/src/cmd/fossil
490 6f4d00ee 2013-09-23 0intro .SH SEE ALSO
491 d32deab1 2020-08-16 rsc .MR yesterday (1) ,
492 d32deab1 2020-08-16 rsc .MR fs (3) ,
493 d32deab1 2020-08-16 rsc .MR fs (4) ,
494 d32deab1 2020-08-16 rsc .MR srv (4) ,
495 d32deab1 2020-08-16 rsc .MR fossilcons (8) ,
496 d32deab1 2020-08-16 rsc .MR loadfossil (8) ,
497 d32deab1 2020-08-16 rsc .MR venti (8)
498 6f4d00ee 2013-09-23 0intro .SH BUGS
499 6f4d00ee 2013-09-23 0intro It is possible that the disk format (but not the Venti format)
500 6f4d00ee 2013-09-23 0intro will change in the future, to make the disk a full cache
501 6f4d00ee 2013-09-23 0intro rather than just a write buffer.
502 6f4d00ee 2013-09-23 0intro Changing to the new format will require reformatting
503 6f4d00ee 2013-09-23 0intro the disk as in the example above,
504 6f4d00ee 2013-09-23 0intro but note that this will preserve most of the file system
505 6f4d00ee 2013-09-23 0intro (all but
506 6f4d00ee 2013-09-23 0intro .BR /snapshot )
507 6f4d00ee 2013-09-23 0intro with little effort.
508 6f4d00ee 2013-09-23 0intro .PP
509 6f4d00ee 2013-09-23 0intro The
510 6f4d00ee 2013-09-23 0intro .B -m
511 6f4d00ee 2013-09-23 0intro option currently assumes a block size of 8K bytes,
512 6f4d00ee 2013-09-23 0intro and a single file system per
513 6f4d00ee 2013-09-23 0intro .I fossil
514 6f4d00ee 2013-09-23 0intro instance.