Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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
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?
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?
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?
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.
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)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.