3 fossil, flchk, flfmt \- archival file server
19 .I free-memory-percent
71 is the main file system for Plan 9.
72 Unlike the Plan 9 file servers of old,
74 is a collection of user-space programs that run on a standard Plan 9 kernel.
75 The name of the main fossil file server at Murray Hill is
77 The Plan 9 distribution file server,
79 is also a fossil server.
82 is structured as a magnetic disk write buffer
83 optionally backed by a Venti server for archival storage.
84 It serves the Plan 9 protocol via TCP.
87 file server conventionally presents
88 three trees in the root directory of each file system:
94 is the root of a conventional file system
95 whose blocks are stored in a disk file.
96 In a typical configuration, the file server periodically
97 marks the entire file system copy-on-write, effectively
98 taking a snapshot of the file system at that moment.
99 This snapshot is made available in a name
100 created from the date and time of the snapshot:
101 .BI /snapshot/ yyyy / mmdd / hhmm \fR,
116 are ephemeral: eventually they are deleted
117 to reclaim the disk space they occupy.
118 Long-lasting snapshots stored on a Venti server
121 and also named from the date (though not the time) of the snapshot:
122 .BI /archive/ yyyy / mmdds \fR,
128 are year, month, and day as before,
131 is a sequence number if more than one
132 archival snapshot is done in a day.
133 For the first snapshot,
136 For the subsequent snapshots,
143 The root of the main file system that is frozen
144 for the first archival snapshot of December 15, 2002
146 .BR /archive/2002/1215/ .
148 The attach name used in
155 selects a file system to be served
156 and optionally a subtree,
158 .IB fs \fR[\fB/ dir \fR].
159 An empty attach name selects
163 normally requires all users except
165 to provide authentication tickets on each
167 To keep just anyone from connecting,
169 is only allowed to attach after another user
170 has successfully attached on the same
172 The other user effectively acts as a chaperone
175 Authentication can be disabled using the
188 are special on the file server.
189 Any user belonging to
191 has attenuated access privileges.
192 Specifically, when checking such a user's access to files,
193 the file's permission bits are first ANDed
194 with 0770 for normal files and 0771 for directories.
195 The effect is to deny world access permissions to
197 users, except when walking into directories.
200 group exists, then the file system appears read-only
201 to users not in the group.
202 This is used to make the Plan 9 distribution file server
203 .RI ( sources.cs.bell-labs.com )
204 readable by the world but writable only to the developers.
207 starts a new instance of the fossil file server.
208 It is configured mainly through console commands,
217 Toggle the debugging flag, which is initially off.
218 When the flag is set, information about authentication
219 and all protocol messages are written to standard error.
222 Start a file server console on
224 If this option is given,
226 does not fork itself into the background.
229 Execute the console command
231 This option may be repeated to give multiple
233 Typically the only commands given on the
235 .RB `` ".\fI file" ,''
236 which executes a file containing commands,
238 .RB `` "srv -p" \fIcons \fR,''
239 which starts a file server console on
243 for more information.
246 Read and execute console commands stored in the Fossil disk
250 reads and writes the command set stored in the disk.
254 .I free-memory-percent
255 percent of the available free RAM for buffers.
256 This overrides all other memory sizing parameters,
261 30% is a reasonable choice.
265 checks the fossil file system stored in
269 is deprecated in favor of the console
276 console commands that may be
277 executed to take care of
282 bad directory entries
286 Console commands are interspersed with
287 more detailed commentary on the file system.
288 The commands are distinguished by being prefixed with
290 Note that all proposed fixes are rather drastic: offending
291 pieces of file system are simply chopped off.
296 modify the file system, so it is safe to
297 run concurrently with
300 the list of unreachable
301 blocks and any inconsistencies involving the active file system
302 should be taken with a grain of salt.
312 checks the entire file system image for consistency,
313 which includes all the archives to Venti
314 and can take a very long time.
317 avoids walking in Venti blocks
324 file system blocks in memory during the check.
335 as a new fossil file system.
336 The file system is initialized with three empty directories
350 will prompt for confirmation before formatting
351 a file that already contains a fossil file system,
352 and before formatting a file that is not served
353 directly by a kernel device.
356 flag is given, no such checks are made.
359 Set the file system block size (by default, 8192).
367 Set the textual label on the file system to
369 The label is only a comment.
372 Initialize the file system using the vac file
373 system stored on Venti at
375 The score should have been generated by
379 so that the appropriate snapshot metadata is present.
383 reads or writes the configuration branded on the Fossil disk
385 By default, it reads the configuration from the disk and prints it to
391 reads a new configuration from
393 (or else from standard input)
394 and writes it to the disk.
395 Inside the configuration file, the argument
397 may be used to stand in for the name of the disk holding the configuration.
398 The Plan 9 kernel boot process runs
402 to start a Fossil file server.
403 The disk is just a convenient place to store configuration
407 prints the vac score that resulted after the most recent archival snapshot
412 Place the root of the archive file system on
414 and show the modified times of the MIPS C compiler
415 over all dumps in December 2002:
419 ls -l /n/dump/2002/12*/mips/bin/vc
422 To get only one line of output for each version of the compiler:
425 ls -lp /n/dump/2002/12*/mips/bin/vc | uniq
429 Initialize a new file system, start the server with permission
430 checking turned off, create a users file, and mount the server:
433 fossil/flfmt /dev/sdC0/fossil
434 fossil/conf -w /dev/sdC0/fossil <<EOF
438 create /active/adm adm sys d775
439 create /active/adm/users adm sys 664
444 fossil/fossil -f /dev/sdC0/fossil
445 mount /srv/fossil /n/fossil
448 See the discussion of the
454 for more about the user table.
457 Perhaps because the disk has been corrupted or replaced,
458 format a new file system using the last archive score printed
462 fossil/flfmt -v b9b3...5559 /dev/sdC0/fossil
471 will be restored to their contents at the time of the
472 last archival snapshot.
475 Blindly accept the changes prescribed by
480 fossil/flchk /dev/sdC0/fossil | sed -n 's/^# //p' >>/srv/fscons
483 A better strategy is to vet the output,
484 filter out any suggestions you're not comfortable with,
487 command to prepare the script.
489 .B \*9/src/cmd/fossil
499 It is possible that the disk format (but not the Venti format)
500 will change in the future, to make the disk a full cache
501 rather than just a write buffer.
502 Changing to the new format will require reformatting
503 the disk as in the example above,
504 but note that this will preserve most of the file system
511 option currently assumes a block size of 8K bytes,
512 and a single file system per