5 echo " ./$(basename $0) node1_ip node2_ip ... nodeN_ip"
9 if [ "$#" -lt 1 ]; then
10 echo "Missing NFS slave nodes"
16 sudo apt-get install -y nfs-kernel-server
18 #Create /dockerdata-nfs and set permissions
19 sudo mkdir -p /dockerdata-nfs
20 sudo chmod 777 -R /dockerdata-nfs
21 sudo chown nobody:nogroup /dockerdata-nfs/
23 #Update the /etc/exports
26 NFS_EXP+="$i(rw,sync,no_root_squash,no_subtree_check) "
28 echo "/dockerdata-nfs "$NFS_EXP | sudo tee -a /etc/exports
30 #Restart the NFS service
32 sudo systemctl restart nfs-kernel-server