Menu

An unattached disk does not know how long it has been unattached
📰

An unattached disk does not know how long it has been unattached

DEV Community: azure·Gonzalo Gjuka·2 days ago
#NKa2iKOG
#devtoazure#devto#dev#volume#script
Reading 0:00
15s threshold

Yesterday I asked a Spanish-speaking dev subreddit how people find unattached disks and unused public IPs before the invoice does. That evening I published the commands I was using as a read-only bash script: cloud-orphans . It lists, it never deletes.

One reply asked about a grace period, so yesterday's detach does not get flagged. Answering it, I saw the gap in my script. An EBS volume has a CreateTime and no detach time, so my age_days counts from creation. You need your own first-seen-unattached tag, or the DetachVolume record in CloudTrail.

The other thing I explained there: on OCI a block volume reports AVAILABLE attached or not.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.