ryanhay / ocp4-metal-install

Install OpenShift 4 on Bare Metal - UPI
213 stars 422 forks source link

Suggestion for NFS shares #4

Open ericlowry opened 3 years ago

ericlowry commented 3 years ago

Hey Ryan,

I have a couple of suggestions for your NFS section (18).

1) create a couple of extra shares for when the cluster is ready - folks are going to need a few, might as well set them up here...

   mkdir -p /shares/{registry,pv0001,pv0002,pv0003}
   chown -R nobody:nobody /shares/{registry,pv0001,pv0002,pv0003}
   chmod -R 777 /shares/{registry,pv0001,pv0002,pv0003}

and

echo "/shares/registry 192.168.22.0/24(rw,sync,root_squash,no_subtree_check,no_wdelay)" > /etc/exports
echo "/shares/pv0001 192.168.22.0/24(rw,sync,root_squash,no_subtree_check,no_wdelay)" >> /etc/exports
echo "/shares/pv0002 192.168.22.0/24(rw,sync,root_squash,no_subtree_check,no_wdelay)" >> /etc/exports
echo "/shares/pv0003 192.168.22.0/24(rw,sync,root_squash,no_subtree_check,no_wdelay)" >> /etc/exports
exportfs -arv

2) Folks should pay close attention to the subnet and use the correct one. I deployed a cluster on IBM's cloud and my subnet was 10.70.174.128/26 - which looks like a normal IP address but isn't, it's a "network" because the CIDR is /26 ;-)

I would even recommend spinning up an extra "test" vm on the cluster's subnet and actually testing the NFS mounts before attempt to use them persistent volumes:

sudo mkdir /test
mount -t nfs ocp-svc:/shares/registry /test
touch /test/it-works
rm /test/it-works
umount /test

If this works, it can save you some real issues down the road...

You could also use the VM to validate some network routes and name resolution to ensure the firewall is has opened it's ports and is forwarding traffic correctly.

Thanks again for your great work capturing all of this.

E.