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
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:
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:
Then the moment the repair is started, the situation changes to:
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).
I feel like I'm either missing something here or you're overthinking this. If you have a mirror, both disks are identical. Presuming you are doing a disk replacement of a good disk, you have 2 copies.
Pull out a good copy, install a blank hard disk, rebuild onto the new disk. This would be the same as simulating disk failure. The array will not go offline when you remove a disk, only a disk will go offline. In the event you have an issue with the rebuild, you could reinsert the other, original disk, then use your other new disk to clone that disk.