#Mounting ONTAP Volume Across Multiple Namespaces with Trident

1 messages · Page 1 of 1 (latest)

sweet verge
#

We need to mount ONTAP SVM volume as a PVC across multiple pods in different namespaces. However, Trident restricts importing the same volume more than once, even with different TridentBackend configurations.

Is there a way to achieve this setup? Also, could you explain why Trident has this limitation?

Thank you for your assistance.

agile gulch
#

what type of volume is it? NFS? iSCSI?

sweet verge
#

NFS

floral dragon
#

have you checked the CNVA feature?

#

the idea would be:

  • import the volume on NS#1
  • use CNVA to access to that volume on NS#2
sweet verge
#

kind: TridentVolumeReference
nice, will give it a shot

sweet verge
#

this was sound promising until we have realized that it won't allow to share imported volume

#

error: failed to provision volume with StorageClass "trident-backend-jaspershared-hdd": rpc error: code = Unknown desc = source volume pvc-67b0d745-7240-45ee-95d4-4f7fbecbb464 for subordinate volume pvc-d7f177c2-ea23-46b-adad-e18e426c75a9 is an unmanaged import

#

is there a reason not to allow to share imported volume?

sweet verge
#

@floral dragon , ideas?

floral dragon
#

@sweet verge did you import the volume with the "--no-manage" parameter? & if so, any specific reason?

sweet verge
#

yes, with "--no-manage". this is externally managed shared volume. we do not want a chance of accidental deletion of this volume by k8s cluster. I was under impression this is what "--no-manage" wold do. even someone will delete PV, actual ONTAP volume will still be intact.

floral dragon
#

well, with "no manage", the volume will be imported, but that's it, no chance to perform any Trident specific thing with it (such as CNVA)

if you don't want the volume to be physically deleted in ONTAP, I would personally recommend importing the volume against a Storage Class that is configured with "reclaimPolicy: retain".
that way, you can benefit from Trident' features while bringing more security

#

note that the default behavior of "volume import" is to also rename the volume

sweet verge
#
  • if "reclaimPolicy: retain" is set on PV and we delete PV, will Trident also delete ONTAP volume?
  • default behavior of "volume import" is to also rename the volume. It perform renames only if you import with "managed" flag. Is there a way to skip rename? This ONTAP volume is shared with legacy systems, VMs and other K8s cluster also mount this volume. We must to preserve original name.
sweet verge
#

since we use dedicated TridentBackend just to import this volume I was thinking to add default -> nameTemplate: equal to volume name to force Trident skip renaming it. but at no avail. it still tried to rename volume by adding some random characters at the end. Is there a way to tell Trident NOT to rename imported volume and still utilize TridentVolumeReference feature?

floral dragon
#

if "reclaimPolicy: retain" is set on PV and we delete PV, will Trident also delete ONTAP volume?
=> this parameter is set in the storage class, and applied to all PVC
If you then delete the PVC, the PV will remain on the system, & Trident will not delete it

#

wrt renaming, i don't think that is possible...
"manage" => renames the volume
"no manage" => does not not rename
but with "no manage" you cannot do anything extra (like CNVA)

#

I'll talk to the Product Manager to see if there are plans around that.
I'ld recommend getting in touch with your NetApp account team to also open a feature request