Fileserver setup


We found that it was a good first step to boot from the "normal" install floppy and remove all the partitions on all drives using pickdisk and partdisk on each disk before starting the setup of the fileserver.

The next step in the file server setup is to build the the plan9.ini for the fileserver boot floppy:

        *nomp=1
        distname=plan9
        scsi0=type=ncr53c8xx
        ether0=type=ga620
        mouseport=ps2
        console=0
        baud=9600
        nvr=fd!0!plan9.nvr
        bootfile=fd0!dos!9pcfs

Note is the odd syntax in nvr=, this one caused us some trouble tell we got it correct...

next using the cpu server make a bootfloppy with the command

	pc/bootfloppy /dev/fd0disk /tmp/plan9.ini

See the Bell-labs Plan9 Wiki Installing a Plan 9 File Server Guide for more details.

The fileserver runs a special version of the kernel, with no user processes, for details see Ken Thompson's The plan 9 file Server

To enable the acenic gigabit ethernet, we need to add our port of the ga620 driver to the fileserver kernel.

To build the kernel use the cpu/auth server, cd to /sys/src/fs/plan9c and run:

	disk/kfscmd allow
	mk clean
	mk
	disk/kfscmd disallow
	disk/kfscmd sync

and then copy the kernel to the fileserver bootfloppy:

	a:
	cp /sys/src/fs/plan9pc/9pcfs /n/a:
	unmount /n/a:

Put the floppy in the fileserver machine and boot it up. After the machine boots with the fileserver kernel it will come up in config mode.

The next step is to enter the fsconfig(8) info at the config: prompt. Reading and re-reading the fsconfig(8) man page is critical to understand the format...

	service vampira
	ip 172.16.82.2
	ipgw 172.16.82.254
	ipauth 172.16.82.1
	ipmask 255.255.255.0
	config w0
	filsys main cp(w1)0.50(fp(w1)50.50fw2fw3)
	filsys dump o
	filsys other w0
	ream main
	ream other
	end

Notes:

1) It can take some time for this to complete, when it is complete you will get a prompt like "vampira:" If the machine does not reponsed with some messages after you type "end" you most likely have problems w/ your scsi hardware or floppy drive.

2) During the setup we did not use the second cpu on the machine. But after we got things up and running we removed the *nomp=1 line from the plan9.ini on the boot floopy, to enable the 2nd cpu.

3)The use of the serial console is invaluable in debugging the fileserver install. We have a serial cable connecting eia0 on the fileserver and cpuserver so we can connect to the fileserver console using

      con -b 9600 /dev/eia0

Other gotcha's: If you get the error "init .... dos dosfs ..." don't start adding debug statments to the fileserver kernel...you most likely just have a bad floppy...

Once you get a prompt like "vampira:" disable access control using

	users default

Next add the password of the cpu owner using the command

	passwd

It will ask for the passwd of the cpu owner (bootes) twice and then for the authentication id (bootes) and the authentication domain (plan9.lanl.net)

Assuming the cpu owner is bootes, you can now connect to the fileserver from the cpu server and install the distribution. (If you did not use bootes for the cpu owner see the Bell-labs Plan9 Wiki Installing a Plan 9 File Server Guide for info on how to add the cpu owner user to the fileserver.

To connect to the fileserver from the cpu server and install the distribution we used the commands:

	srv il!172.16.82.2
	disk/kfscmd allow
	mkdir /n/vampira
	mount -c /srv/il!172.16.82.2 /n/vampira
	cd /dist
	wrap/inst -ovr /n/vampira plan9.9gz
	disk/kfscmd disallow
	disk/kfscmd sync

Note you will need to have a copy of the distribution in /dist, If you don't you can get one easily using ftpfs Ours was the 0327 version

Next install the distribution updates:

	wrap/inst -ovr /n/vampira 03270425a.9gz 
	wrap/inst -ovr /n/vampira 03270507.9gx
	wrap/inst -ovr /n/vampira 93270526.9gz

finally create the users on the fileserver (bootes and glenda already exist) using commands like

	newuser dpx
	create /mail/box/dpx dpx upas 775 d
	create /mail/box/dpx/mbox dpx upas 662 al

at this point you can customize the fileserver by editing the files in /n/vampira

One thing you will want to do is to setup a basic set of files for each user. A good start is to copy the files from /usr/glenda to the home directory of each user you added with the newuser command. The same thing can be done by the user by running the /sys/lib/newuser command the first time they login.

The final step is to reboot the fileserver using the command

	halt

if you are in luck you fileserver will be all setup after the reboot, with permission checking enabled.

If you wish to turn permission checking off on the fileserver so you can modify system files, reboot the machine and hit a key when you get the message about entering config mode, type allow followed by "end". Permission checking is now off and you can customize the fileserver. Just mount the fileserver filesystem using commands like:

     srv il!vampira
     mount -c /srv/il!vampira /n/vampira
and edit the files. Note don't leave permission checking off for longer than you need to.


Some useful info for the setup of a fileserver:

Bell-labs Plan9 Wiki Installing a Plan 9 File Server Guide.

Second Edition Plan9 Install Guide. Out of date in general but very useful for info on the fileserver setup.

fsconfig(8) man page. Very useful for figuring out what stuff like cp(w1)0.50(fp(w1)50.50fw2)
really means...

fileserver section of the "various ports" doc.


Last Modified: May 27 2002
dpx@acl.lanl.gov