Storage Spaces Direct - Can't Remove Physical Disk from the pool in order to able to use it by operating system

Krisztian 46 Reputation points
2022-07-29T20:35:55.093+00:00

Unable to remove disk from S2D
I have a virtual lab /virtual box/ windows 2019 server environment
Lab setup:

  • 1 Domain controller windows 2019 Datacenter server
  • 3 windows server 2019 Datacenter each of them member of the domain, failover clustering installed on each server /3 Nodes/.
  • Storage space is enabled

My problem is when I add on additional disk in virtual box, S2D takes it immediately and I can not remove it from the pool.
I wanna remove "disk5" 30GB see below screenshot pls.

Following command I have done in powershell:
Step 1: Set-PhysicalDisk -FriendlyName “disk5” -Usage Retired
Step 2: Repair-VirtualDisk -FriendlyName “YourVirtualDisk”
Step 3: Get-StorageJob
Step 4: Get-PhysicalDisk | Where-Object { $.Usage -eq ‘Retired’}
Step 5: $DiskToRemove = Get-PhysicalDisk | Where-Object { $
.Usage -eq ‘Retired’}
Step 6: Remove-PhysicalDisk -PhysicalDisks $DiskToRemove -StoragePoolFriendlyName “disk5”
Step 7: Remove-PhysicalDisk $DiskToRemove -StoragePoolFriendlyName "SD2 on BlackRock"

See attachments for details please.

Thank you!

226296-step1.png
226297-step2.png
226250-step3.png
226283-step4.png
226361-step5.png
226298-step6.png
226299-step7.png
226362-step8.png
226265-step9.png

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,478 questions
Windows Server Clustering
Windows Server Clustering
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Clustering: The grouping of multiple servers in a way that allows them to appear to be a single unit to client computers on a network. Clustering is a means of increasing network capacity, providing live backup in case one of the servers fails, and improving data security.
1,017 questions
Windows Server Storage
Windows Server Storage
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Storage: The hardware and software system used to retain data for subsequent retrieval.
664 questions
0 comments No comments
{count} votes

Accepted answer
  1. Xu Gu (Shanghai Wicresoft Co,.Ltd.) 501 Reputation points Microsoft Vendor
    2022-08-03T08:48:36.35+00:00

    Hi Krisztian,

    For your situation, in the penultimate picture, we can see that disk5 "CanPool" status is "True", so disk5 does not exist in the storage pool, you can use the command to check:
    Get-StoragePool -FriendlyName "pool name" | Get-PhysicalDisk

    Therefore, we can directly perform the Remove operation on disk5. The specific operation steps are as follows:
    (1)Open a Windows PowerShell session as an administrator.

    (2)Type the following command, replacing <diskname> with the friendly name of the disk:
    Set-PhysicalDisk -FriendlyName <diskname> -Usage Retired

    (3)Type the following command for each storage space that depends on the old disk, replacing <virtualdiskname> with the friendly name of the storage space:
    Repair-VirtualDisk -FriendlyName <virtualdiskname>

    (4) Prior to performing step 5, you must wait for all active repair jobs to complete. To monitor the status of repair jobs, type the following command:
    Get-StorageJob

    (5)Type the following command:
    Remove-PhysicalDisk -FriendlyName <diskname>

    (6)Physically disconnect the old disk.

    Best Regards,
    Xu Gu

    1 person found this answer helpful.
    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Krisztian 46 Reputation points
    2022-08-04T19:52:27.327+00:00

    Hi Xu Gu,

    First of all thank you for your respond, very kind of you!
    You were right, disk5 does not exist in the storage pool checked out by Get-StoragePool -FriendlyName "pool name" | Get-PhysicalDisk
    /Device ID 1005 for disk5/

    228199-storagepool.png

    I went through your recommended steps 1-6 however at Step 5 encountered an issue. Does not like 'FriendlyName' parameters.

    228274-step5.png

    What can be used instead of 'FriendlyName' ?
    Thank you in advance!


  2. Krisztian 46 Reputation points
    2022-08-05T16:56:23.497+00:00

    @Xu Gu (Shanghai Wicresoft Co,.Ltd.)

    Hi Xu Gu,

    At the second step Remove-PhysicalDisk -PhysicalDisks $PDToRemove -StoragePoolFriendlyName "pool name"
    I got Cache out of date error.
    I tired a solution:

    • Update-StorageProviderCache
    • Update-HostStorageCache
    • Update-Disk -Number #

    Not sure about this step; Update-Disk -Number #
    What number should be there?

    See attachment for error details please

    Thank you!

    228568-upload.png


  3. Jiri Mraz 0 Reputation points
    2024-09-20T00:19:47.06+00:00

    Hello everyone!

    One of my disks in Storage Spaces suddenly failed, and it was simply impossible to keep it physically connected and boot the OS at the same time. So, I bought a new disk, swapped with the old one, and added it to the Pool in Storage Spaces. After that, I wanted to remove the old one from the Pool, but it stuck at 0.03%...
    User's image

    User's image

    Then I tried luck in PowerShell, but without success (maybe because I'm not honestly an experienced user).

    Simply put - it did nothing while repairing the virtual disk or removing the wrong, physical one. Even though there was written "running" on the bar above.
    User's image

    User's image

    Is there anything I can do to make Storage Spaces work again, or is it not possible because it only accounts for the scenario where the physical disk I want to remove is still plugged into my PC, which is something I cannot do?


  4. Jiri Mraz 0 Reputation points
    2024-10-01T10:51:08.42+00:00

    Nevermind. As I found out, the same issue was never solved, the only solution seems to be to format the pool and start over. Thankfully, the formatting at least allows to remove the failed disk and create a new pool (for those who would trust Storage Spaces for one more try).

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.