SCHANA Backup retention attempts to delete all Backups when using Snapshot count
Applies to
SnapCenter Plug-in for SAP HANA (SCHANA) 4.9, 5.0P1
Issue
When using RetentionByCount in a policy for a Resource containing HANA HSR and Application Volume , during retention we see the following error
When also using a SnapMirror or SnapVault relationship on the volumes with update setting in the Backup Policy, the following error would be seen, showing the newest or previous Backup's Snapshot name, for each replicated ONTAP volume in the Backup set:
Error: Remove Snapshot '<RESOURCE_GROUP>_<HOSTNAME>_<BACKUP_DATE>_<BACKUP_TIME>.####' failed on volume '<VOLUME>'.
This Snapshot copy is currently used as a reference Snapshot copy by one or more SnapMirror relationships. Deleting the Snapshot copy can cause future SnapMirror operations to fail.SMCore log:
2024-12-09T08:22:48.4065943+00:00 ERROR SMCore_2229 PID=[8108] TID=[145] Azure.RequestFailedException: The scope '/subscriptions/5327fb43-6868-4985-b12f-ca47b32ff946/resourceGroups/rg-sap-anf/providers/Microsoft.NetApp/Accounts/Prod/capacityPools/Pool/volumes/Volume/snapshots/snapshot_name' cannot perform delete operation because following scope(s) are locked: '/subscriptions/5327fb43-6868-4985-b12f-ca47b32ff946/resourcegroups/rg'. Please remove the lock and try again.
Status: 409 (Conflict)
ErrorCode: ScopeLocked
