none
Storage Spaces - Remove Physical Disk

    Question

  • I set up a Storage Pool with 1 x 2TB SATA disk and 3 x 300GB SATA disks. I then created 3 virtual disks, 2 of which were "Simple" and one with "Parity" - thin provisioning, 4TB limit with a 2TB volume on that virtual disk. So far so good.

    I then started copying data to the 2TB volume. After some copying 400 - 500GB to the volume, file copy would just hang forever and server became unresponsive and would not shutdown properly.

    After reboot, looking at the physical disk properties, the 300GB disks were all shown as being full (100% used). OK, not expected behaviour, but lets add more space. I then added a second 2TB disk added it to the pool.

    I would now like to remove one of the 300GB drives from the pool (so that I can replace it with a further 2TB drive). However, in Server Manager, the Remove Disk option is greyed out and when I try using the PowerShell Remove-PhysicalDisk cmdlet, I get a 'Disk is not empty' error.

    So, my question is:

    How can I move the data off a physical disk in a storage pool and then remove it from the pool?

    Thanks for your help, 

    Saturday, March 24, 2012 8:44 AM

Answers

  • I found the solution and...  it's easy to do with PowerShell.

    Here's the process:

    1. Open PowerShell in admin mode (PowerShell ISE is better)
    2. To get the names of the disks, type the following command:
      Get-PhysicalDisk
    3. To get the names of the virtual disks, type the following command:
      Get-Virtual-Disk
    4. First mark the disk you want to remove as "retired" by the following command:
      Set-PhysicalDisk -FriendlyName 'PhysicalDiskXX' -Usage Retired
    5. Now your disk is mark to be removed.  You need to rebuild each of your virtual disks with the following command:
      Repair-VirtualDisk -FriendlyName 'My Virtual Disk'
    6. You can monitor the progression of the process by typing the following command:
      Get-StorageJob
    7. Once everything is done, just remove the disk from the pool with this command:
      Remove-PhysicalDisk -FriendlyName 'PhysicalDiskXX'
    8. That's it!

    Carl.


    • Edited by Carl de Billy Friday, November 08, 2013 1:59 AM typo
    • Proposed as answer by woongbin Thursday, January 16, 2014 1:54 AM
    • Marked as answer by DaveH Thursday, January 16, 2014 9:31 AM
    Friday, November 08, 2013 1:57 AM
  • Hi Shaon,

    Thanks for the response. Sorry I missed the previous problem report.

    I disagree about ease of being able to remove a physical disk from a storage pool.  Fair enough that the disk must be empty before it can be removed - but there needs to be some other way of emptying it other than just deleting the virtual disks that are using it. On a big storage pool, there could be multiple virtual disks and it would cause significant disruption to delete all the data (and all the shares) on all of those disks.

    I know it is not directly comparable, but Windows Home Server has a very neat Remove Disk menu option - the OS then takes care of emptying the disk and it tells you when it is safe to remove it. I think that that is what is needed here.

    Thanks anyway,

    Dave

    Monday, March 26, 2012 5:52 PM
  • Hi,

    For the first part of your description, it seems that there is an issue in current version of Windows 8. Though we could create a virtual disk which is much larger than the actual size, system will freeze when we trying to store data larger than the actual size (some users report a different result that their system froze when arrive the size of the minimum disk). See this article:

    http://social.technet.microsoft.com/Forums/en-US/winserver8gen/thread/8f5f692e-12d4-4fc7-9525-b6d869037a21

    For the second part, I think it make sense that not allow user to delete a physical disk from the storage pool, which data is stored on it. When creating simple or parity VD, data is striped across physical disks. Thus removing any one of the physical disks will damage data.

    If you backup the files in that VD and delete it, you will able to remove physical disks from the pool then.


    TechNet Subscriber Support in forum |If you have any feedback on our support, please contact tnmff@microsoft.com.

    Monday, March 26, 2012 7:04 AM
    Moderator

