Web Hosting Talk







View Full Version : setting up NFS share


caligal
08-12-2005, 12:30 PM
:confused:
I've been practicing how to set up an NFS share. i was told at first to set up one on my own box and i did. i merely had 2 accounts with to home dirs and made an entry in the /etc/exports file using the NFS server config tool. However, i have tried to set up a share on a co-workers box with permissions of course. But is not working. I have even tried to follow pre-exisiting entries in the /etc/exports file of one of our servers and the fstab and mtab entries of a former employee working on the box I now have. There must be somthing i just don't understand except everything. I will change names and numbers for security in my example.
Sever (coworker's)= radon IP=xx.xx.xx.1
client(myself)= iron IP = xxx.xx.xx.0

radon /etc/export entry

#this is to export my home directory from this machine "radon" ip=xx.xx.xx.1 to
# my home directory on my box "iron", ip=xxx.xx.xx.0 .

/home/caligal xx.xx.xx.1/255.xxx.x.x(rw,insecure,sync,no_wdelay,no_subtree_check,insecure_locks,all_squash,anonuid=520)

iron /etc/fstab entry

radon:/home/caligal /mnt/radon/home/caligail nfs rw,hard,intr,addr=xx.xx.xx.1 0 0

I have even entered and entry into the /etc/mtab on my box (iron) file like this

radon:/home/caligal /mnt/radon/home/caligal nfs rw,hard,intr,addr=xx.xx.xx.1 0 0
When i try to mount the /home/caligal directory from the server onto my client box
can't find radon/home/caligalin fstab or mtab
this is not true the entry is there.
Before i was getting messages the the directory does not exist
cannot find radon_so iput in the ip address in the mtab
now i get messages regarding the above fstab entries whether i try to mount the home/caligal directory form either machine. PLEASE HELP!

andren
08-15-2005, 01:44 PM
What are the error messages?

caligal
08-16-2005, 12:33 PM
first this is the command i put in to try to mount the home directory on radon
[caligal@iron etc]$ mount radon/home/caligal
then i get this error below:
mount: can't find radon/home/caligal in /etc/fstab or /etc/mtab

andren
08-17-2005, 10:57 AM
It should be "mount /mnt/radon/home/caligail" according to your first posts fstab entry.

I think you are confused about the mount points: You want to have acces to /home/caligal on ion, right? You can mount it as /mnt/radon or whatever you like, it means that /home/caligal on radon is then /mnt/radon on your ion computer. (Note: the /home/caligal path is not exported, just the contents of that directory)

Do the following steps:

1. Check that ping works, both directions (with names and IP numbers)
2. Make sure that the mount directory exists on ion (/mnt/radon/home/caligal), but read the stuff above
3. change the fstab on ion to
xxx.xxx.xxx.1:/home/caligal /mnt/radon/home/caligal nfs rw 0 0
4. check that netmount and portmap are running on ion (rc-status or similar, depending on your flavor of Linux)
5. take out as much stuff from the export file options as you can (adding later is easier) mine is (async,no_root_squash,no_subtree_check,rw)
6. run "exportfs -ra" on radon (updates the nfs configuration)
7. restart the nfs service ("/etc/init.d/nfs restart" or similar, depends on type of Linux)

If you have a firewall - it may block nfs.

Hope that helps. You can PM me if you have questions.
-andre