Tuesday, June 11, 2013

Access Nutanix NFS from a different NFS client

Nutanix NFS can be exported to a non-nutanix NFS client on different subnet.

1. Whitelist NFS datastore onNutanix 

ncli> cluster add-to-nfs-whitelist  ip-subnet-masks=

where is non-Nutanix NFS client.

2. Verify that NFS datastore exported correctly - run this command on Nutanix Controller VM

showmount -e
Export list for TEST-13SM35190018-1-CVM:

3. Nutanix Centos is stig compliant, we have iptables to prevent accessing Nutanix CVM from another subnet. So here are the iptable rules to allow NFS access. Run these commands on Controller VM ( this is needed only if Nutanix CVM and NFS client are in
different subnets)
Open Port mapper:
for i in `svmips`; do ssh $i "sudo iptables -t filter -A WORLDLIST -p tcp -m tcp --dport 111  -j ACCEPT"; done
Open NFS/Mountd port:
for i in `svmips`; do ssh $i "sudo iptables -t filter -A WORLDLIST -p tcp -m tcp --dport 2049 -j ACCEPT"; done
Save the rules:

sudo iptables-save
 /etc/init.d/iptables save

4. Mount it on remote .210 client (NFS client)$ sudo mount /mnt
esxi: esxcfg-nas -a  -o -s /TEST-CTR1 NTNX-Datastore

5. This KB might be useful as well