bind -b #k /dev /dev/fs /dev/fs/ctl /dev/fs/...
The device is intended to be bound at /dev and contains a directory named fs , which in turn contains a ctl file and one file per configured device.
Most control messages each introduce a new device, here named new . The file arguments are interpreted in the name space of the writer.
cat " new files" ... The device new corresponds to the catenation of files .
inter " new files" ... The device new corresponds to the block interleaving of files ; an 8192-byte block size is assumed.
mirror " new files" ... The device new corresponds to a RAID-1-like mirroring of files . Writes to new are handled by sequentially writing the same data to the files from right to left (the reverse of the order in the control message). A failed write causes an eventual error return but does not prevent the rest of the writes to the other devices of the mirror set. Reads from new are handled by sequentially reading from the files from left to right until one succeeds. The length of the mirror device is the minimum of the lengths of the files .
part " new file offset length" The device new corresponds to the length bytes starting at offset in file . If offset + length reaches past the end of file , length is silently reduced to fit.
clear Discard all fs device definitions.
If the variable fsconfig is set in plan9.ini (8) then fs will read its configuration from the file $fsconfig on the first attach. This is useful when the machine boots from a local file server that uses fs .
Interleave the two mirrored disks to create /dev/fs/data :
.EX echo inter data /dev/fs/m0 /dev/fs/m1 >/dev/fs/ctlRun kfs (4) on the interleaved device:
.EX disk/kfs -f /dev/fs/dataSave the configuration:
.EX cp /dev/fs/ctl /dev/fd0diskTo load the configuration automatically at boot time, add this to plan9.ini :
.EX fsconfig=/dev/fd0diskEach write system call on ctl may transmit at most one command.