[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zfs-discuss
Subject:    Re: [zfs-discuss] How to get nfs work with zfs?
From:       Didier Rebeix <Didier.Rebeix () u-bourgogne ! fr>
Date:       2011-12-06 17:37:22
Message-ID: 20111206183722.15f66588 () satie ! u-bourgogne ! fr
[Download RAW message or body]

Le Tue, 6 Dec 2011 12:52:02 +0800,
darkblue <darkblue2000@gmail.com> a écrit :

> I am going to share a dir and it's subdir through NFS to Virtual Host,
> which include XEN(CentOS/netbsd) and ESXi,but failed, the following
> step is what I did:
> 
> solaris 11:
> 
> > zfs create tank/iso
> > zfs create tank/iso/linux
> > zfs create tank/iso/windows
> >
> > share -F nfs -o rw,nosuid,root=VM-host1:VM-host2 /tank/iso
> > chmod -R 777 /tank/iso
> >
> 
> centos:
> 
> > mkdir /home/iso
> > mount -t nfs -o rw,nosuid solaris11:/tank/iso /home/iso
> >
> 
> echo "newfile" > /home/iso/newfile.txt
> success
> 
> echo "newfile" > /home/iso/linux/newfile.txt
> failed,and display: permission denied
> 
> and the, check the dir on solaris11:
> 
> > ls -al /tank/iso
> >
> >     drwxrwxrwx   5 root     root           8 Dec  5 13:04 .
> >     drwxr-xr-x   4 root     root           4 Dec  2 22:45 ..
> >     drwxrwxrwx   2 root     root           2 Dec  2 16:54 bsd
> >     drwxrwxrwx   2 root     root           2 Dec  2 16:54 linux
> >     -rw-r--r--   1 nobody   nobody         8 Dec  5 12:57
> > newfile.txt drwxrwxrwx   2 root     root           2 Dec  2 16:54
> > windows
> >
> 
> check the dir on CentOS:
> 
> > ls -al /home/iso
> >
> >     drwxr-xr-x+ 2 root      root               2 Dec  2 16:54 bsd
> >     drwxr-xr-x+ 2 root      root               2 Dec  2 16:54 linux
> >     -rw-r--r--+ 1 nfsnobody nfsnobody          8 Dec  5 12:57
> > newfile.txt drwxr-xr-x+ 2 root      root               2 Dec  2
> > 16:54 windows
> >
> 
> I got couple questions:
> 1、why the owner of newfile.txt is nfsnobody on CentOS, and on
> solaris, it's  nobody?
nfsnobody has the same UID on Centos as nobody has on Solaris. Check
your /etc/passwd files on both systems.
Filesystems store UIDs not login names. UIDs are resolved to login
names by tools like 'ls' by querying the system's user database which is
usualy backed by /etc/passwd.

> 2、why the subdir do not have write access, how to accomplish it;
Your subdirs are in fact filesystem mount points. When exporting a
filesystem containing submounted filesystems, clients do not see them.
Clients have to mount each submount to access them. With NFS you export
a filesystem, not a hierarchy of filesystems.

> 3、what does "+" mean?
It means ACLs are enabled. Use noacl mount option to disable.

> 4、do I need to remount a share dir after changing the file access on
> solaris(NFS server)?
If you mean like chmod'ing on the server, then you don't have to
remount on the clients. 

Cheers.

-- 
Didier REBEIX
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic