Disk to LUN Mapping for a Windows VM using Microsoft Storage Spaces in Azure
When multiple data disks are attached to a Windows VM using Microsoft Storage Spaces in Azure it can be difficult to identify the LUN a disk belongs to. This is especially troublesome when there is a need to delete, clone, or migrate a specific disk(s) from on VM to another VM in Azure. A scenario where this may come in handy is if you need to migrate only 1 or 2 disks associated with Microsoft Storage Spaces while leaving other disks in place on the VM.
When a disk is not associated with a storage pool the disk’s LUN can easily be seen in Location property of the general tab on the disk’s properties under the “Disk Management” utility.
When a disk is associated with a storage pool the disk will not show up in the “Disk Management” utility and the LUN is not easily viewable because of this.
The following can help identify the Disk to LUN Mapping on your Windows VM in Azure when Microsoft Storage Spaces are used.
We will collect some information on some of the disks displayed in Device Manager. Use this information to identify the LUNs of the disks you would like to delete, clone, or migrate. You will need to do these steps for each of the “Microsoft Storage Space Device” objects in the “Disks drives” object in the Device Manager utility.
- Physical Device Object Name – Can be used as the unique identifier for the “Microsoft Storage Space Device”.
- Volume and Drive Letter(s) – Will show what volumes are associated with the storage space device.
- Volume Capacity – This is optional but helpful to see.
- Power relations – Identifies uniquely each “Microsoft Virtual Disk” used by the “Microsoft Storage Space Device”.
- LUN ID(s) – This derived by manually converting the last 6 characters of each of the “Power Relations” values (see above) from HEX to Decimal.
1. Open Device Manager
a. Remote Desktop into your Azure VM that has the disks you would like to delete, clone, or migrate.
b. Right-Click Start Menu –> Select “Device Manager”
2. Get properties of the “Disk drives” object.
Note: This will need to be done for each of the “Microsoft Storage Space Device”
a. Right Click on the “Microsoft Storage Space Device” object and select properties.
3. Get the “Microsoft Storage Space Device” object’s “Physical Device Object name” property.
a. Select the “Details” tab of the “Microsoft Storage Space Device” properties window.
b. Select the “Physical Device Object name” property in the “Property” field dropdown menu.
c. Write down the “Physical Device Object Name” value for this “Microsoft Storage Space Device”.
Sample Value: “\Device\Space1”
4. Get the Volumes associated with the “Microsoft Storage Space Device”.
a. Select the “Volumes” tab of the “Microsoft Storage Space Device” properties window.
b. Click the “Populate” button to retrieve all volume information for this “Microsoft Storage Space Device”.
c. For each volume in the “Microsoft Storage Space Device” make note of the “Volume” and “Capacity” fields.
Sample Value “Volume”: “volume-on-pool-a (M:)”
Sample Value “Capacity”: “2016MB”
5. Get the “Power relations” properties for the “Microsoft Storage Space Device”.
a. Select the “Details” tab of the “Microsoft Storage Space Device” properties window.
b. Select the “Power relations” property in the “Property” field dropdown menu.
c. Write down the “Power relations” value(s) for this “Microsoft Storage Space Device”.
Sample “Power relations” Value(s):
SCSI\Disk&Ven_Msft&Prod_Virtual_Disk\000001 SCSI\Disk&Ven_Msft&Prod_Virtual_Disk\000000
6. Identify the LUN information in the “Power relations” Value string(s) and convert from HEX to Decimal.
Note: The LUN information is stored in hexadecimal format as the last 6 characters on the “Power relations” Value string(s). At this time this will need to be manually identified and converted to a decimal format for LUN identification. See this sample data below:
Sample “Power relations” value: “SCSI\Disk&Ven_Msft&Prod_Virtual_Disk\00001c” Sample Hexadecimal value (last six characters from above): “00001c”
Sample LUN ID (converted from HEX): “28”
a. Get the last 6 characters of the “Power relation” string(s).
b. Convert the last 6 characters from hexadecimal to decimal using Calc.exe (in Programmer mode). This is the LUN ID.
c. Note down the LUN ID with the other collected information.
Below are some example tables that were created using the method above. These can be used to aggregate the data when multiple disks are involved.
Volumes Table |
|||
Microsoft Storage Space Device (Physical Device Object Name) |
Drive Letter |
Volume Name |
Capacity |
\Device\Space1 |
M: |
volume-on-pool-a (M:) |
2016 MB |
\Device\Space2 |
N: |
volume-on-pool-b (N:) |
2016 MB |
Power Relations Table (LUNs) |
|||
Microsoft Storage Space Device (Physical Device Object Name) |
Power relations |
HEX (Manual - Last 6 of Power Relations) |
LUN (Manual - Convert Hex to Decimal) |
\Device\Space1 |
SCSI\Disk&Ven_Msft&Prod_Virtual_Disk\000001 |
000001 |
1 |
\Device\Space1 |
SCSI\Disk&Ven_Msft&Prod_Virtual_Disk\000000 |
000000 |
0 |
\Device\Space2 |
SCSI\Disk&Ven_Msft&Prod_Virtual_Disk\000003 |
000003 |
3 |
\Device\Space2 |
SCSI\Disk&Ven_Msft&Prod_Virtual_Disk\000002 |
000002 |
2 |
Topic Search
-
Securing TLS in WAC (Windows Admin Center) https://t.co/klDc7J7R4G
Posts by Date
- March 2025 1
- February 2025 1
- October 2024 1
- August 2024 1
- July 2024 1
- October 2023 1
- September 2023 1
- August 2023 3
- July 2023 1
- June 2023 2
- May 2023 1
- February 2023 3
- January 2023 1
- December 2022 1
- November 2022 3
- October 2022 7
- September 2022 2
- August 2022 4
- July 2022 1
- February 2022 2
- January 2022 1
- October 2021 1
- June 2021 2
- February 2021 1
- December 2020 2
- November 2020 2
- October 2020 1
- September 2020 1
- August 2020 1
- June 2020 1
- May 2020 2
- March 2020 1
- January 2020 2
- December 2019 2
- November 2019 1
- October 2019 7
- June 2019 2
- March 2019 2
- February 2019 1
- December 2018 3
- November 2018 1
- October 2018 4
- September 2018 6
- August 2018 1
- June 2018 1
- April 2018 2
- March 2018 1
- February 2018 3
- January 2018 2
- August 2017 5
- June 2017 2
- May 2017 3
- March 2017 4
- February 2017 4
- December 2016 1
- November 2016 3
- October 2016 3
- September 2016 5
- August 2016 11
- July 2016 13