Skip to content

Commit 6155dfd

Browse files
authored
Merge pull request #9114 from MicrosoftDocs/main
Auto push to live 2025-06-12 18:07:39
2 parents 79c2c4a + 7b70004 commit 6155dfd

File tree

4 files changed

+204
-0
lines changed

4 files changed

+204
-0
lines changed
Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
---
2+
title: Manage Disks in Standalone Storage Spaces
3+
description: Provides a detailed guide on how to identify the Logical Unit Number (LUN) of a physical disk presented from Azure for Storage Spaces on Windows Server.
4+
ms.date: 06/12/2025
5+
manager: dcscontentpm
6+
audience: itpro
7+
ms.topic: troubleshooting
8+
ms.reviewer: kaushika, jeffhugh, skanchan, sbathija, v-lianna
9+
ms.custom:
10+
- sap:backup,recovery,disk,and storage\storage spaces
11+
- pcy:WinComm Storage High Avail
12+
---
13+
# Manage disks in standalone Storage Spaces on Windows Server hosted in Azure
14+
15+
This article provides a detailed guide on how to identify the Logical Unit Number (LUN) of a physical disk presented from Azure for Storage Spaces on Windows Server. This is essential when you remove or replace a physical disk from the storage pool. By following these instructions, you can effectively manage the configurations of your storage spaces without compromising data integrity or service availability.
16+
17+
> [!Important]
18+
> To complete the following procedures, ensure you have administrator privileges in Windows PowerShell and the necessary permissions to manage disks in [Microsoft Azure portal](https://aka.ms/azureportal).
19+
20+
## Identify the LUN from a storage pool and match it in the Azure portal
21+
22+
To identify the LUN of a physical disk, follow these steps:
23+
24+
1. To retrieve information about the physical disks in a specified storage pool, run the following PowerShell cmdlet as an administrator:
25+
26+
```powershell
27+
Get-StoragePool -FriendlyName "<StoragePoolName>" | Get-PhysicalDisk | Select-Object FriendlyName, UniqueId, HealthStatus, Size, PhysicalLocation, DeviceID, CannotPoolReason, Usage | Format-List
28+
```
29+
30+
Here's an example output:
31+
32+
```output
33+
Friendlyname : Msft Virtual Disk
34+
UniqueId : <UniqueID>
35+
HealthStatus : Healthy
36+
Size : 37580963840
37+
PhysicalLocation : Integrated : Adapter 1 : Port 0 : Target 0 : LUN 2
38+
DeviceID : 4
39+
CannotPoolReason : In a Pool
40+
Usage : Auto-Select
41+
```
42+
43+
> [!NOTE]
44+
> Breakdown of the cmdlet:
45+
>
46+
> - `FriendlyName`: The user-friendly name of the physical disk.
47+
> - `UniqueId`: A unique identifier for the disk.
48+
> - `PhysicalLocation`: Specifies the physical location of the disk in the system. `Adapter 0` is for the operating system disk and temp disks, and `Adapter 1` is for data disks.
49+
> - `Usage`: Displays how the disk is currently being used (for example, for storage pools and virtual disks).
50+
51+
2. To retrieve the unique ID of the virtual disk in the storage pool, run the following cmdlets:
52+
53+
```powershell
54+
Get-StorageNode
55+
```
56+
57+
Here's an example output:
58+
59+
```output
60+
Name Manufacturer Model OperationalStatus
61+
--- ------------ ----- ------------
62+
Node1-2019-pool.fabrikam.com Microsoft Corporation Virtual Machine Up
63+
Node1-2019-pool.fabrikam.com Microsoft Corporation Virtual Machine Up
64+
Node2-2019-pool.fabrikam.com Microsoft Corporation Virtual Machine Up
65+
```
66+
67+
```powershell
68+
Get-StorageNode -name "<StorageNodeName>" | get-virtualdisk | ft friendlyname, uniqueid, allocatedsize, footprintonpool
69+
```
70+
71+
Here's an example output:
72+
73+
```output
74+
friendlyname uniqueid allocatedsize footprintonpool
75+
------------ -------- ------------- ---------------
76+
Virtualdisk <UniqueID> 1073741824 1073741824
77+
```
78+
79+
> [!NOTE]
80+
> The numbers shown in the `allocatedsize` and `footprintonpool` are in bytes.
81+
82+
3. To locate the LUN of the data disks in the Azure portal, go to Azure portal, select the virtual machine, and select **Settings** > **Disks**. Note down the LUN and match it with the retrieved information from step 1.
83+
84+
:::image type="content" source="media/manage-disks-standalone-storage-spaces/storage-spaces-vm.png" alt-text="Screenshot of the StorageSpacesVM window showing the Disks information with LUN.":::
85+
86+
## Remove a physical disk from the storage pool
87+
88+
1. To retire a physical disk from the storage pool, run the [Set-PhysicalDisk](/powershell/module/storage/set-physicaldisk) cmdlet by using the unique ID from step 1 of the preceding section:
89+
90+
```powershell
91+
Set-PhysicalDisk -UniqueId <UniqueID> -Usage Retired
92+
```
93+
94+
Here's an example output when the physical disk is retired:
95+
96+
```output
97+
PS C:\Users\Administrator1> Set-PhysicalDisk -UniqueId <UniqueID> -Usage Retired
98+
PS C:\Users\Administrator1> Get-PhysicalDisk
99+
100+
Number FriendlyName SerialNumber MediaType CanPool OperationalStatus HealthStatus Usage Size
101+
------ ------------ ------------ --------- ------- ----------------- ------------ ----- ----
102+
5 Msft Virtual Disk Unspecified False OK Healthy Auto-Select 40 GB
103+
0 Msft Virtual Disk Unspecified False OK Healthy Auto-Select 127 GB
104+
3 Msft Virtual Disk Unspecified False OK Healthy Auto-Select 40 GB
105+
2 Msft Virtual Disk Unspecified False OK Healthy Auto-Select 32 GB
106+
1 Msft Virtual Disk Unspecified False OK Healthy Auto-Select 16 GB
107+
4 Msft Virtual Disk Unspecified False OK Healthy Retired 35 GB
108+
```
109+
110+
2. To identify the physical disks associated with the virtual disk, run the following cmdlet by using the unique ID from step 2 of the preceding section:
111+
112+
```powershell
113+
Get-VirtualDisk -UniqueId <UniqueID> | Get-PhysicalDisk
114+
```
115+
116+
Here's an example output:
117+
118+
```output
119+
DeviceId FriendlyName SerialNumber MediaType CanPool OperationalStatus HealthStatus Usage Size
120+
-------- ------------ ------------ --------- ------- ----------------- ------------ ----- ----
121+
1 Msft Virtual Disk Unspecified False OK Healthy Auto-Select 40 GB
122+
2 Msft Virtual Disk Unspecified False OK Healthy Auto-Select 35 GB
123+
```
124+
125+
3. To start the storage job by forcing the data to move from the retired physical disk, run the following cmdlet by using the unique ID from the preceding step:
126+
127+
```powershell
128+
Get-VirtualDisk -UniqueID <UniqueID> | Repair-VirtualDisk
129+
```
130+
131+
4. Check the storage job status by using the following cmdlet and wait for the storage job to complete.
132+
133+
```powershell
134+
Get-StorageJob
135+
```
136+
137+
5. Confirm that no virtual disk footprint exists on the retired physical disk by running the following cmdlet:
138+
139+
```powershell
140+
Get-StorageNode -Name "<StorageNodeName>" | Get-PhysicalDisk -PhysicallyConnected | Select FriendlyName, CanPool, UniqueID, @{Name="Size (GB)"; Expression={[math]::Round($_.Size / 1GB, 2)}}, PhysicalLocation, Usage, VirtualDiskFootprint
141+
```
142+
143+
Here's an example of the expected output:
144+
145+
```output
146+
FriendlyName : Msft Virtual Disk
147+
CanPool : False
148+
UniqueID : <UniqueID>
149+
Size (GB) : 35
150+
PhysicalLocation : Integrated : Adapter 1 : Port 0 : Target 0 : LUN 2
151+
Usage : Retired
152+
VirtualDiskFootprint : 0
153+
```
154+
155+
> [!NOTE]
156+
> Breakdown of the cmdlet:
157+
>
158+
> - `FriendlyName`: The user-friendly name of the physical disk.
159+
> - `CanPool`: Indicates whether the disk can be added to a storage pool.
160+
> - `UniqueID`: A unique identifier for the disk.
161+
> - Custom property: `Size (GB)`
162+
>
163+
> - Code: `@{Name="Size (GB)"; Expression={[math]::Round($_.Size / 1GB, 2)}}`
164+
> - Explanation:
165+
> - `@{...}`: A hashtable defining a calculated property.
166+
> - `Name="Size (GB)"`: Specifies the name of the new property (in this case, "Size (GB)").
167+
> - `Expression={...}`: Defines how the property value is calculated:
168+
> - `$_.Size`: Refers to the size property of the current physical disk (value is in bytes).
169+
> - `/ 1GB`: Converts the size from bytes to gigabytes (1 GB is a constant in PowerShell equal to 1,024 * 1,024 * 1,024 bytes).
170+
> - `[math]::Round(..., 2)`: Rounds the result to `2` decimal places for readability.
171+
>
172+
> - `PhysicalLocation`: Specifies the physical location of the disk in the system.
173+
> - `Usage`: Displays how the disk is currently being used (for example, for storage pools and virtual disks).
174+
> - `VirtualDiskFootprint`: Indicates how much of the physical disk's capacity is being used by virtual disks.
175+
176+
6. [Remove the physical disk](/powershell/module/storage/remove-physicaldisk) from the server by running the following cmdlets using the unique ID from step 1:
177+
178+
```powershell
179+
$PDToRemove = Get-PhysicalDisk -UniqueID <UniqueID>
180+
Remove-PhysicalDisk -PhysicalDisks $PDToRemove -StoragePoolFriendlyName "<StoragePoolName>"
181+
```
182+
183+
7. Reconfirm the `CanPool` property of the physical disk which should show as `True` after the physical disk is removed from the storage pool. Run the `Get-PhysicalDisk` cmdlet:
184+
185+
```powershell
186+
PS C:\Users\Administrator1> Get-PhysicalDisk
187+
Number FriendlyName SerialNumber MediaType CanPool OperationalStatus HealthStatus Usage Size
188+
------ ------------ ------------ --------- ------- ----------------- ------------ ----- ----
189+
5 Msft Virtual Disk Unspecified False OK Healthy Auto-Select 40 GB
190+
0 Msft Virtual Disk Unspecified False OK Healthy Auto-Select 127 GB
191+
3 Msft Virtual Disk Unspecified False OK Healthy Auto-Select 40 GB
192+
2 Msft Virtual Disk Unspecified False OK Healthy Auto-Select 32 GB
193+
1 Msft Virtual Disk Unspecified False OK Healthy Auto-Select 16 GB
194+
4 Msft Virtual Disk Unspecified True OK Healthy Auto-Select 35 GB
195+
```
196+
197+
8. Once the disk is removed from the storage pool, it should be available under the primordial pool.
198+
199+
:::image type="content" source="media/manage-disks-standalone-storage-spaces/primordial-pool.png" alt-text="Screenshot of the storage pool showing that the disk is available under the primordial pool." lightbox="media/manage-disks-standalone-storage-spaces/primordial-pool.png":::
200+
201+
9. After confirming the removal with the `Get-PhysicalDisk` cmdlet in PowerShell, detach the physical disk in the Azure portal if necessary.
202+
10. Verify the health of the storage pool and the virtual disk by running the `Get-StoragePool` and `Get-VirtualDisk` cmdlets.
85.9 KB
Loading
58.4 KB
Loading

support/windows-server/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,8 @@ items:
756756
items:
757757
- name: Extend stand-alone tiered storage spaces
758758
href: ./backup-and-storage/extend-stand-alone-tiered-storage-spaces.md
759+
- name: Manage disks in standalone Storage Spaces
760+
href: ./backup-and-storage/manage-disks-standalone-storage-spaces.md
759761
- name: System Restore or resetting your computer
760762
items:
761763
- name: How to restore a Windows 7 installation

0 commit comments

Comments
 (0)