I''m looking at implementing home directories on ZFS. This will be about 400 users, each with a quota. The ZFS way of doing this AIUI is create one filesystem per user, assign them a quota and/or reservation, and set sharenfs=on. So I tried it: # zfs create local-space/test # zfs set sharenfs=on local-space/test # zfs create local-space/test/foo # zfs create local-space/test/foo/bar # share - /export/local-space/test rw "" - /export/local-space/test/foo rw "" - /export/local-space/test/foo/bar rw "" All good so far. Now, I understand that with nfs in general, the child filesystems will not be mounted, and I do see this behavior on Linux. If I specify nfs4, the children are mounted as I expected: # mount -t nfs4 server:/export/local-space/test /mnt/ # cd /mnt/ # ls foo # ls foo bar Okay, all is well. Try the same thing on a Solaris client, though, and it doesn''t work: # mount -o vers=4 ds3:/export/local-space/test /mnt/ # cd mnt # ls foo # ls foo <nothing> On the Linux machine, nfsstat -m shows that the child filesystems have each been mounted independently, but on the Solaris machine only the ''test'' filesystem get mounted. nfsstat -m shows it''s mounted with nfsv4, but none of the child filesystems are automatically mounted. So, my questions are: * Are there options I can set server- or client-side to make Solaris child mounts happen automatically (i.e., match the Linux behavior)? * Will this behave with automounts? What I''d like to do is list /export/home in the automount master file, but not all the child filesystems. * Is there a simpler way to accomplish this task in general without resorting to UFS? Any input is welcome. I''m not subscribed to nfs-discuss, so please CC me if you respond on that list. Thanks! Will
On Wed, May 21, 2008 at 02:43:26PM -0400, Will Murnane wrote:> So, my questions are: > * Are there options I can set server- or client-side to make Solaris > child mounts happen automatically (i.e., match the Linux behavior)?I think these are known as "mirror-mounts" in Solaris. They first integrated in build 77. I don''t know when (or if) they made their way into Solaris 10. -- Darren
On May 21, 2008, at 1:43 PM, Will Murnane wrote:> I''m looking at implementing home directories on ZFS. This will be > about 400 users, each with a quota. The ZFS way of doing this AIUI is > create one filesystem per user, assign them a quota and/or > reservation, and set sharenfs=on. So I tried it: > # zfs create local-space/test > # zfs set sharenfs=on local-space/test > # zfs create local-space/test/foo > # zfs create local-space/test/foo/bar > # share > - /export/local-space/test rw "" > - /export/local-space/test/foo rw "" > - /export/local-space/test/foo/bar rw "" > All good so far. Now, I understand that with nfs in general, the > child filesystems will not be mounted, and I do see this behavior on > Linux. If I specify nfs4, the children are mounted as I expected: > # mount -t nfs4 server:/export/local-space/test /mnt/ > # cd /mnt/ > # ls > foo > # ls foo > bar > Okay, all is well. Try the same thing on a Solaris client, though, > and it doesn''t work: > # mount -o vers=4 ds3:/export/local-space/test /mnt/ > # cd mnt > # ls > foo > # ls foo > <nothing>This behavior was a recent addition to the Solaris client and therefore are seeing this lack of functionality. Any recent Solaris Express or OpenSolaris install will have the functionality you desire. Spencer
Spencer Shepler wrote:> On May 21, 2008, at 1:43 PM, Will Murnane wrote: > > >> Okay, all is well. Try the same thing on a Solaris client, though, >> and it doesn''t work: >> # mount -o vers=4 ds3:/export/local-space/test /mnt/ >> # cd mnt >> # ls >> foo >> # ls foo >> <nothing> >> > > This behavior was a recent addition to the Solaris client and therefore > are seeing this lack of functionality. Any recent Solaris Express or > OpenSolaris install will have the functionality you desire. > > Spencer > >And for an overview: http://www.connectathon.org/talks08/mirrormounts.pdf
On Wed, 21 May 2008, Will Murnane wrote:> > So, my questions are: > * Are there options I can set server- or client-side to make Solaris > child mounts happen automatically (i.e., match the Linux behavior)? > * Will this behave with automounts? What I''d like to do is list > /export/home in the automount master file, but not all the child > filesystems.Here is the answer you were looking for: In /etc/auto_home: # Home directory map for automounter # * server:/home/& This works on Solaris 9, Solaris 10, and OS-X Leopard. Bob =====================================Bob Friesenhahn bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
On Wed, May 21, 2008 at 4:13 PM, Bob Friesenhahn <bfriesen at simple.dallas.tx.us> wrote:> Here is the answer you were looking for: > > In /etc/auto_home: > # Home directory map for automounter > # > * server:/home/& > > This works on Solaris 9, Solaris 10, and OS-X Leopard.And Linux, too! Thank you for the answer! This makes my life much easier. Will
Will Murnane wrote:> On Wed, May 21, 2008 at 4:13 PM, Bob Friesenhahn > <bfriesen at simple.dallas.tx.us> wrote: > >> Here is the answer you were looking for: >> >> In /etc/auto_home: >> # Home directory map for automounter >> # >> * server:/home/& >> >> This works on Solaris 9, Solaris 10, and OS-X Leopard. >> > And Linux, too! Thank you for the answer! This makes my life much easier. > ><geezer alert> This solution is so old, almost 20 years old, that many of us forget that it isn''t the default... :-) </geezer_alert> -- richard
Bob Friesenhahn wrote:> On Wed, 21 May 2008, Will Murnane wrote: >> So, my questions are: >> * Are there options I can set server- or client-side to make Solaris >> child mounts happen automatically (i.e., match the Linux behavior)? >> * Will this behave with automounts? What I''d like to do is list >> /export/home in the automount master file, but not all the child >> filesystems. > > Here is the answer you were looking for: > > In /etc/auto_home: > # Home directory map for automounter > # > * server:/home/& > > This works on Solaris 9, Solaris 10, and OS-X Leopard.Shouldn''t that be * server:/export/home/&
Richard Elling <Richard.Elling at Sun.COM> wrote:> >> In /etc/auto_home: > >> # Home directory map for automounter > >> # > >> * server:/home/& > >> > >> This works on Solaris 9, Solaris 10, and OS-X Leopard. > >> > > And Linux, too! Thank you for the answer! This makes my life much easier. > > > > > <geezer alert> > This solution is so old, almost 20 years old, that many of us > forget that it isn''t the default... :-) > </geezer_alert>It is easier to understand when people know that BSD and Linux adopted to a clone of the old Sun automounter after Sun replaced it by something better ;-) J?rg -- EMail:joerg at schily.isdn.cs.tu-berlin.de (home) J?rg Schilling D-13353 Berlin js at cs.tu-berlin.de (uni) schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily