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.