Using ganesha-nfs-server as a RWX dynamic provisioner for POCs

Prerequisites

  1. An OCP cluster
  2. The kustomize binary in your path
  3. A version of the oc client binary that allows use of the -k or --kustomize option
  4. A dynamic provisioner set as your default storage class, or a manually created persistentVolume of size 60Gi or 100Gi that supports the RWO accessMode

Installing ganesha-nfs-server

  1. Clone the cp4mcm-samples repo:

    git clone git@github.com:IBM/cp4mcm-samples.git
    
  2. Change directories into the cp4mcm-samples/ganesha-nfs-server/overlays directory.

    cd cp4mcm-samples/ganesha-nfs-server/overlays/
    
  3. Decide whether you want to a 60Gi volume or a 100Gi volume to use as persistent volume for ganesha-nfs-server, then choose between one of the following two commands to execute:

    60Gi:

    oc apply -k ./size-60gi/
    

    100Gi:

    oc apply -k ./size-100gi/
    
  4. If you have a dynamic provisioner set as your default storage class, you are done. Otherwise, you must create a persistent volume to satisfy the PersistentVolumeClaim created; see the pvc for details.

    oc get pvc ganesha-nfs -n default -o json
    

    For more information on PersistentVolumes and PersistentVolumeClaims, see https://kubernetes.io/docs/concepts/storage/persistent-volumes/.

  5. Verify that the nfs-provisioner-xyz-123 pod is running in the default namespace:

    oc get pods -n default
    
  6. You are now ready to use the ganesha-nfs storage class for any products that require the RWX accessMode.

Troubleshooting

If you believe that something was misconfigured and would like to re-install ganesha-nfs-server, complete the following steps:

  1. Delete each of the resources that were created when you ran the oc apply -k ./size-60gi or oc apply -k ./size-100gi commands.

  2. Run the oc apply -k... command from the step 3 in the Installing ganesha-nfs-server section to set up 60Gi volume or a 100Gi volume again.