Re: Cached file system -- summary and /usr [second attempt]

From: Casper H.S. Dik (casper@fwi.uva.nl)
Date: Wed Jan 26 1994 - 04:06:16 CST


ross@bio-medical-physics.aberdeen.ac.uk (Philip Ross) writes:

>There was a nice summary describing the use of cachefs under Solaris 2.3
>from caywood@teb.larc.nasa.gov (John Caywood) on 20th Jan on this newsgroup.

>One of the things stated in the message was that the cachefs cannot be used
>for /usr. This is NOT true (even if Sun say it cannot be done it seems to
>work just fine). I agree it doesn't work during startup but any time after
>the system has booted a command such as the following overlay mounts /usr
>(eg. from a script in /etc/rc3.d)

>mount -O -F cachefs -o ro,backfstype=nfs,cachedir=/export/cache/cache1 hyacinthus:/export/exec/Solaris_2.3_sparc.all/usr /usr

>The important option seems to be -O so that it can hide the /usr mount
>point used during booting.

>Is there some reason why I shouldn't do this that will make me regret it?
>It certainly eliminates the NFS READs leaving just the GETATTRs quite
>nicely (once the cache has run for a bit).

The reason why cachefs cannot be used for /usr on boot is that
the cachefs mount programs are missing. The mount programs for
each fs are in /usr/lib/fs/<fstype>. When /usr isn't mounted,
you can't mount /usr.

Why do nfs, hsfs and ufs mount work for /usr? Simple: there is
an extra set of statically or semi-staically linked mount programs in
/etc/lib/fs/<fstype>, but only for ufs, hsfs and nfs.

To get cachefs to mount at boot you need:

        - lofs mount
        - cachefs mount

Unfortunately, people don't have statically linked cachefs and lofs mount
programs. My guess is that you can cachefs mount /usr as soon as you have
mounted /usr. The sooner the better, or you'll be having two copies
of a number of programs/shared libraries running around.
(From daemons before and daemons/programs started after the cachefs mount)

Casper



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:55 CDT