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

O. Hartmann ohartman at
Tue Feb 9 09:29:30 UTC 2010

On 02/08/10 22:37, Rick Macklem wrote:
> On Mon, 8 Feb 2010, O. Hartmann wrote:
>> So I guess the above one is the more 'transparent' one with respect 
>> to the future, when NFSv4 gets mature and its way as matured into the 
>> kernel?
> Yea, I'd only use "mount -t newnfs" if for some reason you want to 
> test/use the experimental client for nfsv2,3 instead of the regular one.
>> I tried the above and it works. But it seems, that only UFS2 
>> filesystems can be mounted by the client. When trying mounting a 
>> filesystem residing on ZFS, it fails. Mounting works, but when try to 
>> access or doing a simple 'ls', I get
>> ls: /backup: Permission denied
>> On server side, /etc/exports looks like
>> -- 
>> V4:     /       -sec=sys:krb5   #IPv4#
>> /backup      #IPv4#
>> -- 
>> Is there still an issue with ZFS?
> For ZFS, everything from the "root" specified by the "V4:" line
> must be exported at this time. So, if "/" isn't exported, the
> above won't work for ZFS. You can either export "/" or move the
> NFSv4 root down to backup. For example, you could try:
> V4:    /backup -sec=sys:krb5
> /backup
> (assuming /backup is the ZFS volume)
> and then a mount like:
> mount -t nfs -o nfsv4 server:/ /mnt
> will mount /backup on /mnt
> rick
> ps: ZFS also has its own export stuff, but it is my understanding that
>     putting a line in /etc/exports is sufficient. I've never used ZFS,
>     so others will know more than I.
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?

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.

Is there a way to inspect the exports and mounts for the used 
NFS-protocol? 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.

Thanks a lot,


More information about the freebsd-questions mailing list