Windows Server – Replace HDD in Storage Spaces Mirror Without Losing Redundancy

storage-spaceswindowswindows-server-2012-r2

If I have two physical hard drives in a Storage Spaces pool and a 2-way mirrored virtual disk on them, how can I replace one HDD with a new (larger) one, without at any point having only a single copy of data?

A naive plan would be:

Starting point: two drives: hd0 and hd1

  • add new HDD (hd2)
  • copy data from either old HDD to hd2
  • remove hd0
  • optional cleanup
  • result: hd1 and hd2 have mirrored data

But Storage Spaces seem to work in other direction:

  • add new HDD (hd2)
  • remove hd0 from mirror (or entire pool actually)
  • at this point there is no more redundancy, if hd1 fails, the volume is lost
  • copy data from hd1 HDD to hd2 (rebuild/repair)
  • result: hd1 and hd2 have mirrored data

Is there a way to do this without having at any point only one copy of data?
(besides the obvious "backup and restore", which I expect to be much slower than a single copy operation between hard drives)

OS: Windows 2012R2

Best Answer

Short:

Apparently not. When the repair/rebuild is started, Storage Spaces "disconnects" the old drive from the mirror and keeps only one copy (on hd1) and start copying it to the new drive. So if hd1 fails before the rebuild is finished, the array is lost.

Options:

  • use an independent backup and restore from it in case of disk failure
  • use another partition on the new disk as an "online" backup
  • as the data is physically still on hd0, try to rescue them using some "undelete" tool (as it is ReFS on a Storage Spaces virtual disk, the chances are quite low, at least now in 2019, as those are not widely supported by 3rd party tools)
  • some other solution?

Long:

There does not seem (or I could not find one) to be a way to migrate a Mirror volume to a new physical disk in Storage Spaces that would keep it redundant and online in case the remaining old disk dies before the rebuild to the new disk is finished.

After inserting the new disk (using the names from a test system : PhysicalDisk1 old disk that will be replaced, PhysicalDisk2 old disk that should remain, PhysicalDisk5 new disk) the state is:

PS C:\Users\Administrator> Set-PhysicalDisk -FriendlyName "PhysicalDisk1" -Usage Retired
PS C:\Users\Administrator> Get-VirtualDisk -FriendlyName mirr | Get-PhysicalDisk

FriendlyName                      CanPool                           OperationalStatus                HealthStatus                     Usage                                                        Size
------------                      -------                           -----------------                ------------                     -----                                                        ----
PhysicalDisk1                     False                             OK                               Healthy                          Retired                                                 899.25 GB
PhysicalDisk2                     False                             OK                               Healthy                          Auto-Select                                               1.46 TB

Then the moment the repair is started, the situation changes to:

Repair-VirtualDisk -FriendlyName mirr
...
PS C:\Users\Administrator> Get-VirtualDisk -FriendlyName mirr | Get-PhysicalDisk

FriendlyName                      CanPool                           OperationalStatus                HealthStatus                     Usage                                                        Size
------------                      -------                           -----------------                ------------                     -----                                                        ----
PhysicalDisk2                     False                             OK                               Healthy                          Auto-Select                                               1.46 TB
PhysicalDisk5                     False                             OK                               Healthy                          Auto-Select                                               1.76 TB

So if now PhysicalDisk2 fails, the mirror is lost (PhysicalDisk1 is retired, PhysicalDisk2 is lost, PhysicalDisk5 does not have yet the complete copy of data).

Un-retireing PhysicalDisk1 does not help.

The quickest way seems to be to first to create a new "backup" (Simple) volume on the new HDD, copy data from the mirror to it, the start the mirror migration and if things fail, there is still a copy available (then PhysicalDisk1 can be un-retired and a new create a new Mirror created on PhysicalDisk1 and PhysicalDisk5).

Related Topic