Delete Unattached Azure disks
Categories
(Infrastructure & Operations :: RelOps: Windows OS, task)
Tracking
(Not tracked)
People
(Reporter: markco, Assigned: markco)
Details
Attachments
(2 files)
Removed unattached disks from Azure storage.
Used this script through Azure cli:
$managedDisks = Get-AzDisk
foreach ($md in $managedDisks) {
if ($md.DiskState -like "Unattached"){
Write-Host "Deleting unattached Disk with Id: $($md.Id)"
$md | Remove-AzDisk -Force
Write-Host "Deleted unattached Disk with Id: $($md.Id) "
}
}
Assignee | ||
Comment 1•5 years ago
|
||
See attached file for list.
Comment 2•5 years ago
|
||
i noticed today that there were about 12 hundred orphaned disks in the worker-manager resource group. i don't know if these were old or new (if w-m had a problem before or if it still has a problem now). in any case i added a task to cib ci that will clean up the worker-manager resource group if a cib commit message contains a line of purge-taskcluster-resources
. i have attached the deletion log from today.
Description
•