%3CLINGO-SUB%20id%3D%22lingo-sub-1772434%22%20slang%3D%22en-US%22%3EOptimize%20Azure%20Storage%20Costs%20-%20Disk%20Edition%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1772434%22%20slang%3D%22en-US%22%3E%3CP%3ERecently%20while%20reviewing%20costs%20with%20a%20customer%20I%20found%20they%20had%20a%20high%20volume%20of%20managed%20disks%20that%20were%20not%20associated%20with%20a%20virtual%20machine(VM).%26nbsp%3B%20This%20could%20happen%20for%20any%20number%20of%20reasons%20on%20purpose%20but%20usually%20it%20is%20used%20short%20term%20and%20should%20be%20reviewed.%26nbsp%3B%20By%20default%20when%20a%20VM%20is%20deleted%20any%20attached%20disks%20will%20also%20be%20deleted%2C%20but%20if%20you%20have%20at%20some%20point%20unattached%20the%20disk%20from%20the%20VM%20it%20will%20remain.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-machines%2Fdisks-find-unattached-portal%23unmanaged-disks-find-and-delete-unattached-disks%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22managed-disk.png%22%20style%3D%22width%3A%20491px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F246350iD8226B6DFCA0DE22%2Fimage-dimensions%2F491x192%3Fv%3D1.0%22%20width%3D%22491%22%20height%3D%22192%22%20role%3D%22button%22%20title%3D%22managed-disk.png%22%20alt%3D%22managed-disk.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1238163217%22%20id%3D%22toc-hId--1238163211%22%3EFind%20unattached%20Azure%20managed%20disks%3C%2FH2%3E%0A%3CP%3EWe%20found%20significant%20cost%20savings%20across%20the%20zones%20by%20looking%20at%20the%20unattached%20managed%20disks%20that%20were%20quick%20high%20in%20number.%26nbsp%3B%20The%20savings%20of%20course%20will%20vary%20depending%20on%20the%20size%20of%20the%20disks%20but%20collectively%20it%20can%20add%20up.%3C%2FP%3E%0A%3CP%3EYou%20can%20use%20two%20methods%20to%20find%20the%20Azure%20managed%20disks%20based%20on%20what%20your%20preference%20is%3A%3C%2FP%3E%0A%3CP%3E%3CA%20title%3D%22Use%20Powershell%20to%20find%20and%20delete%20unattached%20managed%20disks%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-machines%2Fwindows%2Ffind-unattached-disks%23managed-disks-find-and-delete-unattached-disks%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EUse%20Powershell%20to%20find%20and%20delete%20unattached%20managed%20disks%3C%2FA%3E%3CBR%20%2F%3E%3CA%20title%3D%22Use%20Portal%20to%20find%20unattached%20managed%20disks%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-machines%2Fdisks-find-unattached-portal%23managed-disks-find-and-delete-unattached-disks%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EUse%20Portal%20to%20find%20unattached%20managed%20disks%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1249349616%22%20id%3D%22toc-hId-1249349622%22%3EFind%20unattached%20unmanaged%20disks%3C%2FH2%3E%0A%3CP%3EFor%20those%20classic%20disks%20that%20are%20still%20hanging%20around%20you%20have%20to%20do%20it%20a%20little%20different%20but%20you%20will%20find%20these%20below.%26nbsp%3B%20Finding%20unmanaged%20VHDs%20are%20usually%20because%20of%20older%20VMs%20and%20means%20that%20cumulatively%20these%20%22lost%22%20disks%20could%20have%20been%20costing%20you%20quite%20a%20bit.%3C%2FP%3E%0A%3CP%3ELike%20managed%20disks%20you%20have%20your%20choice%20of%20methods%3A%3C%2FP%3E%0A%3CP%3E%3CA%20title%3D%22Find%20Unmanaged%20disks%20that%20are%20unattached%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-machines%2Fwindows%2Ffind-unattached-disks%23unmanaged-disks-find-and-delete-unattached-disks%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EFind%20Unmanaged%20disks%20that%20are%20unattached%20using%20Powershell%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20title%3D%22Find%20Unmanaged%20disks%20that%20are%20unattached%20using%20Portal%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-machines%2Fdisks-find-unattached-portal%23unmanaged-disks-find-and-delete-unattached-disks%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EFind%20Unmanaged%20disks%20that%20are%20unattached%20using%20Portal%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--558104847%22%20id%3D%22toc-hId--558104841%22%3ENot%20all%20unattached%20disks%20are%20wasted%20spend%3C%2FH2%3E%0A%3CP%3EJust%20a%20fair%20warning%2C%20while%20you%20might%20be%20quick%20to%20want%20to%20remove%20these%20disks%2C%20always%20make%20sure%20you%20are%20coordinating%20with%20the%20business%20owners%20of%20the%20disks%20if%20possible%20to%20make%20sure%20you%20are%20not%20deleting%20something%20that%20is%20being%20archived%20for%20specific%20reasons.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1772434%22%20slang%3D%22en-US%22%3E%3CP%3EAs%20organizations%20grow%2C%20especially%20if%20they%20are%20global%20and%20more%20decentralized%2C%20they%20might%20start%20to%20see%20certain%20aspects%20of%20Azure%20costs%20grow%20in%20unintended%20ways.%26nbsp%3B%20As%20we%20go%20through%20the%26nbsp%3B%3CA%20title%3D%22Well-Architected%20Framework%22%20href%3D%22https%3A%2F%2Faka.ms%2Farchitecture%2Fframework%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EWell-Architected%20Framework%3C%2FA%3E%2C%20which%20a%20major%20part%20of%20focuses%20on%20cost%20optimization%2C%20you%20can%20use%20the%20following%20tips%20to%20check%20if%20your%20Azure%20Storage%20spend%20is%20higher%20than%20it%20could%20be.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1772434%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EInfrastructure%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Recently while reviewing costs with a customer I found they had a high volume of managed disks that were not associated with a virtual machine(VM).  This could happen for any number of reasons on purpose but usually it is used short term and should be reviewed.  By default when a VM is deleted any attached disks will also be deleted, but if you have at some point unattached the disk from the VM it will remain.

 

managed-disk.png

 

Find unattached Azure managed disks

We found significant cost savings across the zones by looking at the unattached managed disks that were quick high in number.  The savings of course will vary depending on the size of the disks but collectively it can add up.

You can use two methods to find the Azure managed disks based on what your preference is:

Use Powershell to find and delete unattached managed disks
Use Portal to find unattached managed disks

 

Find unattached unmanaged disks

For those classic disks that are still hanging around you have to do it a little different but you will find these below.  Finding unmanaged VHDs are usually because of older VMs and means that cumulatively these "lost" disks could have been costing you quite a bit.

Like managed disks you have your choice of methods:

Find Unmanaged disks that are unattached using Powershell

Find Unmanaged disks that are unattached using Portal

  

Not all unattached disks are wasted spend

Just a fair warning, while you might be quick to want to remove these disks, always make sure you are coordinating with the business owners of the disks if possible to make sure you are not deleting something that is being archived for specific reasons.