NFSv4: mount -t nsf4 not the same as mount_newnfs?

Rick Macklem rmacklem at uoguelph.ca
Tue Feb 9 16:30:10 UTC 2010



On Tue, 9 Feb 2010, O. Hartmann wrote:

> Well, I guess I havn't uderstood everything of NFSv4. The 'concept' of the 
> 'root' is new to me, maybe there are some deeper explanation of the purpose? 
> Are there supposed to be more than one 'root' enries or only one?
>

Only to specify different security flavours for different client host
IP#s. There is only one "root" location in the file system tree. This
was done for NFSv4 to avoid any need for the mount protocol. See below.

> At this very moment mounting seems to work, but I always get a 'permission 
> denied' error on every ZFS exported filesystem. Doing the same with UFS2 
> filesystems, everything works as expected.
>

In NFSv4 "mount" does very little, since it does not use the mount 
protocol. It basically passes a "pathname" from the NFSv4 "root" into
the kernel for later use. (Since UFS doesn't actually check exports, the
experimental server checks them, but "cheats" and allows a minimal set
of NFSv4 Operations on non-exported volumes, so that this "pathname" can
be traversed to the exported volume.

At this time ZFS checks exports. As such everything in the tree from the
"root" specified by the "V4:" line must be exported for ZFS to work. I
believe others have gotten a ZFS export to work, but I have no experience
with it at this time.

> Is there a way to inspect the exports and mounts for the used NFS-protocol?

Not that I am aware. (Excluding ZFS, which I don't know anything about, 
the /etc/exports file specifies the exports.)

> When issuing 'mount', the 'backup' mount is repoted to be 'newnfs', I assume 
> this reflects NFSv4 being used, now I need to figure out what's going wrong 
> with the ZFS export. NFS export of the ZFS filesystem is enabled, but as far 
> as I know, this feature is not used in FreeBSD since ZFS in FreeBSD lacks of 
> the capabilities of autonomously exporting its via NFS - well, I'm not an 
> expert in this matter.
>
I'm definitely not a ZFS expert either:-) I think the mount command is
showing you that the mount point was created ("newnfs" refers to the
experimental client), but as noted above, that doesn't indicate that
it is accessible. (If you haven't tried moving the "V4: /backup ..."
that moves the NFSv4 "root" to /backup, you should do that and see
how it goes.)

Good luck with it, rick



More information about the freebsd-stable mailing list