Believe it or not, this isn’t actually clearly documented anywhere. Due to my issues with the way NFSv4 works on Linux, I’ve had to disable NFSv4 on SLES10 and RHEL4 in order for my Linux mounts to play nicely with Solaris 10’s automountd.
Doing this on SLES was very easy, just change ‘NFS4_SUPPORT="yes"‘ to ‘NFS4_SUPPORT="no"‘ in /etc/sysconfig/nfs. However, this doesn’t work on RHEL. It reads the file, but doesn’t do anything with this variable.
A quick bit of script reading revealed how to do it. /etc/init.d/nfs passes the contents of $RPCNFSDARGS to rpc.nfsd when it starts it. This variable isn’t declared anywhere, so we’ll use it to disable NFSv4 as follows:
# echo "RPCNFSDARGS='--no-nfs-version 4'" >> /etc/sysconfig/nfs
# service nfs --full-restartThat’s it. Now NFSv4 on RedHat Enterprise Linux will be disabled, and it’ll apply on future reboots too.
I suspect the same procedure will apply to Centos 4 and possibly later releases of RHEL. I’ve not checked these though.
Update: David, has kindly provided the details for disabling NFSv4 on RHEL 5 in the comments. Thanks David.
Search
Related Entries
- NFSv4 On Linux is Broken
- HOWTO: Multi-boot Solaris, RHEL, SLES and Nevada
- RedHat Kernel Crash Dumps
- Linux Troll Attempts to Debunk ZFS
- Sun Announces Sun SPARC Enterprise Servers
- Solaris 10 8/07 (aka update 4) is Now Available.
- Links for 3 August 2007
- Solaris Trusted Extensions vs RHEL5’s LSPP
- Links for 14 Nov 2008 - 1 Dec 2008
- lildude.co.uk Now Takes OpenIDs



That’s just another proof that Linux isn’t one but is many. Each distro has its own way of doing things, you can’t learn them all because one day you are gonna end up a different way to do things. These days, most commercial software needs to be distro compatible, not Linux compatible.
Can I say that I really hate that!
I can see how that would piss off a lot of developers, especially when it comes to things like documented interfaces and backwards compatibility (or should I say lack there of).
Thanks, this tip solved my problem (I’m useing CentOS).
Thanks! Had an issue with Solaris connecting to linux nfs server. Error message when mounting was “Not Owner”.
Turns out they were trying to use v4. Now it’s off and things work fine.
This saved me from changing some thirty odd solaris 10 machines client side with a single server side fix. Thanks.
After running into the same issue with no documentation on this. I opened a ticket with RedHat support to see what there recommended way of disabling NFS4 on RHEL5.3 and received the following response. For what it’s worth I thought I would share:
Please add the following line to /etc/sysconfig/nfs file to disable nfsv4 support.
RPCNFSDARGS=”-N 4″
then restart nfs service
# service nfs restart
stop rpcidmapd service.
# service rpcidmapd stop
# chkconfig rpcidmapd off
Thanks David.
David, for what it’s worth, that’s the same thing as the original post.
‘-N 4′ is shorthand for ‘–no-nfs-version 4′
See: man nfsd
You’ll also note that, unfortunately, even though there is a separate rpc.idmapd service that you can toggle off, the nfs server still starts rpc.idmapd on its own.
I have finally been able to get Fedora core 12 to play nice with Solaris 10 (NFSv4 server, NIS master, and ZFS home dirs).
Before I get too far into this, I’d like to say I left the CentOS and RHEL servers alone.
I was able to get the Linux nodes to mount only NFSv3 via the auto.home map.
* -fstype=nfs,vers=3,noatime,async,wsize=32768,rsize=32768 192.168.56.90:/zfs/homes/&
HOWEVER, I was finally able to get at least one linux machine (recent Fedora 12) to auto-mount my home dir over ZFS NFSv4 server.
The trick is was to edit some files:
* The “domain” line in /etc/resolv.conf
“domain foobar.com”
* The NIS DOMAIN name in /etc/sysconfig/network
“NISDOMAIN=foobar.com”
* The NFSv4 DOMAIN in /etc/idmapd.conf
“Domain = foobar.com”
* For troubleshooting Linux NFSv4, enable verbose logging in /etc/idmapd.conf
“Verbosity = 3″
* The /etc/nsswitch.conf file contained dns BEFORE nis, and files AFTER nis.
“hosts: dns nis files”
* The FQDN of the Solaris Server, and FQDN of the client in /etc/hosts.
NOTE: it’s important to have the FQDN before any short hostnames
* Test the NFSv4 mount manually
“mount -t nfs4 voidhawk:/zfs/homes /mnt”
* Verify Linux used nfs4 with the /proc/mounts pseudo file.
“cat /proc/mounts”
If everything worked, you can setup the auto.home map to use “vers=4″, or configure Solaris 10 to disable anything bellow version 4 in /etc/default/nfs.
So far I’ve been able to get CentOS 5.3 to mount nfs4 exports on Solaris 10, but not able to get CentoOS5.3 to auto-mount the NFSv4 from Solaris10. It seems the newer version of linux have solved this (E.G. Fedora > RHEL-5.3/CENT-5.3)
So in the mean time I’ve stopped using the “vers=” export (share) option on the auto.home map. Just specify “-fstype=nfs” and have no version, and the Linux side will default to version 3, while the Solaris clients will continue to use version 4.
Thanks for the detailed procedure Jon.