Page 1 of 1

Mounting NFS shares

Posted: 28. Sep 2014, 21:55
by gjohnson
Existing NFS exports on my CentOS 6.x server. I've had the toughest time mounting these exports until someone suggested the following:

Code: Select all

mount -t nfs -o nfsvers=4 10.0.0.17:/script /mnt/script
This works.

I'm primarily a Fedora user and typically these shares are extremely simple to mount, but not so with Salix. I'm not complaining. I'm fully aware that all Linux distros are not created equally. Can anyone shed some light here? Is this the accepted method or have I missed something? I've spent a considerable amount of time searching on how to do this but anything I find seems extremely complex and none of it has worked.

Before being handed the solution within the code tags I was using the following, with attached result ...

Code: Select all

mount -t nfs 10.0.0.17:/script /mnt/script -v

mount.nfs: timeout set for Sat Sep 20 16:22:48 2014
mount.nfs: trying text-based options 'addr=10.0.0.17'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query failed: RPC: Remote system error - No route to host
Comments welcome and thanks for reading.

Re: Mounting NFS shares

Posted: 29. Sep 2014, 09:52
by gapan
If you're using nfs4 in your server, you have to specify that during mount. Otherwise mount defaults to version 3. Nothing strange about that. I'm guessing centos and fedora, unlike slackware (and debian+derivatives as far as I know), defaults to version 4 though, so you have to specify that explicitly.

Also see:

Code: Select all

man mount.nfs