From owner-freebsd-questions@FreeBSD.ORG Mon Feb 12 17:36:01 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3AF0216A400 for ; Mon, 12 Feb 2007 17:36:01 +0000 (UTC) (envelope-from tillman@seekingfire.com) Received: from mail.seekingfire.com (caliban.seekingfire.com [24.89.83.8]) by mx1.freebsd.org (Postfix) with ESMTP id 1148C13C442 for ; Mon, 12 Feb 2007 17:36:01 +0000 (UTC) (envelope-from tillman@seekingfire.com) Received: by mail.seekingfire.com (Postfix, from userid 500) id 1CCBA8E; Mon, 12 Feb 2007 11:05:54 -0600 (CST) Date: Mon, 12 Feb 2007 11:05:53 -0600 From: Tillman Hodgson To: freebsd-questions@freebsd.org Message-ID: <20070212170553.GA543@seekingfire.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Habeas-SWE-1: winter into spring X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-4: Copyright 2002 Habeas (tm) X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-9: mark in spam to . X-GPG-Key-ID: 828AFC7B X-GPG-Fingerprint: 5584 14BA C9EB 1524 0E68 F543 0F0A 7FBC 828A FC7B X-GPG-Key: http://www.seekingfire.com/personal/gpg_key.asc X-Urban-Legend: There is lots of hidden information in headers X-Tillman-rules: yes he does User-Agent: Mutt/1.5.13 (2006-08-11) Subject: Mounting multiple NFS shares to the same point X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Feb 2007 17:36:01 -0000 A bit of background: I run backup scripts (dumps piped through gzip to a fileshare) out of periodic on a daily, weekly and monthly basis. In the script I mount the NFS share, perform the dumps, and then umount the share. I was worried that if a daily backup took a long time (more than twice the normal time) then the weekly would bomb out because the filesystem was already mounted. So I was going to write some checks to see if it existed before mounting it. Which is when I discovered that you can mount multiple NFS shares to the same directory :-) Here's an example of it in action: [root@athena ~]# mount /exports/srvbackup/ [root@athena ~]# mount | grep srvbackup nas:/srvbackup on /exports/srvbackup (nfs) [root@athena ~]# mount /exports/srvbackup/ [root@athena ~]# mount | grep srvbackup nas:/srvbackup on /exports/srvbackup (nfs) nas:/srvbackup on /exports/srvbackup (nfs) [root@athena ~]# umount /exports/srvbackup/ [root@athena ~]# mount | grep srvbackup nas:/srvbackup on /exports/srvbackup (nfs) [root@athena ~]# umount /exports/srvbackup/ [root@athena ~]# mount | grep srvbackup [root@athena ~]# man mount_nfs 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 definitely seems odd to me, I would've expected mount to express an error to me. -T