Azure BOSH director persistent disk protection via use of "delete-lock"
search cancel

Azure BOSH director persistent disk protection via use of "delete-lock"

book

Article ID: 440971

calendar_today

Updated On:

Products

VMware Tanzu Platform Core

Issue/Introduction

If you accidentally delete a BOSH Director’s data (persistent) disk(s), you will have to restore them from backup in order not to lose data.

In an Azure environment, is it appropriate and safe to apply a deletion lock on the Bosh Director data disk?

Resolution

1.  Confirm the customer is exclusively using Azure Managed Disks.
2.  Review BOSH Lifecycle: Note that BOSH Director lifecycle operations (like apply-changes) typically involve detaching/reattaching existing persistent disks rather than deleting them, unless a disk resize or manual recreation is triggered.
3.  Validation of Lock Behavior: In Azure, a "CanNotDelete" lock prevents deletion but allows read/update/attach/detach operations.
4.  Instruct the customer that the lock must be manually removed if they ever intend to resize the disk or perform a "Recreate All Persistent Disks" operation via Ops Manager.
5.  Escalation: If the customer experiences "Access Denied" or "Authorization" errors during a standard BOSH deploy after applying the lock, escalate to the Tanzu Azure CPI engineering team.

 

 

Additional Information

1.  Persistent disk fails to attach in Bosh Director in Tanzu Application Platform — Discusses the importance of disk presence for successful attachment.
2.  Persistent Disk is not Attached to the Director VM — Highlights that manual disk detachment/deletion at the IaaS level causes BOSH failures.

Like Azure, both AWS and GCP offer specific features to prevent the accidental deletion of critical resources like persistent disks, similar to Azure's resource locks.

AWS Termination Protection

AWS provides a Termination Protection setting for EC2 instances. While it primarily protects the instance from being terminated, it indirectly protects persistent EBS volumes if they are configured to be preserved upon instance termination.

  • By default, when an EC2 instance is deleted, attached EBS volumes are not always automatically deleted and may remain as unattached volumes [Unattached disk/volume meaning].
  • To protect a specific volume, ensure the DeleteOnTermination attribute for that EBS volume is set to false. This ensures the disk persists even if the associated VM is removed.

GCP Deletion Protection

GCP provides Deletion Protection at the resource level for both Virtual Machine (VM) instances and persistent disks.

  • When enabled, deletion protection prevents a user from accidentally deleting the resource through the console, CLI, or API until the protection is explicitly disabled.
  • For projects, GCP uses a 32-day retention period after a shutdown request before a project is permanently deleted [GCP Project needs to be in a "Healthy" status].