Marko Milisavljevic
2007-Jun-26 21:20 UTC
[zfs-discuss] NFS, nested ZFS filesystems and ownership
Hello, I''m sure there is a simple solution, but I am unable to figure this one out. Assuming I have tank/fs, tank/fs/fs1, tank/fs/fs2, and I set sharenfs=on for tank/fs (child filesystems are inheriting it as well), and I chown user:group /tank/fs, /tank/fs/fs1 and /tank/fs/fs2, I see: ls -la /tank/fs user:group . user:group fs1 user:group fs2 user:group some_other_file If I mount server:/tank/fs /tmp/mount from another machine, I see: ls -la /tmp/mount user:group . root:wheel fs1 root:wheel fs2 user:group some_other_file How can I get user:group to propagate down the nested ZFS filesystem over NFS? Thanks, Marko -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20070626/bb59772c/attachment.html>
Marko Milisavljevic
2007-Jun-26 22:30 UTC
[zfs-discuss] Re: NFS, nested ZFS filesystems and ownership
I figured out how to get it to work, but I still don''t quite understand it. The way i got it to work is to zfs unmount tank/fs/fs1 and tank/fs/fs2, and then it looked like this: ls -la /tank/fs user:group . root:root fs1 root:root fs2 That is, those mountpoints changed to root:root from user:group that was in effect while it was mounted. This I don''t understand - what is determining this? How did zfs know to change this to user:group after zfs mount -a on local filesystem? Does ZFS inherit parent directory ownership at time of mounting, regardless of ownership of mountpoint? Does NFS respect ownership of underlying mountpoint, regardless of how ZFS is mounting it? I would appreciate an explanation or pointing to appropriate documentation. In any case, I would expect that reasonable behavour would be for both local ZFS filesystem hierarchy and the view of the same over NFS to display same ownership (user:group in question exists on both machines, and client is Mac OSX 10.4.9) Marko On 6/26/07, Marko Milisavljevic <marko at cognistudio.com> wrote:> > Hello, > > I''m sure there is a simple solution, but I am unable to figure this one > out. > > > Assuming I have tank/fs, tank/fs/fs1, tank/fs/fs2, and I set sharenfs=on > for tank/fs (child filesystems are inheriting it as well), and I chown > user:group /tank/fs, /tank/fs/fs1 and /tank/fs/fs2, I see: > > > ls -la /tank/fs > user:group . > user:group fs1 > user:group fs2 > user:group some_other_file > > If I mount server:/tank/fs /tmp/mount from another machine, I see: > > > ls -la /tmp/mount > user:group . > root:wheel fs1 > root:wheel fs2 > user:group some_other_file > > > How can I get user:group to propagate down the nested ZFS filesystem over > NFS? > > > Thanks, > Marko >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20070626/83746be1/attachment.html>
Marko Milisavljevic
2007-Jun-26 23:42 UTC
[zfs-discuss] Re: NFS, nested ZFS filesystems and ownership
Well, I didn''t realize this at first because I was testing with newly empty directories and sorry about wasting the bandwidth here, but it apprears NFS is not showing nested ZFS filesystems *at all*, all I was seing is mountpoints of the parent filesystem, and their changing ownership as server was mounting and unmounting child filesystems locally. I see nothing in zfs or mount commands that would allow me to recursively propagate my NFS mount to display hierarchy created by ZFS on server side. Is this at all possible or NFS and nested ZFS filesystems don''t mix? And it seems to be a bug, but unless zfs set sharenfs=on is explicitly set on a filesystem (even though it is already inherited as "on", and shows as such in zfs list -o name,sharenfs), it does not appear in "share" command output nor can it be mounted by the NFS client - gives permission error. Marko On 6/26/07, Marko Milisavljevic <marko at cognistudio.com> wrote:> > I figured out how to get it to work, but I still don''t quite understand > it. > > The way i got it to work is to zfs unmount tank/fs/fs1 and tank/fs/fs2, > and then it looked like this: > > > ls -la /tank/fs > user:group . > root:root fs1 > root:root fs2 > > > That is, those mountpoints changed to root:root from user:group that was > in effect while it was mounted. This I don''t understand - what is > determining this? How did zfs know to change this to user:group after zfs > mount -a on local filesystem? Does ZFS inherit parent directory ownership at > time of mounting, regardless of ownership of mountpoint? Does NFS respect > ownership of underlying mountpoint, regardless of how ZFS is mounting it? I > would appreciate an explanation or pointing to appropriate documentation. In > any case, I would expect that reasonable behavour would be for both local > ZFS filesystem hierarchy and the view of the same over NFS to display same > ownership (user:group in question exists on both machines, and client is Mac > OSX 10.4.9) > > > Marko > > On 6/26/07, Marko Milisavljevic <marko at cognistudio.com> wrote: > > > > Hello, > > > > I''m sure there is a simple solution, but I am unable to figure this one > > out. > > > > > > Assuming I have tank/fs, tank/fs/fs1, tank/fs/fs2, and I set sharenfs=on > > for tank/fs (child filesystems are inheriting it as well), and I chown > > user:group /tank/fs, /tank/fs/fs1 and /tank/fs/fs2, I see: > > > > > > ls -la /tank/fs > > user:group . > > user:group fs1 > > user:group fs2 > > user:group some_other_file > > > > If I mount server:/tank/fs /tmp/mount from another machine, I see: > > > > > > ls -la /tmp/mount > > user:group . > > root:wheel fs1 > > root:wheel fs2 > > user:group some_other_file > > > > > > How can I get user:group to propagate down the nested ZFS filesystem > > over NFS? > > > > > > Thanks, > > Marko > > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20070626/80920c45/attachment.html>