LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 03-09-2011, 10:58 PM   #1
axel_2078
LQ Newbie
 
Registered: Jun 2010
Location: Fairview Heights, IL
Distribution: Fedora
Posts: 8

Rep: Reputation: 0
(Scientific Linux 6)- can't mount nfs shares


For some strange reason, I can't seem to be able to mount the nfs share from my FreeNAS system on SL6. I'm able to do it just fine from Ubuntu 10.04, Linux mint 9, Fedora 14, CentOS 5.5, and OS X Snow Leopard, so it has to be something specific to SL6. The below command does not work:
mount freenas:/mnt/share /test
I get a mount.nfs error message that says "requested NFS version or transport protocol is not supported."
I also tried this command which yielded the same result:
mount -t nfs FreeNAS:/mnt/share /test

Am I doing something wrong or is this just a bug with SL6?
 
Old 03-11-2011, 08:43 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,766
Blog Entries: 4

Rep: Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697
Quote:
requested NFS version or transport protocol is not supported
That is telling you there is a mismatch in the NFS version.

You can specify nfs version on the mount command. On your SL system type "man mount.nfs" to see what versions it supports. I don't use SL - the man page on my CentOS5 system says in part:

Quote:
version
Specify NFS file system version. Either nfs4 or nfs. If the
command is mount.nfs4 or the vfstype option of mount(8) command
is nfs4, then version 4 is used, else version 3 or 2 is used.
 
Old 03-15-2011, 08:56 AM   #3
mikey99
Member
 
Registered: Nov 2008
Location: UK
Distribution: RHEL, Fedora
Posts: 68

Rep: Reputation: 12
Quote:
Originally Posted by MensaWater View Post
That is telling you there is a mismatch in the NFS version.
Correct. Don't forget, the default in RHEL6 (and I presume SL6) is NFSv4. For RHEL6 clients, you can just use the mount command with no options. If you use -t nfs it attempts to connect using nfs4 and if not available, drops to nfs3.

If you want to force the client to mount using version3, then mount using the vers=3 option in fstab. Look in /proc/mount (specifically vers= option) to see which version a mount is using.
 
Old 03-16-2011, 08:54 AM   #4
axel_2078
LQ Newbie
 
Registered: Jun 2010
Location: Fairview Heights, IL
Distribution: Fedora
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mikey99 View Post
Correct. Don't forget, the default in RHEL6 (and I presume SL6) is NFSv4. For RHEL6 clients, you can just use the mount command with no options. If you use -t nfs it attempts to connect using nfs4 and if not available, drops to nfs3.

If you want to force the client to mount using version3, then mount using the vers=3 option in fstab. Look in /proc/mount (specifically vers= option) to see which version a mount is using.
The problem is, I don't think the latest stable FreeNAS supports NFSv4 exports...only nfs3. So how would I force SL6 to try to mount the nfs share on FreeNAS? I have a feeling I'll run into the same problem when CentOS 6 rolls out too (5.5 works just fine though). Would I use the below command?

mount vers=3 freenas:/mnt/data /test
 
Old 03-16-2011, 06:05 PM   #5
axel_2078
LQ Newbie
 
Registered: Jun 2010
Location: Fairview Heights, IL
Distribution: Fedora
Posts: 8

Original Poster
Rep: Reputation: 0
SOLVED! Guys, my sincerest apologies. This turned out to be simply a ID10T error. I just re-examined my /etc/auto.nfs file and found a typo in the path of my nfs export from the server. It was set to mount a directory that didn't exist on the server. I was tired when I set this up and had a lot on my mind. Once I changed it to the correct path, everything worked and I was able to mount it via automount.
 
Old 03-17-2011, 04:11 PM   #6
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,766
Blog Entries: 4

Rep: Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697
Glad you solved it. Please go to Thread Tools and mark it Resolved. That way anyone else having an issue in the future can see your solution.

FYI: When you are testing something like automounter a good sanity check is to simply try mounting the filesystem manually at another mount point. That way you can determine if it truly is an NFS issue or an automounter issue. (That is to say it sometimes helps to go to basic tools when you're having an issue with complex ones to help narrow the problem down.)
 
Old 03-18-2011, 09:00 AM   #7
axel_2078
LQ Newbie
 
Registered: Jun 2010
Location: Fairview Heights, IL
Distribution: Fedora
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by MensaWater View Post
FYI: When you are testing something like automounter a good sanity check is to simply try mounting the filesystem manually at another mount point. That way you can determine if it truly is an NFS issue or an automounter issue. (That is to say it sometimes helps to go to basic tools when you're having an issue with complex ones to help narrow the problem down.)
That's very good advice and that's actually what I did to discover the problem. I had been trying to get this working with automount for a couple days and was almost ready to pull my hair out. Then, the next day, I tried doing it manually using the mount command and mounted it to a test directory I had created and it worked! I then unmounted it and tried mounting it to another directory and it worked again! Then I decided to look over my /etc/auto.master and /etc/auto.nfs files again. The auto.master file was fine, but the auto.nfs file had the wrong directory path in it. That one mistake cost me several hours of troubleshooting.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to mount NFS shares on clients when server starts? HellesAngel Linux - Server 4 05-03-2010 02:55 PM
why do I have to mount NFS shares manually in ubuntu 9.04? lxuser Linux - Networking 3 07-12-2009 11:55 PM
Mount foreign NFS shares gypsy_rabbi Linux - Laptop and Netbook 1 04-07-2005 12:45 PM
automatically mount NFS shares turbo_acura Linux - Networking 1 10-28-2004 05:33 PM
How do you mount NFS shares? Thaidog Linux - Newbie 1 04-04-2004 09:48 PM


All times are GMT -5. The time now is 10:33 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration