Nfs: Difference between revisions

From Cheatsheet
Jump to navigation Jump to search
No edit summary
Line 47: Line 47:
  rpcinfo -p
  rpcinfo -p


== setting up the client ==
== Setting up the client ==
This wont work if you didnt do the [[Nfs]]
First make your mount point.
mkdir -p /path/to/mnt/point
Next mount the NFS share as follows.

Revision as of 22:03, 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 Nfs First make your mount point.

mkdir -p /path/to/mnt/point

Next mount the NFS share as follows.