LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-01-2013, 05:58 PM   #1
nokia3310
LQ Newbie
 
Registered: May 2013
Posts: 18

Rep: Reputation: Disabled
Problems mounting NFS please help


I have been trying to mount NFS file system..tried different machines running Centos 6.4 and i've been running into one problem or the other...i have followed tutorials and have done everything right i believe but i just keep getting errors..the funny part is mounting nfs is not consistent in my opinion..its like a lottery system..it works one day and doesnt the other...just tired of it


I have tried 2 different VMs

1st Centos 6.4 VM error
Code:
mount -v -t nfs -o 'vers=3' 192.168.1.34:/home/vm1/Desktop/nfs /home/vm1/Desktop/nfs-mount
error
Code:
mount: special device 192.168.1.34:/home/vm1/Desktop/nfs does not exist
now it does exist because exportfs gives me

Code:
/home/vm1/Desktop/nfs
             192.168.1.34
2nd Centos 6.4 VM error
Code:
mount -v -t nfs -o 'vers=3' 192.168.1.39:/home/vm1/Desktop/nfs /home/vm1/Desktop/nfs-mount

error
Code:
mount.nfs: timeout set for Wed May  1 18:34:13 2013
mount.nfs: trying text-based options 'vers=3,addr=192.168.1.39'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query retrying: RPC: Program not registered
mount.nfs: prog 100003, trying vers=3, prot=17
mount.nfs: portmap query failed: RPC: Program not registered
mount.nfs: requested NFS version or transport protocol is not supported
now it does exist because exportfs gives me

Code:
/home/vm1/Desktop/nfs
             <world>

NOTE:

Yes nfs and rpcbind(previously portmap) are all running and yes i added port 2049(nfs) and 111(rpc)
I have even added extra ports from /etc/sysconfig/nfs like 662, 875, 892, 32769, 32803 pretty much all of the ports in that file and uncommented certain things...basically i have done it all....so why am i getting problem mounting this thing? Also realize i was successful one time before inwhich i pretty much did same thing as i have done now but for some reason this thing is more of a luck..one day it works the other it doesn't
 
Old 05-01-2013, 06:32 PM   #2
TroN-0074
Senior Member
 
Registered: Dec 2011
Location: Michigan USA
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444

Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
Just try
Code:
mount -v -t nfs -o 'vers=3' //192.168.1.34:/nfs /home/vm1/Desktop/nfs-mount
and tell us what happens

you can also try
Code:
mount -t cifs -o username=<username>,password='<password>' //serverIP/share /mountpoint
 
Old 05-01-2013, 06:42 PM   #3
smedley76
LQ Newbie
 
Registered: Oct 2012
Posts: 13

Rep: Reputation: Disabled
have you tried reading this tutorial?
 
Old 05-01-2013, 06:53 PM   #4
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
what does your exports look like? it should look something like the following::

Code:
cat /etc/exports 
#
#	/etc/exports

#	NFS4
/exports *(rw,insecure,subtree_check,crossmnt,fsid=0)

#	NFSv3
/exports/centos/public *(rw,insecure,no_subtree_check,fsid=3010)
/exports/NFS_TV_Shows *(rw,insecure,no_subtree_check,fsid=3020)
note my exports has both NFSv3 and NFSv4, they are mounted differently. also note the fsid=### are all unique.

when mounting you would use the following:

Code:
mount -t nfs jackknife:/exports /Users/ssma/Desktop/LVM/
note i am not using -o 'vers=3' the default is NFSv3 unless you specify nfs4

Code:
mount -t nfs4  jackknife:/exports /home/users/nfs
 
Old 05-01-2013, 08:04 PM   #5
nokia3310
LQ Newbie
 
Registered: May 2013
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by smedley76 View Post
have you tried reading this tutorial?
I have done more than what that tutorial has...you should read my thread/question..the whole thing
 
Old 05-01-2013, 08:06 PM   #6
nokia3310
LQ Newbie
 
Registered: May 2013
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by lleb View Post
what does your exports look like?
1st
cat /etc/exports

Code:
/home/vm1/Desktop/nfs 192.168.1.34(rw,sync)
2nd
cat /etc/exports

Code:
/home/vm2/Desktop/nfs *(rw,sync)
 
Old 05-01-2013, 08:08 PM   #7
nokia3310
LQ Newbie
 
Registered: May 2013
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TroN-0074 View Post
Just try
Code:
mount -v -t nfs -o 'vers=3' //192.168.1.34:/nfs /home/vm1/Desktop/nfs-mount
and tell us what happens

you can also try
Code:
mount -t cifs -o username=<username>,password='<password>' //serverIP/share /mountpoint
1st

