Date: Wed, 5 Jan 2011 08:13:20 -0500 (EST) From: Rick Macklem <rmacklem@uoguelph.ca> To: Marek Salwerowicz <marek_sal@wp.pl> Cc: freebsd-stable@freebsd.org, Maciej Milewski <milu@dat.pl>, Jean-Yves Avenard <jyavenard@gmail.com> Subject: Re: NFSv4 - how to set up at FreeBSD 8.1 ? Message-ID: <1103592228.118408.1294233200171.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <DD24BE035356420B820AF77A6AB45E3A@marekdesktop>
next in thread | previous in thread | raw e-mail | index | archive | help
> > You can also do the following: > > For /etc/exports > > V4: / > > /usr/home -maproot=root -network 192.168.183.0 -mask 255.255.255.0 > > Not in my configuration - '/' and '/usr' are different partitions > (both UFS) > Hmm. Since entire volumes are exported for NFSv4, I can't remember if exporting a subtree of the volume works (I think it does, but??). However, I do know that if you change the /etc/exports for the above to: (note I also moved the V4: line to the end because at one time it was required to be at the end and I can't remember if that restriction is still enforced. Always check /var/log/messages after starting mountd with a modified /etc/exports and look for any messages related to problems with /etc/exports.) In other words, export the volume's mount point and put the V4: line at the end are changes that "might be required?". If you take a look at mountd.c, you'll understand why I have trouble remembering exactly what works and what doesn't.:-) /usr -maproot=root -network 192.168.183.0 -mask 255.255.255.0 V4: / then for the above situation: # mount -t nfs -o nfsv4 server:/ /mnt - will fail because "/" isn't exported however # mount -t nfs -o nfsv4 server:/usr /mnt - should work. If it doesn't work, it is not because /etc/exports are wrong. A small number of NFSv4 ops are allowed on non-exported UFS partitions so that "mount" can traverse the tree down to the mount point, but that mount point must be exported. When I did this I did not realize that ZFS did its own exporting and, as such, traveral of non-exported ZFS volumes doesn't work, because ZFS doesn't allow any operations on the non-exported volumes to work. At some point, there needs to be a debate w.r.t. inconsistent behaviour. The easiest fix is to disable the capability of traversal of non-exported UFS volumes. The downside of this is that it is harder to configure the single (sub)tree on the server that is needed for NFSv4. Have fun with it, rick
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1103592228.118408.1294233200171.JavaMail.root>