Configuring a new NFS server

From GigaTux Wiki
Jump to navigation Jump to search

Follow the guide below if you need to create a new NFS server to hold DTC-Xen images.

1. apt-get install nfs-kernel-server

2. Create a new /etc/exports with the following details (updated to include the new servers):

 /usr/share/dtc-xen-app node00004.gigatux.com(ro,subtree_check,insecure) node00001.gigatux.com(ro,subtree_check,insecure) node01002.gigatux.com(ro,subtree_check,insecure) node49001.gigatux.com(ro,subtree_check,insecure)
 /usr/share/dtc-xen-os node00004.gigatux.com(ro,subtree_check,insecure) node00001.gigatux.com(ro,subtree_check,insecure) node01002.gigatux.com(ro,subtree_check,insecure) node49001.gigatux.com(ro,subtree_check,insecure)
 /usr/share/dtc-xen-hvm node00004.gigatux.com(ro,subtree_check,insecure) node00001.gigatux.com(ro,subtree_check,insecure) node01002.gigatux.com(ro,subtree_check,insecure) node49001.gigatux.com(ro,subtree_check,insecure)

3. Change /etc/default/nfs-kernel-server to have RPCMOUNTDOPTS="--manage-gids -p 4002"

4. Add the following to /etc/services

 rpc.statd       4000/udp
 rpc.statd       4000/tcp
 rpc.mountd      4002/udp
 rpc.mountd      4002/tcp

5. Ensure that /etc/hosts has valid entries as follows:

 109.169.0.2     node00001.gigatux.com node00001
 109.169.23.39   node00004.gigatux.com node00004
 216.66.81.3     node01001.gigatux.com node01001
 216.86.154.197  node01002.gigatux.com node01002
 85.195.104.226  node49001.gigatux.com node49001

6. Change /root/firewall.sh to have the following under the # UDP section:

 iptables -A INPUT -p udp -s localhost -m multiport --ports 4000,portmapper,2049,rpc.statd,nfs,rpc.mountd -j ACCEPT
 iptables -A INPUT -p udp -s node00004.gigatux.com -m multiport --ports portmapper,rpc.statd,nfs,rpc.mountd -j ACCEPT
 iptables -A INPUT -p udp -s node01001.gigatux.com -m multiport --ports portmapper,rpc.statd,nfs,rpc.mountd -j ACCEPT
 iptables -A INPUT -p udp -s node01002.gigatux.com -m multiport --ports portmapper,rpc.statd,nfs,rpc.mountd -j ACCEPT
 iptables -A INPUT -p udp -s node49001.gigatux.com -m multiport --ports portmapper,rpc.statd,nfs,rpc.mountd -j ACCEPT

7. Restart the firewall by running /root/firewall.sh

8. Ensure that the root directories for /usr/share/dtc-xen-os, dtc-xen-app and dtc-xen-hvm have read/execute permissions for all by running chmod a+rx against them