Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Feb 2007 14:04:38 -0500
From:      "Bob Johnson" <fbsdlists@gmail.com>
To:        "Tillman Hodgson" <tillman@seekingfire.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Mounting multiple NFS shares to the same point
Message-ID:  <54db43990702121104x7aea5f53tab517d32e85c9b19@mail.gmail.com>
In-Reply-To: <20070212170553.GA543@seekingfire.com>
References:  <20070212170553.GA543@seekingfire.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2/12/07, Tillman Hodgson <tillman@seekingfire.com> wrote:
[...]
> Further, you can mount /different/ shares to the same directory:
>
> [root@athena ~]# mount /exports/srvbackup/
> [root@athena ~]# mount_nfs nas:/pub /exports/srvbackup/
> [root@athena ~]# mount | grep srvbackup
> nas:/srvbackup on /exports/srvbackup (nfs)
> nas:/pub on /exports/srvbackup (nfs)
>
> I then cd'ed to /exports/srvbackup, and only saw files from the second
> mount (nas:/pub). So it's not doing a union mount or anything like that.
>
> Is this normal behaviour? Are there any problems with (performance,
> perhaps) that might occur if an NFS share is mounted twice? What if my
> backup job is still running, would it be interrupted by the second mount
> 75 minutes later (according to the `periodic` entires in crontab) or
> will it be fine?

This is normal behavior.  There may be exceptions, but in general you
can mount one filesystem over another (it isn't unique to NFS).  Only
the most recently mounted filesystem will be visible.  Unmount it, and
the one below it will become visible again.  It does not reduce
performance, it's just the way it works. For example, when you mount
an NFS volume, you are mounting it over a directory on your local UFS
volume, which is then no longer visible. In some cases this is useful:
for example, you can populate the UFS directory with files that
provide default values for something when the NFS mount is not there,
or that can tell a script that the NFS mount is not present.

I'm not sure whether you are backup up TO or FROM the NFS mount, but
either way, you aren't going to get the results you want if the second
mount occurs while the backup is in progress.

- Bob



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54db43990702121104x7aea5f53tab517d32e85c9b19>