Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, October 8, 2018 10:07 PM
A client setup some Azure VMs on their own, but have recently cleared off a couple drives, and want us to remove them so they can save the cost of the storage.
However, while it's simple enough to take the drive offline inside the VM, because the Azure Drives for this box are largely the same (same sizes, no distinguishable human-readable naming conventions...) I don't know which Disk to remove from Azure.
Is there any simple way to see which Disk is mapped to what internal VM Drive?
All replies (3)
Tuesday, October 9, 2018 10:39 AM
You can try to detach one drive at a time from the VM and determine which ones you can delete.
Tuesday, October 9, 2018 11:23 AM
The disks in Azure will always have a Logical Unit Number(LUN) associated with.
Remote to your Azure VM and do the below PowerShell command
get-disk | format-list number, path
Then,
get-AzureRmVm -ResourceGroupName yourResourceGroupName -Name yourVmName
It will give the data disks and their properties, including the LUN number.
See this solution for reference
JAYENDRAN
Tuesday, October 9, 2018 1:39 PM
Hi WolfStar76,
We don't have any straight forward way to see the mapping between Windows internal disks and the same external Azure disk.
But we have a way to map with LUN Numbers.
In azure console, go to Disks under your VM. First column in data disks shows the LUN Numbers.
Same can be found from Windows Server as well.
Go to "Device manager" and expand the "Disk Drives".
Mostly all the "Microsoft Virtual Disk" are data disks.
Right click on one of them and go to the properties.
You can find the LUN number in the Location.
Then go to the volumes tab on the same window and click on populate.
This process will load the disk number as shown below.
Then you can map that disk number with the disks numbers from the server manager. In our example disk number is 2.
So Disk number 2 from Windows server maps to LUN number 0 on Azure Data disk.
Try this solution and let me know.
Generally Number of data disks (LUN) will be equal to the number of "Microsoft Virtual Disk" in device manager. In your case you have an extra data disk which is not showing under Disks.
Also taking a backup is recommended before performing delete operation.