# Detecting unused disks?

**URL:** <https://community.dynatrace.com/t/detecting-unused-disks/37640>\
**Category:** Open Q&A\
**Tags:** azure, disks\
**Created:** [December 10, 2022, 12:51pm UTC](https://community.dynatrace.com/t/detecting-unused-disks/37640 "2022-12-10T12:51:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [December 10, 2022, 12:51pm UTC](https://community.dynatrace.com/t/detecting-unused-disks/37640/1 "2022-12-10T12:51:41Z")

</div>

I have this question for Azure VMs, but I believe it applies to multiple situations.

I might have VMs that have allocated disks, but which for any reason, might not be partitioned/mounted. How would I detect them? From the Azure integration, I cannot see them at the VM level. Inside the VM I only see the ones that are mounted. Or am I missing something?

Does anyone have any idea for tackling this problem?

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [January 10, 2023, 9:05pm UTC](https://community.dynatrace.com/t/detecting-unused-disks/37640/2 "2023-01-10T21:05:27Z")

</div>

that’s a tricky one&nbsp;[@AntonioSousa](https://community.dynatrace.com/user/17213)&nbsp;if its not mounted I don’t think we could expect the Oneagent to see it.

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [January 10, 2023, 9:17pm UTC](https://community.dynatrace.com/t/detecting-unused-disks/37640/3 "2023-01-10T21:17:29Z")

</div>

[@ChadTurner](https://community.dynatrace.com/user/14877),  
It is really quite easy, as can be seen in the screenshot below, for a VM of mine. fdisk shows the physical disks, and df the several filesystems. As can be seen in the example, I have a 13 GB disk (virtual, in VirtualBox), but I have only allocated 5GB for the OS, which is being used at 70%. While this is a good thing for me in VirtualBox (I have zeroed the remaining 7GB and as such they don’t occupy space), the same is not true in Azure, where I would be paying for 7GB of disk that aren’t even allocated at the machine level…

 ![AntonioSousa_0-1673385434270.png](https://global.discourse-cdn.com/dynatrace/original/3X/8/8/88debb87f2efafb02e1f2017c77e4f436b464f85.png)

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [January 10, 2023, 9:33pm UTC](https://community.dynatrace.com/t/detecting-unused-disks/37640/4 "2023-01-10T21:33:50Z")

</div>

[@AntonioSousa](https://community.dynatrace.com/user/17213)&nbsp;did you check the disk analytics extension for that? it provides metrics for Linux hosts for physical disks and it’s partitions. I think you should be able to generate charts of used space vs allocated physical disks with that.

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [January 10, 2023, 11:02pm UTC](https://community.dynatrace.com/t/detecting-unused-disks/37640/5 "2023-01-10T23:02:13Z")

</div>

[@Julius\_Loman](https://community.dynatrace.com/user/3364), thanks for pointing out an extension I didn’t know about. I’ll have to check it out, as from the documentation it’s not clear if it will help in this use-case. Certainly not at the Azure level though, as it is an OneAgent extension for Linux only.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [January 11, 2023, 7:13am UTC](https://community.dynatrace.com/t/detecting-unused-disks/37640/6 "2023-01-11T07:13:43Z")

</div>

[@AntonioSousa](https://community.dynatrace.com/user/17213)&nbsp;Sure, it’s for a different purpose. But it provides at least the physical disk metrics. For Linux hosts on Azure it might help you.

To help you find unallocated block device space you can use:

- **com.dynatrace.extension.disk-devices.partition.size** &nbsp; to see the partition sizes
- **com.dynatrace.extension.disk-devices.disk.size** to see the physical disk&nbsp; (block device) size

For hosts using volume management you have also the metrics..

So in general I believe, this is doable for Linux hosts with OneAgent using metrics with this extension.

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [January 11, 2023, 8:08pm UTC](https://community.dynatrace.com/t/detecting-unused-disks/37640/7 "2023-01-11T20:08:33Z")

</div>

[@Julius\_Loman](https://community.dynatrace.com/user/3364),

Thanks! Will try it out…
