Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Aug 1999 23:01:01 -0500 (CDT)
From:      Jason Young <doogie@anet-stl.com>
To:        Kevin Day <toasty@dragondata.com>
Cc:        Matthew Dillon <dillon@apollo.backplane.com>, Martin Blapp <blapp@attic.ch>, freebsd-current@FreeBSD.ORG
Subject:   Re: mountpoint locking with fbsd-nfs
Message-ID:  <Pine.BSF.3.96.990801225104.6535C-100000@earth.anet-stl.com>
In-Reply-To: <199908020347.WAA51467@celery.dragondata.com>

next in thread | previous in thread | raw e-mail | index | archive | help

IIRC, mount permissions (i.e., what IP addresses, root UID mangling, etc) 
are set per filesystem. Given a filesystem structure like this: 

> df
Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
/dev/da0s1a    127023    27151    89711    23%    /
/dev/ccd0c    8321099  2391764  5263648    31%    /home
/dev/da0s1e   2032623   732806  1137208    39%    /usr
/dev/da1s1f   2032623   816051  1053963    44%    /var
/dev/ccd1c    4001742  1571210  2110393    43%    /var/mail
procfs              4        4        0   100%    /proc

You can only set IP addresses to be exported to and other options only
once for the /usr filesystem, once for the /var filesystem, etc. 

This doesn't mean if I export /home/doogie to 192.168.40.1 that that IP
address can mount /home. Mount still controls the mountpoints allowed. 

If you want to export multiple mountpoints of the same filesystem, you
need to specify them all on one line with one options set. Like this:

 /home/doogie /home/joebob /home/luser -maproot=0:0 testbox.accessus.net

Jason Young
accessUS Chief Network Engineer

PS: I just realized the manpage disagrees with this; it has multiple
exports lines for the same filesystem. I believe the manpage is wrong, at
least in that it doesn't reflect reality.  Comments from anybody? 

On Sun, 1 Aug 1999, Kevin Day wrote:

> >     Well, theoretically there is nothing wrong going on since you can mount
> >     things on top of an NFS directory.  Mount only complains about 
> >     duplicate normal partition mounts because it can't open the buffered
> >     block device the second time.  NFS doesn't care how many times a 
> >     directory is imported or exported.
> > 
> > 					-Matt
> > 					Matthew Dillon 
> > 					<dillon@backplane.com>
> > 
> > 
> 
> You sure about you can export a directory multiple times? I can't even
> export two directories under the same filesystem.
> 
> su-2.03# mount
> /dev/wd0s1a on / (NFS exported, local, noatime, soft-updates, writes: sync 3945 async 1317317)
> procfs on /proc (local)
> su-2.03# cat /etc/exports
> 
> /var                            home
> /var/tmp                        home
> su-2.03# mountd
> Aug  1 22:43:01 celery mountd[46042]: can't change attributes for /var/tmp
> Aug  1 22:43:01 celery mountd[46042]: bad exports list line /var/tmp home 
> 
> 
> 
> It actually exported /, which may not have been what i wanted. :)
> 
> Or did I misunderstand you?
> 
> Kevin
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-current" in the body of the message
> 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.990801225104.6535C-100000>