NFS - exports syntax

2009-06-14 Thread marco.borsat...@poste.it
Hi to all.
My problem concerns NFS configuration. I'm trying to simulate a little network 
using Sun VirtualBox in a Windows host and most of operations work fine, but 
I've some problems with /etc/exports syntax.
This is my current exports file:
--
/cond1 /cond2 -mapall=user1 pc01 pc02
/usr/home -alldirs pc01 pc02
---
When I type:
#showmount -e
I get
/usr/home     pc02 pc02
/cond1            pc01 pc02
/cond2            pc01 pc02
which is ok. But I wold like to use different "mapall" options for different 
filesystems; for example, something like this:
/usr/home -alldirs        pc02 pc02
/cond1 -mapall=user2 /cond2 -mapall=user1 pc01 pc02
which does not work: only /usr/home is exported. Or
/usr/home        pc02 pc02
/cond1 -mapall=user2 pc01 pc02
/cond2 -mapall=user1 pc01 pc02
Only /usr/home and /cond1 are exported.
FreeBSD exports man page states:
"Each line in the file (other than comment lines that begin with a #) specifies 
the mount point(s) and export flags within one local server file system for one 
or more hosts.". So, is it impossible to export different directories to 
different users using mapping?
Thanks. Sorry for my bad english.
Marco

___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: NFS - exports syntax

2009-06-14 Thread Brian Somers
On Sun, 14 Jun 2009 10:29:21 +0200 "marco\.borsati...@poste\.it" 
 wrote:
> Hi to all.
> My problem concerns NFS configuration. I'm trying to simulate a little 
> network using Sun VirtualBox in a Windows host and most of operations work 
> fine, but I've some problems with /etc/exports syntax.
> This is my current exports file:
> --
> /cond1 /cond2 -mapall=user1 pc01 pc02
> /usr/home -alldirs pc01 pc02
> ---
> When I type:
> #showmount -e
> I get
> /usr/home     pc02 pc02
> /cond1            pc01 pc02
> /cond2            pc01 pc02
> which is ok. But I wold like to use different "mapall" options for different 
> filesystems; for example, something like this:
> /usr/home -alldirs        pc02 pc02
> /cond1 -mapall=user2 /cond2 -mapall=user1 pc01 pc02
> which does not work: only /usr/home is exported. Or
> /usr/home        pc02 pc02
> /cond1 -mapall=user2 pc01 pc02
> /cond2 -mapall=user1 pc01 pc02
> Only /usr/home and /cond1 are exported.
> FreeBSD exports man page states:
> "Each line in the file (other than comment lines that begin with a #) 
> specifies the mount point(s) and export flags within one local server file 
> system for one or more hosts.". So, is it impossible to export different 
> directories to different users using mapping?
> Thanks. Sorry for my bad english.
> Marco

FreeBSD's exports implementation will only allow you to associate
mount options per local filesystem per remote machine, so this
version:

> /usr/home        pc02 pc02
> /cond1 -mapall=user2 pc01 pc02
> /cond2 -mapall=user1 pc01 pc02

is correct, but only if /cond1 and /cond2 are different filesystems.
If they're the same, this won't work.

Maybe you do something clever with exporting nullfs versions
of them and adding those to exports, but I haven't tried that.

-- 
Brian Somers  
Don't _EVER_ lose your sense of humour !   
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"