This instructions suppose that you just have set up a plain Plan9 computer with fossil+venti support. You do not want to run a fileserver without venti.

Remember that setup is done with a terminal kernel, a fileserver however will run with a cpu kernel and startup autonomously with a predefined user as the hostowner.

An appropiate /rc/bin/cpurc file has to be crafted and installed. Also, of course, networking has to be set up correctly, since the purpose of the fileserver is to provide access to its harddisk from the network. Our workflow will be more or less:

  1. boot with a terminal kernel as user glenda (first hostowner ever)
  2. install (and test) /lib/ndb/local
  3. install /rc/bin/cpurc
  4. configure the default hostowner
  5. make the fossil fileserver listen to the network
  6. reboot into a cpu kernel
  7. start using your fileserver

network configuration

  • cat >/lib/ndb/local <<EOF

    /lib/ndb/local

LEG17112006

#

main network database configuration file

files comprising the database

database= file=/lib/ndb/local file=/lib/ndb/common

ipnet=magma.intern ip=10.0.0.0 ipmask=255.255.255.0 dnsdomain=magma.intern dns=10.0.0.1 ntp=router smtp=router authdom=magma.intern auth=porticus cpu=schiefer fs=schiefer

what's my name:

ip=10.0.0.7 sys=schiefer

localhost

ip=127.0.0.1 sys=localhost dom=localhost

auth=sources.cs.bell-labs.com authdom=outside.plan9.bell-labs.com EOF

cpurc

  • cat > /rc/bin/cpurc <<EOF

    !/bin/rc

/rc/bin/cpurc

LEG17112006

#

cpurc for fileserver

echo -n cpu > /env/service date > /env/boottime

replace FILESERVER with the name of your file server

here we start with kfs, your local disk file system

fileserver=kfs

default authdom

authdom=magma.intern

the local domain to be used in the faces database

facedom=magma.intern

mount points

mntgen -s slashn && chmod 666 /srv/slashn

configure ip address

ip/ipconfig

name translation, cs sets /dev/sysname

ndb/cs sysname=`{cat /dev/sysname} ndb/dns -r

extract info about our network from ndb

ndb/query ipnet $$authdom |rc

parallelism for mk

NPROC = `{wc -l </dev/sysstat}

The fileserver will also be timeserver with stratum 9

aux/timesync -n -l -S 9

services available to networks

aux/listen -q -t /rc/bin/service.auth -d /rc/bin/service il aux/listen -q -t /rc/bin/service.auth -d /rc/bin/service tcp EOF

hostowner

* to set up the default hostowner and her password run
auth/wrkey
* answer the following questions: authid:
glenda
authdom:
magma.intern
secstore key:
password with at least eight (8) characters, this is not the password for glenda, but the encryption key for the 'nvram' partition.
password:
password for glenda, must be the same /!\ as in the keyserver and also have at least eight characters

fileserver

  • read the fileserver configuration file
  • add the commands to make fossil listen on the network
  • write the file back Notes:

  • change /dev/sd00/fossil if your fossil is on another disk or partition

    cd
    fossil/conf /dev/sd00/fossil >flproto.bak
    cp flproto.bak flproto
    cat >> flproto <<EOF
    listen tcp!!564
    listen il!!17008
    EOF
    fossil/conf -w /dev/sd00/fossil flproto

Reboot and enjoy

Stop the filesystem safely with fshalt, then reboot with '^T^Tr', or 'Ctrl+Alt+Del'

Make sure to start now with a cpu/fileserver kernel (9pccpuf).

You should be able to connect from a remote system to the fileserver e.g. with drawterm:

drawterm -a porticus -c schiefer -u glenda