Hello,
I have an NFS server running on FreeBSD 9.1 that I would like to configure to only allow clients to mount shares using version 4. Any requests for anything else should be denied. I have a proprietary system that supports such a configuration, for example:
If I try to mount this filesystem somewhere else using version 3, it will fail.
If I use version 4, the attempt to mount will succeed:
On the client (RHEL 6.2), the main nomenclature that I see "at a glance" with servers that permit NFSv4 only is
On my FreeBSD server, as well as on a storage platform we are evaluating (EMC Isilon), I can allow NFS, but I want to only permit version 4.
The following sites showed how to configure my FreeBSD server for NFS:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-nfs.html
http://forums.freebsd.org/showthread.php?t=23526
Based on those links I configured my server as follows:
From the client side, using version 3.
From the client side, using version 4.
Any guidance and information that you can is greatly appreciated.
Radesh Singh
I have an NFS server running on FreeBSD 9.1 that I would like to configure to only allow clients to mount shares using version 4. Any requests for anything else should be denied. I have a proprietary system that supports such a configuration, for example:
If I try to mount this filesystem somewhere else using version 3, it will fail.
Code:
[CMD][root@hostname_obscured mnt]# df -TP /dir/obscured[/CMD]
Filesystem Type 1024-blocks Used Available Capacity Mounted on
nfs_only:/v4share_only nfs4 10325760 268192 10057568 3% /dir/mountpoint
[CMD][root@hostname_obscured mnt]# mount -o nfsvers=3 nfs_only:/v4share_only /dir/test/[/CMD]
mount.nfs: access denied by server while mounting nfs_only:/v4share_only
Code:
[CMD][root@hostname_obscured mnt]# mount -o nfsvers=4 nfs_only:/v4share_only /dir/test/[/CMD]
[CMD][root@lnxb40403 mnt]# echo $?[/CMD]
0
df -T
(on the Linux client), reports those shares as nfs4, versus servers that permit either NFSv4 or earlier simply report the mount as an "nfs" mount.On my FreeBSD server, as well as on a storage platform we are evaluating (EMC Isilon), I can allow NFS, but I want to only permit version 4.
The following sites showed how to configure my FreeBSD server for NFS:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-nfs.html
http://forums.freebsd.org/showthread.php?t=23526
Based on those links I configured my server as follows:
Code:
[CMD][user@freebsd_server ~]$ cat /etc/exports[/CMD]
V4: / -network 192.168.0.0 -mask 255.255.255.0
/usr/local/nfs4_root/data -maproot=root nfs_client.company.com
Code:
[CMD][root@nfs_client ~]# showmount -e freebsd_server[/CMD]
Export list for freebsd_server:
/usr/local/nfs4_root/data nfs_client.company.com
[CMD][root@nfs_client ~]# mount -onfsvers=3 freebsd_server:/usr/local/nfs4_root/data /mnt[/CMD]
[CMD][root@nfs_client ~]# echo $?[/CMD]
0
[CMD][root@nfs_client ~]# df -TP /mnt[/CMD]
Filesystem Type 1024-blocks Used Available Capacity Mounted on
freebsd_server:/usr/local/nfs4_root/data nfs 430894720 10113408 420781312 3% /mnt
Code:
[CMD][root@nfs_client ~]# umount /mnt[/CMD]
[CMD][root@nfs_client ~]# mount -onfsvers=4 freebsd_server:/usr/local/nfs4_root/data /mnt[/CMD]
[CMD][root@nfs_client ~]# echo $?[/CMD]
0
[CMD][root@nfs_client ~]# df -TP /mnt[/CMD]
Filesystem Type 1024-blocks Used Available Capacity Mounted on
freebsd_server:/usr/local/nfs4_root/data nfs 430894720 10113408 420781312 3% /mnt
Radesh Singh