nfs 3 or 4??

Tom H tomh0665 at gmail.com
Fri Feb 19 03:06:17 UTC 2010


>> I have installed and set up the nfs server but when you get to the
>> auto-mount bit it gives two different formats, one for 3 and one for
>> 4. The aptitude show says: The NFS kernel server is currently the
>> recommended NFS server for use with Linux,
>> featuring features such as NFSv3 and NFSv4.
>> So what settings do I use? Is this 3 or 4???

> I just recently ran into this while trying to get NFS mounts over ipv6
> (supported in NFSv4). The NFS server should support exporting to both
> v3 and v4 clients. Now, whether you have to explicitly configure nfsd
> to use one or the other, I couldn't tell you off hand.
> In any case, it should support either one... and in my experience,
> getting a NFS mount using any NFS version is a matter of passing the
> parameters to the mount command...
> Here's a Red Hat page with info on mounting either NFSv2 or NFSv3
> shares via mount:
> http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Deployment_Guide-en-US/s1-nfs-client-config-options.html
> Here's a Ubuntu man page on mounting nfs v3 and v4 shares:
> http://manpages.ubuntu.com/manpages/dapper/man5/nfs.5.html
> And here's a Ubuntu help page on configuring NFSv4:
> https://help.ubuntu.com/community/NFSv4Howto

nfsv4 is slightly more secure than nfsv3 if you do not use kerberos
and much more secure if you do.

I have just read
https://help.ubuntu.com/community/NFSv4Howto
and I have three additions to the procedure, should you choose nfsv4.

1. The value of
Domain
in
/etc/idmapd.conf
must be the same on your server and your client(s)

2. Add
fsid=0
to your server export options

3. To mount the same nfs export, /path/to/export
for nfsv3, do on nfsclient
mount -o <nfsvers=3,options> nfsserver:/path/to/export /path/to/mount
for nfsv4, do on nfsclient
mount -t nfs4 -o <options> nfsserver:/ /path/to/mount




More information about the ubuntu-users mailing list