Code:
[root@vm1 ~]# mount -v -t ext4 -o 'vers=3' //192.168.1.34:/home/vm1/Desktop/nfs /home/vm1/Desktop/nfs-mount
mount: special device //192.168.1.34:/home/vm1/Desktop/nfs does not exist
[root@vm1 ~]# mount -v -t ext4 -o 'vers=3' //192.168.1.34:/nfs /home/vm1/Desktop/nfs-mount
mount: special device //192.168.1.34:/nfs does not exist
2nd
Code:
[root@vm2 ~]# mount -v -t nfs -o 'vers=3' //192.168.1.39:/nfs /home/vm2/Desktop/nfs4
mount.nfs: Failed to resolve server //192.168.1.39: Name or service not known
[root@vm2 ~]# mount -v -t nfs -o 'vers=3' 192.168.1.39:/home/vm1/Desktop/nfs /home/vm2/Desktop/nfs4
mount.nfs: timeout set for Wed May  1 21:12:43 2013
mount.nfs: trying text-based options 'vers=3,addr=192.168.1.39'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query retrying: RPC: Program not registered
mount.nfs: prog 100003, trying vers=3, prot=17
mount.nfs: portmap query failed: RPC: Program not registered
mount.nfs: requested NFS version or transport protocol is not supported
[root@vm2 ~]# mount -v -t nfs -o 'vers=3' //192.168.1.39:/home/vm1/Desktop/nfs /home/vm2/Desktop/nfs4
mount.nfs: Failed to resolve server //192.168.1.39: Name or service not known
[root@vm2 ~]# mount -v -t nfs -o 'vers=3' //192.168.1.39:/nfs /home/vm2/Desktop/nfs4
mount.nfs: Failed to resolve server //192.168.1.39: Name or service not known

Last edited by nokia3310; 05-01-2013 at 08:12 PM.
 
Old 05-02-2013, 02:24 AM   #8
nokia3310
LQ Newbie
 
Registered: May 2013
Posts: 18

Original Poster
Rep: Reputation: Disabled
for some reason it worked when i used -vvv option with mount
see below for series of commands...i will like to know what happened


Code:
[root@vm1 ~]# showmount -e
Export list for vm1.system.com:
/home/vm1/Desktop/nfs 192.168.1.34
[root@vm1 ~]# showmount -e 192.168.1.34
Export list for 192.168.1.34:
/home/vm1/Desktop/nfs 192.168.1.34
Code:
[root@vm1 ~]# mount -vvv -o 'vers=3' 192.168.1.34:/home/vm1/Desktop/nfs /home/vm1/Desktop/nfs-mount
mount: fstab path: "/etc/fstab"
mount: mtab path:  "/etc/mtab"
mount: lock path:  "/etc/mtab~"
mount: temp path:  "/etc/mtab.tmp"
mount: UID:        0
mount: eUID:       0
mount: no type was given - I'll assume nfs because of the colon
mount: spec:  "192.168.1.34:/home/vm1/Desktop/nfs"
mount: node:  "/home/vm1/Desktop/nfs-mount"
mount: types: "nfs"
mount: opts:  "vers=3"
final mount options: 'vers=3'
mount: external mount: argv[0] = "/sbin/mount.nfs"
mount: external mount: argv[1] = "192.168.1.34:/home/vm1/Desktop/nfs"
mount: external mount: argv[2] = "/home/vm1/Desktop/nfs-mount"
mount: external mount: argv[3] = "-v"
mount: external mount: argv[4] = "-o"
mount: external mount: argv[5] = "rw,vers=3"
mount.nfs: timeout set for Thu May  2 03:15:10 2013
mount.nfs: trying text-based options 'vers=3,addr=192.168.1.34'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.1.34 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.1.34 prog 100005 vers 3 prot UDP port 892
192.168.1.34:/home/vm1/Desktop/nfs on /home/vm1/Desktop/nfs-mount type nfs (rw,vers=3)
Code:
[root@vm1 ~]# telnet 192.168.1.34 2049
Trying 192.168.1.34...
Connected to 192.168.1.34.
Escape character is '^]'.
 
Old 05-02-2013, 02:41 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,949

Rep: Reputation: 7326Reputation: 7326Reputation: 7326Reputation: 7326Reputation: 7326Reputation: 7326Reputation: 7326Reputation: 7326Reputation: 7326Reputation: 7326Reputation: 7326
probably I misunderstood, but:
exportfs runs on a <server-host> and will display <dir> <client-host> and it means <dir> is available from <client-host> (which is normally not the local host).
mount will run on the <client-host> and will try to reach the server and requests access to <dir>.