All replies

  • Hi,

    For the first part of your description, it seems that there is an issue in current version of Windows 8. Though we could create a virtual disk which is much larger than the actual size, system will freeze when we trying to store data larger than the actual size (some users report a different result that their system froze when arrive the size of the minimum disk). See this article:

    http://social.technet.microsoft.com/Forums/en-US/winserver8gen/thread/8f5f692e-12d4-4fc7-9525-b6d869037a21

    For the second part, I think it make sense that not allow user to delete a physical disk from the storage pool, which data is stored on it. When creating simple or parity VD, data is striped across physical disks. Thus removing any one of the physical disks will damage data.

    If you backup the files in that VD and delete it, you will able to remove physical disks from the pool then.


    TechNet Subscriber Support in forum |If you have any feedback on our support, please contact tnmff@microsoft.com.

    Monday, March 26, 2012 7:04 AM
    Moderator
  • Hi Shaon,

    Thanks for the response. Sorry I missed the previous problem report.

    I disagree about ease of being able to remove a physical disk from a storage pool.  Fair enough that the disk must be empty before it can be removed - but there needs to be some other way of emptying it other than just deleting the virtual disks that are using it. On a big storage pool, there could be multiple virtual disks and it would cause significant disruption to delete all the data (and all the shares) on all of those disks.

    I know it is not directly comparable, but Windows Home Server has a very neat Remove Disk menu option - the OS then takes care of emptying the disk and it tells you when it is safe to remove it. I think that that is what is needed here.

    Thanks anyway,

    Dave

    Monday, March 26, 2012 5:52 PM
  • I agree, there should be a way to "upgrade" the storage by cycling in new disks and remove older and smaller drives. It shouldn't be hard to move the data blocks from a select disk if there is ample free storage space in the storage pool. Sure it will take some time to actually migrate the data from the disk but otherwise a storage pool is kind of a dead end since you can't really replace the disks in there.
    Tuesday, March 27, 2012 8:33 AM
  • It is a little similar like remove a disk from a RAID0 without data lose. Currently we will have to backup-delete-restore to free one of a disk in RAID0. I also think it will be a good function to help "clone" current data on a specific disk to other(s). Anyway I will record this and report as a requirement.


    TechNet Subscriber Support in forum |If you have any feedback on our support, please contact tnmff@microsoft.com.

    Tuesday, April 03, 2012 7:08 AM
    Moderator
  • If the disks are set to parity with thin provisioning then you should just be able to remove one of the drives (as if it failed) and it should rebuild it once you put a new drive regardless of the size as long as it is bigger.  Is this true?  The whole scenario would be worthless if one drive failed and you lost the whole volume, that is supposed to be what the parity is for.
    Wednesday, April 04, 2012 5:20 AM
  • I would rather a process that marked a disk for removal, shuffled the data off it, told you 'it is now safe to remove this drive' than rely on un-plug and rebuild the 'array'.
    Monday, July 16, 2012 2:41 AM
  • Agreed. It seems like the architecture allows this with the separation of "Evict Disk" from "Remove Disk". But it doesn't seem to be implemented (yet) - at least not for parity disks.

    See also here: http://social.technet.microsoft.com/Forums/en-IN/winserver8gen/thread/cc2ca5d9-e199-4fe1-846f-d4079d88740b

    Friday, July 20, 2012 2:42 AM
  • Has this issue been updated?? And why is this question marked answered?  What was the answer?  "backup-delete-restore"?  So what happens when there wasn't a backup for a virtual disk that was set up in PARITY mode, and one of the physical disks it is made on fails???  Maybe I don't understand the Server Pool's definition of parity mode.  I thought that as long as there are three disks for every failed disk the data isn't lost - and all that is required is to remove the failed disk and replace it with another one to restore normal operation.  I thought SIMPLE mode meant RAID0...

    Saturday, October 27, 2012 3:24 AM
  • Well I have a real answer for anyone else unfortunate to come across this problem later on:

    Step One: Don't Panic.... there is fix :) 

    Step Two: Offline all the virtual disks in the pool.  Caveat: Make sure the disks are not in use prior to taking offline.  This means shutting down VMs and/or anything else you may have running on the disks. So much for always available, but that's minor compared to losing an entire pool.

    Step Three: Repair the virtual drives as needed.  You may need to detach them.

    Step Four: Remove the failed drive and replace when able.

    Step Five: get on with your life.... :)

    Saturday, October 27, 2012 5:04 AM
  • Did I completely miss something here, I was of the understanding that if you add a bunch of disks to a storage pool it will allow you to remove disks and add bigger disks to scale up and also depending on the config give fault tollerance and rebuild the pool when a new disk is available. So this is what I have found so far....

    Running the latest final release of Server 2012 with update. Created a storage pool from 3 x 500gb and 1 x 1tb disk. Thin provisioned with parity a 100tb vd, coped some data to the disk. Setup data deduplication and enabled on the volume. I then powered down the server and removed the 1tb disk. Booted backup and still had access to the data but had a warning on the pool that it was in a degraded state, I then added a 2tb disk and added that to the pool but still it shows as degraded. I tried repairing the vd but the status flashes up and nothing more.  Very little info in the event logs and I left overnight to see if the pool would rebuild. I cannot remove the failed disk or do anything with it it just says I must add the same or a bigger disk which I already did. Hmmm lucky this is just a test to see how well this would shape up in a business environment but so far its not great. So is it me did I miss something?

    Wednesday, November 14, 2012 8:38 AM
  • when I run the powershell command Get-VirtualDisk the operational Status is set to incomplete :-/ hmmm

    Wednesday, November 14, 2012 9:10 AM
  • wow, so I had to retire the disk first in Powershell before it would let me remove the disk. now it displays everything as healthy. Very faffy and a scenario that shouldnt have happened.
    Wednesday, November 14, 2012 10:05 AM
  • I don't understand how to make the disk are not used. When I try to remove a disk, I have the error "disk are used" but I have unmounted the Space Storage and reboot the computer.

    I want just remove a disk because the SMART state is "warning" to replace it by a new. The storage pool doesn't have duplication or parity (I think create a new one with this option after it).

    I used Windows 8 Pro and I can only use PowerShell to remove a drive (why it's not in the configuration panel like with Windows Server 2012?).


    • Edited by Aarklendoia Thursday, January 03, 2013 8:27 AM
    Thursday, January 03, 2013 8:23 AM
  • I'm having the same problem with Windows Server 2012 Essential.

    I want to replace a bad drive, SMART show faulty sectors. So I did a RMA with WD and got a new drive, exactly the same as the one I want to replace..

    Added the new physical disk to the pool (Simple, Thin) and do not have the evict option.. when I try to remove the disk it says it its used by the pool.. and after adding the new empty drive I cant remove it either..

    I tried the detach option, but it says I have to repair the virtual disk. that option is not available for me.. when I re-attach the virtual disk and then try the remove option it says that I first have to delete it.. I don't want loose my data.

    Has anyone found a solution for this.. I just want to replace my faulty drive !

    Monday, March 25, 2013 1:06 PM
  • I too am experiencing the same issue with WS 2012. I have tried various options and am unable to remove any disks from the pool. I tried deleting some of the VD to create space to remove a drive with no luck.

    Thursday, August 15, 2013 4:10 PM
  • WS 2012 here, same problem,
    Anyone any luck? 
    Thursday, October 24, 2013 8:03 PM
  • I found the solution and...  it's easy to do with PowerShell.

    Here's the process:

    1. Open PowerShell in admin mode (PowerShell ISE is better)
    2. To get the names of the disks, type the following command:
      Get-PhysicalDisk
    3. To get the names of the virtual disks, type the following command:
      Get-Virtual-Disk
    4. First mark the disk you want to remove as "retired" by the following command:
      Set-PhysicalDisk -FriendlyName 'PhysicalDiskXX' -Usage Retired
    5. Now your disk is mark to be removed.  You need to rebuild each of your virtual disks with the following command:
      Repair-VirtualDisk -FriendlyName 'My Virtual Disk'
    6. You can monitor the progression of the process by typing the following command:
      Get-StorageJob
    7. Once everything is done, just remove the disk from the pool with this command:
      Remove-PhysicalDisk -FriendlyName 'PhysicalDiskXX'
    8. That's it!

    Carl.


    • Edited by Carl de Billy Friday, November 08, 2013 1:59 AM typo
    • Proposed as answer by woongbin Thursday, January 16, 2014 1:54 AM
    • Marked as answer by DaveH Thursday, January 16, 2014 9:31 AM
    Friday, November 08, 2013 1:57 AM
  • Why should we have to do that (seems like a work around at best). It needs to be fixed by Microsoft!!!
    Wednesday, December 11, 2013 9:02 PM
  • FriendlyName is not an option on 8.1? 

    I get: 

    Remove-PhysicalDisk : A parameter cannot be found that matches parameter name 'FriendlyName'.

    Monday, March 09, 2015 2:35 PM
  • Hi Ganey,

      That's a mistake... to be honest, the removal part could be done in the GUI once the repair is completed. Sorry for this misleading step.

    Carl.

    Tuesday, March 17, 2015 5:28 AM
  • If the removal must be done in PowerShell you can use something like the following:

    PS C:\> $DiskToRemove = Get-PhysicalDisk -Friendlyname "PhysicalDiskName"
    PS C:\> Remove-PhysicalDisk -PhysicalDisks $DiskToRemove -StoragePoolFriendlyName "StoragePoolName"

    I have personally removed and replaced disks in a striped parity disk set with no problems at all, no lost data or requirement to rebuild storage pool. Just takes time for the repair-virtualdisk to complete.


    www.PokeyStuff.com

    Friday, April 03, 2015 8:32 AM
  • Hi everybody,

    I'm running on Windows 8.1.
    Set storage space with parity and 3 disks 2Tb 1Tb and 500Gb.
    The 500Gb went wrong so I add a 2Tb, the space seems to repair by itself.
    Everything seems ok to me and i remove the 500Gb.

    But now some files are missing, directory structure seems ok, but some folders are empty.

    Is that possible something went wrong with repair or remove disk
    Is there a powershell command to reassign the 500Gb to the storage pool and recover data
    pretty sur that drive is not dead but just went to sleep)

    Thanks for your help

    Friday, June 26, 2015 8:11 AM
  • I have a mirrored storage pool that originally had 2 mirrored physical disks. I have one large Virtual Disk that is using the storage pool. I wanted to replace one physical disk with a larger SSD so I disconnected the smaller HDD and replaced with the SSD. I ran a repair on the virtual disk and it completes very quickly and then shows a status of complete but with a degraded status.

    I have followed the steps:

    1. Open PowerShell in admin mode (PowerShell ISE is better)
    2. To get the names of the disks, type the following command:
      Get-PhysicalDisk
    3. To get the names of the virtual disks, type the following command:
      Get-Virtual-Disk
    4. First mark the disk you want to remove as "retired" by the following command:
      Set-PhysicalDisk -FriendlyName 'PhysicalDiskXX' -Usage Retired
    5. Now your disk is mark to be removed.  You need to rebuild each of your virtual disks with the following command:
      Repair-VirtualDisk -FriendlyName 'My Virtual Disk'
    6. You can monitor the progression of the process by typing the following command:
      Get-StorageJob
    7. Once everything is done, just remove the disk from the pool with this command:
      PS C:\> $DiskToRemove = Get-PhysicalDisk -Friendlyname "PhysicalDiskName"
      PS C:\> Remove-PhysicalDisk -PhysicalDisks $DiskToRemove -StoragePoolFriendlyName"StoragePoolName"

    But I receive the below error when I get to step number 7:

    Remove-PhysicalDisk : One of the physical disks specified could not be removed because it is still in use.
    At line:1 char:1
    + Remove-PhysicalDisk -PhysicalDisks $DiskToRemove -StoragePoolFriendlyName "MackN ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (StorageWMI:ROOT/Microsoft/..._StorageCmdlets) [Remove-PhysicalDisk], CimE 
       xception
        + FullyQualifiedErrorId : StorageWMI 51004,Remove-PhysicalDisk

    Any thoughts?

    Saturday, July 04, 2015 10:51 AM
  • Thanks a lot !
    Tuesday, July 21, 2015 7:57 AM
  • ¿Still no solutions for this kind of problems?

    Pude resolverlo de esta manera: El nuevo PhysicalDisk agregado al StoragePool indicaba "Unknow" en MediaType. Lo establecí como HDD, mediante:

    Set-PhysicalDisk -FriendlyName PhysicalDisk1 -MediaType HDD

    y fue entonces cuando pude reparar los Discos Virtuales del StoragePool.

    Nota: Inmediatamente después de agregar el nuevo disco duro, intenté varias veces reparar los Discos Virtuales y no funcionaba, hasta que corregí la propiedad MediaType del PhysicalDisk agregado más recientemente.

    • Edited by RandyReyes Thursday, August 13, 2015 11:34 PM
    • Proposed as answer by RandyReyes Thursday, August 13, 2015 11:34 PM
    Thursday, August 13, 2015 11:07 PM
  • Here's the process:

    1. Open PowerShell in admin mode (PowerShell ISE is better)
    2. To get the names of the disks, type the following command:
      Get-PhysicalDisk
    3. To get the names of the virtual disks, type the following command:
      Get-Virtual-Disk
    4. First mark the disk you want to remove as "retired" by the following command:
      Set-PhysicalDisk -FriendlyName 'PhysicalDiskXX' -Usage Retired
    5. Now your disk is mark to be removed.  You need to rebuild each of your virtual disks with the following command:
      Repair-VirtualDisk -FriendlyName 'My Virtual Disk'
    6. You can monitor the progression of the process by typing the following command:
      Get-StorageJob
    7. Once everything is done, just remove the disk from the pool with this command:
      Remove-PhysicalDisk -FriendlyName 'PhysicalDiskXX'
    8. That's it!

    I WISH THE PROCESS WORKED!!!!  Points one thru five work fine. I had to add parameters to get item five work. It fails unless addition parameters are included.  Without item 5 working, item six is worthless and won't work. With effort I was able to get items 1-6 to work, but I have spent hours trying to find the correct set of parameters to get item 7 to work.  Oh if life were so simple! 


    server 2003 novice and rookie

    Monday, August 08, 2016 1:29 AM
  • Hi, 

    if your Virtual disk is set as "Simple" then you can not remove a disk even if its in retired state.

    Cheers 

    Thursday, October 12, 2017 3:25 PM