Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have two systems and I need to setup a folder on one of them that is completely read/write-able by the other.

Questions:
1) How do I setup NFS on the server(s)? It is not installed as an available filesystem/module.
2) Where should I place this folder / what is the conventional place for locating such shared folders?

This is a RHEL5 system.


Error with setting up NFS.

This is what I did on server1 on which I want to share a local folder with server0

  1. In /etc/exports , I added
    /home/els1-share 199.199.82.98(rw,sync)

  2. mkdir /home/els1-share

  3. Enabled nfs and portmap through
    ntsysv

  4. Started services:

/etc/init.d/portmap start
Starting portmap: [ OK ]

/etc/init.d/nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]

Now, on server0, I did
1. mkdir /home/els1-share
2. mount 199.199.82.130:/home/els1-share /home/els1-share

which timed out with:
mount: mount to NFS server '199.199.82.130' failed: System Error: Connection timed out.

The IP addresses have been obfuscated, otherwise the output is exact.

share|improve this question

3 Answers 3

yum -y install nfs-utils portmap

Prepare and modify /etc/exports for sharing files, that would similar to as shown below

/home/NFS-files 192.168.100.0/24(ro,sync)

/home/NFS-share */26(rw,sync)

/ISO 192.168.100.0/24(ro,sync)

service portmap start

service nfs start
share|improve this answer
    
Hi - this is on the server on which the folder exists locally? What do I have to do on the server which is accessing this share? –  TWord Sep 7 '10 at 17:39
1  
if you have 192.168.100.20 nfs server and you have share /data folder which you want to mount to 192.168.100.21 so run the following command $mount 192.168.100.20:/data /nfs-data and then df -h studyhat.blogspot.com/2010/05/… –  Rajat Sep 7 '10 at 17:58
    
Hi. It didnt quite work... can you have a look at the edit please? –  TWord Sep 8 '10 at 7:18
    
@TWord: Do you have a firewall enabled? Check out the output of "iptables -vL" -- also if you have SELinux enabled (check that with "getenforce"), it can deny all sorts of things. –  Janne Pikkarainen Sep 8 '10 at 7:46
    
Hi Janne - it gives a lot of output / what exactly should i be looking for? This is on RHEL5. –  TWord Sep 8 '10 at 8:01

the common placement of NFS exports is outside any os controlled areas ( /usr /etc /var ) usually in another area called /exports

If you are automounting home directories under /home this will change your placement.

Usage of the showmount -e to verify is very helpful.

Enjoy. fe007

share|improve this answer

Make sure you have also started nfs and portmap on the client. To test NFS works, turn of the firewall on both servers temporarily if possible with the command:

service iptables stop
share|improve this answer
    
woah... would doing "service iptables start" get things back to normal?? –  TWord Sep 8 '10 at 8:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.