Frank Cusack
2010-Jan-23 17:44 UTC
[zfs-discuss] nfs mounts don''t follow child filesystems?
I thought with NFS4 *on solaris* that clients would follow the zfs filesystem hierarchy and mount sub-filesystems. That doesn''t seem to be happening and I can''t find any documentation on it (either way). Did I only dream up this feature or does it actually exist? I am using s10_u8. thanks -frank
Robert Thurlow
2010-Jan-23 19:42 UTC
[zfs-discuss] nfs mounts don''t follow child filesystems?
Frank Cusack wrote:> I thought with NFS4 *on solaris* that clients would follow the zfs > filesystem hierarchy and mount sub-filesystems. That doesn''t seem > to be happening and I can''t find any documentation on it (either way). > > Did I only dream up this feature or does it actually exist? I am > using s10_u8.Hi Frank, Solaris Nevada does this in build 77 or later, but it has not been backported to a Solaris 10 update. Rob T
Bob Friesenhahn
2010-Jan-23 20:17 UTC
[zfs-discuss] nfs mounts don''t follow child filesystems?
On Sat, 23 Jan 2010, Frank Cusack wrote:> I thought with NFS4 *on solaris* that clients would follow the zfs > filesystem hierarchy and mount sub-filesystems. That doesn''t seem > to be happening and I can''t find any documentation on it (either way). > > Did I only dream up this feature or does it actually exist? I am > using s10_u8.The Solaris 10 automounter should handle this for you: % cat /etc/auto_home # Home directory map for automounter # #+auto_home * myserver:/export/home/& Notice that the referenced path is subordinate to the exported zfs filesystem. Bob -- Bob Friesenhahn bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Frank Cusack
2010-Jan-23 23:54 UTC
[zfs-discuss] nfs mounts don''t follow child filesystems?
On January 23, 2010 2:17:12 PM -0600 Bob Friesenhahn <bfriesen at simple.dallas.tx.us> wrote:> On Sat, 23 Jan 2010, Frank Cusack wrote: > >> I thought with NFS4 *on solaris* that clients would follow the zfs >> filesystem hierarchy and mount sub-filesystems. That doesn''t seem >> to be happening and I can''t find any documentation on it (either way). >> >> Did I only dream up this feature or does it actually exist? I am >> using s10_u8. > > The Solaris 10 automounter should handle this for you: > > % cat /etc/auto_home ># Home directory map for automounter ># ># +auto_home > * myserver:/export/home/& > > Notice that the referenced path is subordinate to the exported zfs > filesystem.Well, assuming there is a single home zfs filesystem and not a filesystem-per-user. For filesystem-per-user your example simply mounts the correct shared filesystem. Even for a single home filesystem, the above doesn''t actually mount /export/home and then also mount /export/home/USER, so it''s not following the zfs filesystem hierarchy. So while your example doesn''t demonstrate the behavior I''m asking for, the automounter does indeed work as I want, at least for /net. -frank
Bob Friesenhahn
2010-Jan-24 00:53 UTC
[zfs-discuss] nfs mounts don''t follow child filesystems?
On Sat, 23 Jan 2010, Frank Cusack wrote:>> Notice that the referenced path is subordinate to the exported zfs >> filesystem. > > Well, assuming there is a single home zfs filesystem and not a > filesystem-per-user. For filesystem-per-user your example simply > mounts the correct shared filesystem. Even for a single home > filesystem, the above doesn''t actually mount /export/home and > then also mount /export/home/USER, so it''s not following the > zfs filesystem hierarchy.I am using a filesystem-per-user on my system. Are you saying that my system is wrong? These per-user fileystems are NFS exported due to the inheritance of zfs properties from their parent directory. The property is only set in one place. Bob -- Bob Friesenhahn bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Frank Cusack
2010-Jan-24 02:10 UTC
[zfs-discuss] nfs mounts don''t follow child filesystems?
On January 23, 2010 6:53:26 PM -0600 Bob Friesenhahn <bfriesen at simple.dallas.tx.us> wrote:> On Sat, 23 Jan 2010, Frank Cusack wrote: >>> Notice that the referenced path is subordinate to the exported zfs >>> filesystem. >> >> Well, assuming there is a single home zfs filesystem and not a >> filesystem-per-user. For filesystem-per-user your example simply >> mounts the correct shared filesystem. Even for a single home >> filesystem, the above doesn''t actually mount /export/home and >> then also mount /export/home/USER, so it''s not following the >> zfs filesystem hierarchy. > > I am using a filesystem-per-user on my system. Are you saying that my > system is wrong? > > These per-user fileystems are NFS exported due to the inheritance of zfs > properties from their parent directory. The property is only set in one > place.You have misunderstood the problem. Of course, or rather I understand, that zfs child filesystems inherit the sharenfs property from the parent similar to how they inherit other properties. (And even if they didn''t, clients can still mount subdirectories of the directory that is shared unless the server explicitly disallows that option. Regardless of underlying filesystem.) With zfs filesystems, when you have a directory which is a subordinate filesystem, as in filesystem-per-user, then if the NFS client mounts the parent filesystem, when it crosses the child filesystem boundary it does not see into the child filesystem as it would if it were local. server: export export/home export/home/user client mounts server:/export/home on /home. the client can see (e.g.) /home/user, but as an empty directory. when the client enters that directory it is writing into the export/home filesystem on the server (and BTW those writes are not visible on the server since they are obscured by the child filesystem.) NFS4 has a mechanism to follow and mount the child filesystem. Your example doesn''t do that, it simply mounts the child filesystem directly. -frank