Diskless NFS mounts weirdness

Ean Kingston ean at hedron.org
Tue Feb 15 16:31:25 GMT 2005

> cpghost at cordula.ws wrote:
>> 1. /var *is* actually mounted on
>>    but it is not listed in mount(8)s output. Why?
>> 2. Which part of the system created /dev/md0 and mounted that
>>    on /var? I don't need that and would like to save some RAM
>>    anyway.
> I guess you are using 5.3 or newer? the /etc/rc.d/diskless script has
> been replaced, by among other things, a script /etc/rc.d/var which
> creates a memory disk, /dev/md0, using up your precious ram.
> I have tried to remove the script but get an error because nfs wants to
> update the /var/db/mounttab - before /var is actually mounted - so the
> mount fails.
> The /etc/rc.d/var script creates a memory disk if it detects that /var
> is read-only - which is the case since the nfs mount failed. And the
> memory disk is then populated.
> If the root partition is rw-mounted the nfs-mount will succeed.
> If you have enough ram this is not a problem, simply let var be a memory
> disk. You can set the size of the memory disk in rc.conf.
>  > /dev/md0 on /var (ufs, local, soft-updates)
>  > on /var (nfs)
> Now this is wierd - how can you have to mounts on the same mount point?

Wierd yes, but very easy to do. A mount point is just a directory. That
directory does not have to be empty. First /dev/md0 was mounted, then the
NFS share was mounted. So, the NFS share is what is being used as /var.
This indicates poor design (or an error).

Ean Kingston

E-Mail: ean_AT_hedron_DOT_org
URL: http://www.hedron.org/

More information about the freebsd-questions mailing list