Configuring a software mirror (RAID) on Windows
Objective
On a Windows system, data redundancy is achieved by mirroring the primary disk to a second one. This is similar to a RAID 1 configuration but only involves two disks.
This guide explains how to reconfigure the disk mirror of your Windows system if it needs to be rebuilt due to corruption or disk failure.
Requirements
- A Windows dedicated server with a software mirror
- Administrative access to the server via RDP
Instructions
Establish a remote desktop (RDP) connection to your server.
Once logged in, right-click on the Start Menu button and open Run.

Enter "cmd" and click on OK.

The method to use depends on the partition style of your disks. Follow the instructions in this section for MBR or skip to the subsequent section for GPT. If you are unsure, run diskpart at the command prompt and enter list disk. Check the "Gpt" column in the output.
Rebuilding the mirror (MBR partion scheme)
At the command prompt, open DiskPart:
DiskPart executes commands without issuing warnings or asking for confirmation. Any changes done in DiskPart are irreversible. Entering commands while the wrong disk or volume is selected may therefore cause immediate data loss and/or prevent your system from booting. We recommend to proceed with caution and double-check each command.
Listing all disks and volumes
In this example, Disk 1 is a replacement drive that has been installed in order to replace the defective Disk M0 which had been physically removed previously.
The following code sections are for the purpose of illustration only, based on the example output above. You will need to adjust the instructions according to your actual configuration by replacing the values in the commands with your disk and volume identifiers.
Removing the replaced disk from the configuration
Initialising the replacement disk
Recreating the mirror between the first and the second disk
Repeat this step for each existing volume from Disk 0 that you want to mirror on Disk 1, using the associated drive letter (i.e. d, e, f, etc.).
The volume state will be Rebuild during the process, which may take several hours depending on the data stored on the disk. You can check the status in DiskPart:
It is best not to restart the server until the rebuild process is complete.
Rebuilding the mirror (GPT partition scheme)
At the command prompt, open DiskPart:
DiskPart executes commands without issuing warnings or asking for confirmation. Any changes done in DiskPart are irreversible. Entering commands while the wrong disk or volume is selected may therefore cause immediate data loss and/or prevent your system from booting. We recommend to proceed with caution and double-check each command.
Listing all disks and volumes
In this example, Disk 1 is a replacement drive that has been installed in order to replace the defective Disk M0 which had been physically removed previously.
The following code sections are for the purpose of illustration only, based on the example output above. You will need to adjust the instructions according to your actual configuration by replacing the values in the commands with your disk and volume identifiers.
Removing the replaced disk from the configuration
Initialising the replacement disk
On the new disk, create default and mandatory partitions, reflecting the existing partitioning of the first disk:
Recreating the mirror between the first and the second disk
Repeat this step for each existing volume from Disk 0 that you want to mirror on Disk 1, using the associated drive letter (i.e. d, e, f, etc.).
Recreating the boot environment and setting boot options for the second disk
Back at the command prompt, copy the boot files from the boot (EFI) partition on first disk (Disk 0) to the boot partition on the second disk (Disk 1).
Type the following 3 commands and execute each one with Enter:
Then launch DiskPart again and run the following commands:
The volume state will be Rebuild during the process, which may take several hours depending on the data stored on the disk. You can check the status in DiskPart:
It is best not to restart the server until the rebuild process is complete.
Go further
Join our community of users.