I do not know if 192.168.1.34 is your client host, server host or both?? What are the IP's of your VMs and the real host?
 
Old 05-02-2013, 02:48 AM   #10
nokia3310
LQ Newbie
 
Registered: May 2013
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
probably I misunderstood, but:
exportfs runs on a <server-host> and will display <dir> <client-host> and it means <dir> is available from <client-host> (which is normally not the local host).
mount will run on the <client-host> and will try to reach the server and requests access to <dir>.

I do not know if 192.168.1.34 is your client host, server host or both?? What are the IP's of your VMs and the real host?
192.168.1.34 both client and server
 
Old 05-02-2013, 06:53 AM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,363

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Each VM & host must have a unique/non-shared IP.

I was beginning to wonder this (pan64's qn) about your system myself...

Read Chap 18 http://www.linuxtopia.org/online_boo...ion/index.html
Also howto http://www.linuxhomenetworking.com/w...ccess_with_NFS

Last edited by chrism01; 05-02-2013 at 06:54 AM.
 
Old 05-02-2013, 02:04 PM   #12
nokia3310
LQ Newbie
 
Registered: May 2013
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
Each VM & host must have a unique/non-shared IP.

I was beginning to wonder this (pan64's qn) about your system myself...

Read Chap 18 http://www.linuxtopia.org/online_boo...ion/index.html
Also howto http://www.linuxhomenetworking.com/w...ccess_with_NFS
So you are saying one cannot use the same VM or system as server and as client?
Well i have seen a video tutorial do that...so why can't i? same thing i am saying about Linux not been consistent..why work in one place and not with me?
 
Old 05-02-2013, 02:57 PM   #13
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,751

Rep: Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929
Yes, you should be able to mount a nfs share on the same computer that is running the server.

With a quick glance the only difference that I see between commands in your posts is:
Quote:
mount //serverip:/share /mnt/point
vs
Quote:
mount serverip:/share /mnt/point
The second being the correct syntax. I am not sure why -vvv vs -vvv works at the moment.

Last edited by michaelk; 05-02-2013 at 02:59 PM.
 
Old 05-02-2013, 08:45 PM   #14
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,363

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
That clarifies things a bit. As above, you can nfs export to yourself, but its very unusual, unless its just for experimentation.
Anyway, check those links, they're very helpful.
 
Old 05-02-2013, 11:27 PM   #15
nokia3310
LQ Newbie
 
Registered: May 2013
Posts: 18

Original Poster
Rep: Reputation: Disabled
I think i found what the problem was...i the problem was where/location i was creating the nfs and the mount point...when i tried creating nfs in different location it was seemless

Code:
[root@vm3 ~]# exportfs
/share/nfs    	192.168.1.38
[root@vm3 ~]# cat /etc/exports
/share/nfs            192.168.1.38(rw,sync)
[root@vm3 ~]# showmount -e 192.168.1.38
Export list for 192.168.1.38:
/share/nfs 192.168.1.38
[root@vm3 ~]# mount
/dev/mapper/vg_sda2-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
/dev/sr0 on /media/VBOXADDITIONS_4.2.12_84980 type iso9660 (ro,nosuid,nodev,uhelper=udisks,uid=500,gid=500,iocharset=utf8,mode=0400,dmode=0500)
//LOCALHOST/samba on /samba-mount type cifs (rw)
[root@vm3 ~]# mount -t nfs -o rw,sync 192.168.1.38:/share/nfs /nfs-mount
[root@vm3 ~]# mount
/dev/mapper/vg_sda2-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
/dev/sr0 on /media/VBOXADDITIONS_4.2.12_84980 type iso9660 (ro,nosuid,nodev,uhelper=udisks,uid=500,gid=500,iocharset=utf8,mode=0400,dmode=0500)
//LOCALHOST/samba on /samba-mount type cifs (rw)
192.168.1.38:/share/nfs on /nfs-mount type nfs (rw,sync,vers=4,addr=192.168.1.38,clientaddr=192.168.1.38)
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems mounting Netgear NAS drive with CIFS, NFS. Cenobite Linux - Networking 1 07-07-2010 01:52 AM
Problems mounting drives in NFS Veteq Linux - Software 1 11-19-2005 01:17 PM
nfs client on knoppix 3.9 - problem mounting nfs drive Rod Butcher Linux - Networking 1 09-21-2005 04:18 AM
Problems in Mounting via NFS fahad26 Linux - Networking 2 05-12-2005 03:16 AM
problems with mounting nfs in redhat 9 jalsk Linux - General 2 01-04-2004 02:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:17 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration