I want to attach to a share that is already used by a physical server or some other device. I also want to attach containers that are orchestrated by K8s. This scenario is one customers have been asking for since the first version of Pure Service Orchestrator. When you normally create a PVC the PSO provisioner creates a volume or filesystem that looks something like this:
The first version of PSO’s FlexVolume Driver supported an import feature but it would take an existing volume and rename it to something like in the screenshot above. With the new “soft import” feature now in the latest PSO CSI driver you can now create a PVC tied to any existing volume and it won’t rename it. So any external connections or applications are not interrupted. How can you do this?
- Install PSO
- Create a PV using the
# TODO: change to the PVC you want to bind this PV.
# If you don't pre-bind PVC here, the PV might be automatically bound to a PVC by scheduler.
# Namespace of the PVC
# TODO: change to the volume name in backend.
# Volume with any name that exists in backend can be imported, and will not be renamed.
# TODO: configure your desired reclaim policy,
# Use Retain if you don't want your volume to get deleted when the PV is deleted.
Very Important Note: persistentVolumeReclaimPolicy is set to Retain. This ensures the filesystem is not deleted if the PV is deleted.
externalfiles volumeHandle matches the filesystem already in use on the FlashBlade.
3. Now we have to create a PVC to match the namespace and name specified in the PV.
# Note: These two fields are not required for pre-bound PV.
# TODO: Change to the name of the imported PV.
volumeName matches the PV we created earlier.
Now your Pod can mount the PVC. Even if it is already mounted. For that kind of multi-attach NFS is required.