HPE Nimble storage volumes are not deleted when cloned PVCs are deleted

Summary

CloudCasa’s default backup method is based on taking CSI snapshot of a PVC and then create a temporary PVC from that snapshot. This temporary PVC is used as the source for the backup. After backup is done, CloudCasa deletes the PVC and then deletes the CSI snapshot, which in turn should result in the underlying storage volume to be deleted.

But in case of HPE Nimble storage, you will some times see that the storage volumes are not deleted but only moved to “offline” state. This requires manual deletion.

Solution

The default behavior of HPE Nimble storage is to move the storage volumes to offline state when corresponding PVCs are deleted. This is controlled by the storage class parameter “destroyOnDelete” as described here:

HPE CSI Storage class parameters

To automatically delete storage volumes when PVCs are deleted, set the parameter “destroyOnDelete” to “true” in the storage class. Note that this can either be done in the storage class used for workload PVCs or you can use a custom storage class specifically for PVCs created by CloudCasa (from CSI snapshots). To do this, create a new storage class with the same contents as the original storage class and then, set this parameter there. You can then configure this storage class in backup advanced options by selecting

Enable storage class mapping for PV snapshots mounted during backup

For details, see Cluster Backup Wizard (look for “Enable storage class mapping for PV snapshots mounted during backup”).