Create NFS Share on Xen8

Add Drive that will be used as NFS share in fstab

vi /etc/fstab

UUID="XXXXXX" /data01 xfs defaults 0 0

Mount it

mount -a

Add NFS share permissions in exports file

vi /etc/exports


Edit portmap

vi /etc/sysconfig/portmap


Enable and start services

systemctl enable rpcbind
systemctl enable nfs-server
systemctl enable nfs-lock
systemctl enable nfs-idmap

systemctl restart rpcbind
systemctl restart nfs-server
systemctl restart nfs-lock
systemctl restart nfs-idmap

Allow port

vi /etc/sysconfig/iptables

-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 111 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 2049 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 975 -j ACCEPT

Restart service

systemctl restart iptables

Test connection on remote host

mount 10.10.10.X:/data01 /mnt/

Connect NFS on share SR

xe sr-create content-type=user \
    name-label="data01" shared=true \
    device-config:server=10.X.X.X device-config:serverpath=/data01 type=nfs \
    nfsversion="3", "4"