FSx ONTAP static provisioning

0

I'd want to create a persistent volume to an existing FSx volume and access it via the ONTAP CSI driver (Trident). We have successfully defined a dynamically provisioned volume using a PVC but all these claims have persistentVolumeReclaimPolicy: Delete set on them so when the PVC is deleted the file system is also deleted. We need an FSx volume that will not be deleted when the PV and PVC go away for any unspecified reason.

I have had no luck writing a PV yaml file that supplies a persistent volume to a PVC that can be mounted into a pod. The pods can never find the persistent volume. This is an example of what my PV yaml files look like:

apiVersion: v1 kind: PersistentVolume metadata: name: pvc-share namespace: prod spec: accessModes:

  • ReadWriteMany capacity: storage: 100Gi csi: driver: csi.trident.netapp.io fsType: FILESYSTEM_TYPE volumeAttributes: internalName: Share name: Share protocol: file storage.kubernetes.io/csiProvisionerIdentity: csi.trident.netapp.io volumeHandle: Share persistentVolumeReclaimPolicy: Retain storageClassName: fsx-csi volumeMode: Filesystem

Share is the name of my are ready defined FSx volume.

asked 6 months ago269 views
3 Answers
0

I do see that you are using NetApp ONTAP CSI driver (Trident) and you are looking for help in writing a PV yaml file. You might already be aware that, NetApp's Astra Trident provides dynamic storage orchestration using a Container Storage Interface (CSI) compliant driver. This allows Amazon EKS clusters to manage the lifecycle of persistent volumes (PVs) backed by Amazon FSx for NetApp ONTAP file systems.

You can consider checking below NetApp documentation for Use Astra Trident with Amazon FSx for NetApp ONTAP

AWS
SUPPORT ENGINEER
answered 6 months ago
  • What about defining a statically provisioned PV using NetApp ONTAP CSI driver? My FSx volume is already there I just want to be able to mount it via a PVC in my pod. Is this possible?

0

We have successfully used dynamic provisioning with Trident and FSx volumes. The only issue we have is they all have persistentVolumeReclaimPolicy set to delete on the PVC's which means if the PVC is deleted the volume is deleted too. So this is not good for us. Is there a way to change this so the dynamic volume has persistentVolumeReclaimPolicy set to retain? and how to you reconnect to an existing volume when the dynamic provisioned PVC gets created again?

TIA, Bob

answered 5 months ago
0

This is my solution:

  1. create the original PV using dynamic provisioning supplied by the Trident ONTAP CSI driver.
  2. Immediately edit the PV that was created and change the persistentVolumeReclaimPolicy from Delete to Retain
  3. If the PVC is ever deleted the PV will remain. Edit it again and remove the claim from the PV. It should then say Available as its Status.
  4. Recreated the PVC, referencing the old PV volumeName.
  5. Any new pods should now be able to mount the PVC and allow access to the FSx volume in the pod's file system.

Good luck.

answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions