/etc/rc.d/mountcritremote and nfsserver

Kirk Strauser kirk at strauser.com
Fri Nov 19 07:17:58 PST 2004


This is a short question, but I'll make it long anyway.  Those short on
time may want to skip to the last paragraph.

I run several servers that each host a few jail environments, and I use NFS
as a kind of loopback filesystem to share common directories among them.
For example, my /etc/fstab is populated with entries like:

    hostmachine:/usr/ports           /var/jail/virtual1/usr/ports            nfs ro 0 0
    hostmachine:/usr/ports/distfiles /var/jail/virtual1/usr/ports/distfiles  nfs rw 0 0

Until recently, I've been using the sysutils/jailadmin port (plug: which I
wrote ;-) ) to start and stop these jails, and one of its features is that
it can automatically mount a jail's filesystems immediately before it starts
it and then umount them when the jail is stopped.  Consequently, I've always
had the `noauto' option in /etc/fstab in all of those NFS entries.

A few days ago, though, I decided to try the much-improved rc.d/jail
script, and it works well enough now that I'm about ready to orphan
jailadmin and concentrate on improving rc.d/jail instead.  However,
`jail' does not (yet) support the automatic mounting of a jail's
filesystems, so I have to let the boot sequence take care of that.  If I
remove the `noauto' option, then the machines hang at boot in
rc.d/mountcritremote, since it runs before rc.d/nfsserver.

As someone new to the whole rc.d idea, I have to ask: is it OK to add
`nfsserver' to the REQUIRE line in `mountcritremote'?  Is there any reason
not to?  Would this make sense as a patch for FreeBSD in general?
-- 
Kirk Strauser
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 155 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20041119/4f09029c/attachment.bin


More information about the freebsd-questions mailing list