We've been happily running with all of /usr AFS EXCEPT /usr/afs, for
obvious reasons. Local AFS binaries live in /var/afs. I found out about
circular dependencies the hard way when a servers were down after a
power cut, and clients which had been using it refused to see anything
till it came back up.
DON'T symlink /usr -> /afs/cell/@sys/usr, and then symlink
/usr/cell/@sys/usr/afs -> /var/afs, since servers need to get at
/usr/afs before AFS is alive and they can't resolve the first symlink.
The solution is easy. When booting, everything BEFORE the AFS startup
is on the local root filesystem. You need a local directory /local_usr,
which contains a symlink /local_usr/afs -> /var/afs. If any pre-AFS
stuff has /usr hardcoded in, then bung it in /local_usr as well (the
AFS dynamic kernel loading for Ultrix needed bits of the linker in here).
Delete /usr (it'll either be a symlink or a directory on the root filesystem)
Symlink /usr -> /local_usr
Start bosserver (if this machine IS a server)
Start afsd
Wait until you can see /afs/cell/@sys/usr
Create a directory on the root file system containing links to all the
directories in /afs/cell/@sys/usr, or copies of symlinks it finds there.
Delete /usr
Rename the directory you just made to /usr.
Continue the rest of the boot sequence.
So - after booting, clients have a directory /usr, containing links
into AFS, OR links to the local file system, e.g. afs -> /var/afs and
tmp -> /var/tmp.
Have a look at
/afs/pegasus.cranfield.ac.uk/pmax_ul4.2/usr/local/etc/rc.build_local_usr_links
I'll do a PERL version sometime. Also look at chmod_usr, a damn useful
utility that allows me to subsitute links to the RO mount point for the
cell to the RW. VERY useful for installing s/w that has /usr hard-coded
in. For more forgiving installations, /.usr -> /afs/.cell/@sys/usr does the trick.
Peter Lister [EMAIL PROTECTED]
Computer Centre,
Cranfield Institute of Technology, Voice: +44 234 754200 ext 2828
Cranfield, Bedfordshire MK43 0AL England Fax: +44 234 750875