Nfs: Difference between revisions
Line 47: | Line 47: | ||
=== Setting up the client === | === Setting up the client === | ||
This wont work if you didnt do the [http://shooltz.net/w/index.php?title=Nfs#Prep_work Prep] work | |||
This wont work if you didnt do the [http://shooltz.net/w/index.php?title=Nfs#Prep_work Prep] work. | |||
First make your mount point. | First make your mount point. | ||
mkdir -p /path/to/mnt/point | mkdir -p /path/to/mnt/point | ||
Next mount the NFS share as follows. | Next mount the NFS share as follows. | ||
mount 10.34.39.132:/Remote/share/ /path/to/mnt/point/ | |||
After this you should be able to cd into the mount dir and test. |
Revision as of 22:09, 19 April 2013
NFS
First on all server involved there is some prep work.
Prep work
Deal with the firewall, this should only be done over a private network if you are using this wiki.
Figure out the nic for their private network, in most cases this will be eth1. Go into the firewalls config file and do the following.
APF
vim /etc/apf/conf.apf change this IFACE_TRUSTED="" to IFACE_TRUSTED="eth1"
CSFETH_DEVICE_SKIP
vim /etc/csf/csf.conf change this ETH_DEVICE_SKIP="" to ETH_DEVICE_SKIP="eth1"
Restart the firewall.
Enable the required services
chkconfig --add portmap chkconfig portmap on chkconfig nfs on portmap /etc/init.d/nfs restart
Setting up the server side
To setup the server we need to specify the share in the exports file.
vim /etc/exports
Add a line that looks like this, but change to match your needs.
Path Server-1-ip(options) server-2-ip(options) etc... /home/wenoheal/data_prod/ 10.34.39.134(rw,anonuid=520,anongid=520) 10.34.39.133(rw,anonuid=520,anongid=520)
Save the file, and reload the nfs config as follows.
exportfs -ra
You can now also check the current loaded config with the following.
exportfs -v
Also if you want to see what random ports that portmap chose run the following command.
rpcinfo -p
Setting up the client
This wont work if you didnt do the Prep work.
First make your mount point.
mkdir -p /path/to/mnt/point
Next mount the NFS share as follows.
mount 10.34.39.132:/Remote/share/ /path/to/mnt/point/
After this you should be able to cd into the mount dir and test.