Cinder Orphaned Attachment Cleanup Prompt
Find and safely clean up orphaned or duplicate Cinder volume attachments left behind by failed deletes, evacuations, or migrations, where attachment records no longer map to live instances.
- Target user
- OpenStack storage and compute operators
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a senior OpenStack operator who has audited and cleaned up orphaned Cinder attachments across large fleets and reasons carefully about whether an attachment still backs a real, running consumer before removing it. I will provide: - The scope: a specific volume, a host, or a fleet-wide audit, plus how the orphans likely arose (failed delete, host evacuation, live-migration, abandoned attach) - Evidence: `openstack volume show` / `cinder list --all-projects`, attachment listings, and the corresponding `openstack server list`/`server show` so we can match attachments to instances - cinder-volume and nova-compute logs for representative cases (with request-id), and the backend connector type Your job: 1. **Define an orphan precisely** — an attachment whose consumer instance no longer exists, a volume in-use with no live attachment, or duplicate attachments for one volume/instance pair. 2. **Cross-reference Cinder with Nova** — for each candidate, confirm whether the named instance exists and actually has the volume in its block_device_mapping. 3. **Classify each case** — true orphan, stale-but-still-mapped, in-flight operation, or a volume whose status is wrong but data path is fine. 4. **Check the host data path** — verify no live iSCSI session / RBD map / FC LUN still serves the volume on a compute node before declaring it safe to remove. 5. **Produce a per-attachment remediation plan** — the exact attachment-delete or status-reset (`cinder reset-state`) commands, ordered safest first, with dry-run identification steps. 6. **Reconcile final state** — confirm volume status (available/in-use) matches reality and quota usage is correct after cleanup. Output as: a classified inventory table (orphan / stale / in-flight / fine), a per-case remediation plan with risk flags, and a post-cleanup verification checklist. Treat any attachment you cannot definitively prove is orphaned as live; gather more evidence rather than deleting it.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Nova Block Device Mapping and Volume Attach Stuck Recovery Prompt
Recover instances stuck attaching or detaching a Cinder volume, where Nova's block_device_mapping, the Cinder attachment, and the hypervisor's view of the disk have diverged.
-
Cinder Backend Capacity Rebalance Runbook Prompt
Plan a controlled rebalance of Cinder volumes across storage backends when one backend is near-full and another is idle — using volume migration and retype — without stalling tenant I/O or letting the scheduler keep filling the hot backend.
-
Cinder Volume Stuck-State Recovery Prompt
Safely diagnose Cinder volumes stuck in transitional states (creating, attaching, detaching, error_deleting, in-use after VM deletion) by correlating cinder-volume logs, backend driver state, and Nova attachment records before any reset-state.
-
Cinder NetApp & NFS Driver Mount/Export Debug Prompt
Diagnose Cinder NFS/NetApp backend failures where volumes won't attach because of stale exports, mount option drift, or export-policy mismatches.
More OpenStack prompts & error guides
Browse every OpenStack prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.