On 04/09/2015 06:15 AM, Tom Horsley wrote:
I've got a system running centos 7 hosting lots of filesystems
available for NFS mounting.
I've got a gazillion virtual machines that need to have their
fstab edited to mount these filesystems.
I've now discovered that mechanically editing the fstab doesn't
work. On most of the VMs, if I say something like this:
bob:/builder /bob/builder nfs rw,bg,hard,rsize=8192,wsize=8192 0 0
then everything "just works", but as I go back in time, when I get
to a machine running fedora 11, I get the highly informative
"incorrect mount option" message. With lots of experimentation,
I eventually found that I could change the type from "nfs" to "nfs4"
and the mount would work.
Is there a guide somewhere for which idioms to use for which version
of linux I want to mount in? Is there any way to automate adding
these fstab entries correctly? I thought the nfs server was supposed
to automatically fall back to old protocols if the client didn't know
something, am I missing some sort of configuration on the centos 7 host?
The older "nfs" thing generally means NFSv3 or later, but I think it
prefers NFSv3. Specifying "nfs4" means NFSv4 and newer only. This can
also be done via using "nfs" as the filesystem type, but adding
"nfsvers=4" in the options for the mount (e.g. "rw,hard,nfsvers=4").
CentOS 7 may default to offering only NFSv4 (ugh!). You can check this
by doing "rpcinfo -p NFS-server-name-or-IP-address" and looking at the
"nfs" lines. The version number that NFS supports will be listed in the
"vers" (second) column of the display.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital ricks(a)alldigital.com -
- AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 -
- -
- Let us think the unthinkable. Let us do the undoable. Let us -
- prepare to grapple with the ineffable itself, and see if we may -
- not eff it up after all. -
- -- Douglas Adams -
----------------------------------------------------------------------