NFS Server Config
Download and install the nfsutils etc... or use your yum repo like i did:
yum -c http://yum.pvalentino.lan/repository/patch/current/rhel5-x86_64.conf -y install nfs* portmap
Turn Services on Automatically at boot:
chkconfig portmap on
chkconfig rpcidmapd on
chkconfig nfslock on
chkconfig nfs on
Start Services:
service portmap start
service rpcidmapd start
service nfslock start
service nfs restart
Create /etc/exports on nfs server with:
/export/backup client.domain.lan(rw,sync) #sync option is highly recommended
or a home directory
/home/nfsuser *.sysxperts.com(rw,sync)
......
options ro=read only, sync=only respond once changes have been committed to stable storage, root_squash=prevent remote root access to root owned files by mapping to nfsnobody account
Start NFS:
service nfs start
On client:
in /etc/fstab add the following line
nfsserver:/export/backup /backup nfs rw 0 2
Mount the nfs share with:
sudo mount -a
- portmap maps calls made from remote machines to the correct RPC service port
- nfs translates NFS requests to local filesystem requests
- rpc.mountd mount and unmounts filesystems
To verify NFS services:
To verify remote NFS services:
MOUNTD_PORT="4442"
STATD_PORT="4443"
LOCKD_TCPPORT="4444"
LOCKD_UDPPORT="4444"
RQUOTAD_PORT="4445"
STATD_OUTGOING_PORT="4446"
tcp and udp stateful for tunneling SSL
Mounting NFS shares with autofs:
add to /etc/auto.master
/data /etc/auto.data --timeout=600
add to /etc/auto.data
myfolder -fstype=nfs,hard,nolock,vers=3,proto=tcp,bg,rsize=32768,wsize=32768,timeo=600,intr myserver:/myfolder
No comments:
Post a Comment