File Server
Install OpenAFS:
apt-get install openafs-client openafs-doc openafs-fileserver openafs-krb5
Disable the AFS client. Edit /etc/openafs/afs.conf.client, and change AFS_CLIENT=true to AFS_CLIENT=false. Also set AFS_DYNROOT=No.
Set up /etc/openafs/server/KeyFile:
kinit -S kadmin/admin <USER>/admin kadmin ext -k /tmp/afs.keytab afs/club.cc.cmu.edu # Examine the keytab, and note the kvno ktutil -k /tmp/afs.keytab list asetkey add <kvno> /tmp/afs.keytab afs/club.cc.cmu.edu rm /tmp/afs.keytab # Check that AFS has the key bos listkeys -server $FILESERVER -localauth
Copy /etc/openafs/server/UserList from another fileserver.
Start the servers:
bos create -server $FILESERVER -instance fs -type fs -cmd /usr/lib/openafs/fileserver -cmd /usr/lib/openafs/volserver -cmd /usr/lib/openafs/salvager -cell club.cc.cmu.edu -localauth
Making Backups Work
Do this if volumes on the new fileserver should be backed up.
- Need to add teledu user, see /afs/club/service/etc/passwd.service
- Create teledu's home directory
- Arrange for teledu to be able to dump volumes
- Add the server and partitions to the AFS backup script
- The script currently lives on backups:/var/teledu/backup-afs.pl
Add 'server-name' => ['partition1', 'partition2', ...], to @partitions
- Add directories for the server and partitions
Currently under /backups/teledu/server-name/partitionN
DB Server
There are a few minor differences:
- also install the openafs-dbserver package
- create bos instances for db server processes instead of the fileserver processes:
bos create -server $DBSERVER -instance ptserver -type simple -cmd /usr/lib/openafs/ptserver -cell club.cc.cmu.edu -localauth bos create -server $DBSERVER -instance vlserver -type simple -cmd /usr/lib/openafs/vlserver -cell club.cc.cmu.edu -localauth
After starting the ptserver and vlserver on the new/upgraded DB Server, restart the processes on all the other DB Servers so Ubik holds elections and syncs the databases to the new/upgraded DB Server.