Mounting multiple NFS shares to the same point

Alex Zbyslaw xfb52 at
Tue Feb 13 12:24:05 UTC 2007

Tillman Hodgson wrote:

>If that still holds true in the -current src, the second mount will
>*definitely* cause me backup problems. I may have to move to keeping the
>NFS export always mounted, which is not ideal.
Could you use something like ssh to transfer the files rather than 
needing NFS?  (I don't know if you mentioned what the NFS-end box was...).

(local gzip)

$filesystem | \
                gzip -9 | \
                /usr/local/bin/ssh -z -i ${keyfile}

(remote gzip)

/sbin/dump $LEVEL -a -C 64 $CHECKPOINT $UPDATE $UPDATEFILE -f - 
$filesystem | \
                /usr/local/bin/ssh -z -i ${keyfile} \
                "umask 337; gzip -9 > /backup/$ii"

I'm also not clear why you think that keeping the NFS partition mounted 
all the time is so bad.  If there is no access then surely the overhead 
is minimal.

Your other alternative is to use lockfiles to control when things get 
mounted/unmounted.  If the control file is locked, you wait until it's 
unlocked (or bomb with an error, whatever).  Trivial in perl, and 
lockf(1) looks like the way to go with shell.


More information about the freebsd-questions mailing list