Creating a Windows partition on a server with hardware RAID
Objective
When you install Windows on a server with a hardware RAID configuration, the RAID partition will need to be built manually.
This guide will explain the steps needed to create a Windows partition on a server with hardware RAID.
Requirements
- a Dedicated Server with Windows installed and a hardware RAID card (LSI MegaRaid)
- at least two identical disks
- access to the OVHcloud Control Panel
Instructions
Following the steps in this guide will require you to delete and rebuild the existing RAID volume. This means that all the existing data will be lost. Be sure to make a backup of your data beforehand. This guide is for experienced users.
List the existing RAID volumes
First, we need to list the existing RAID volumes so that we can delete them. To do this, we will use the following command: MegaCli -LDInfo -Lall -aAll.
We can see in the results above that we currently have only one RAID volume on the server, and that the server has the Virtual Drive 0.
Deleting the RAID
We can now break the existing RAID and then create our new RAID.
To do this, we will use the command below. We will need to use the Virtual Drive number found in the previous step.
MegaCli -CfgLDDel -Lx -a0
x is the number of the Virtual Drive.
Example:
If your server already has more than one RAID, repeat the operation with each Virtual Drive number.
Find the disk IDs
We will now retrieve the Enclosure ID and the SlotID of the disks on the server to create our new RAID.
To do this, we will use the following command: MegaCli -PdList -aALL | egrep -i "Adapter|Slot|Enclosure Device".
Example:
We can see that we have three disks. The Enclosure ID and SlotIDs are 252:0, 252:1, and 252:2 respectively.
Create the new RAID
First, we will create the first RAID that will be used for our operating system.
We will use the following command: MegaCli -CfgLdAdd -rX[EncID:SlotID,EncID:SlotID,...] -szYYYYY -a0.
X is the desired RAID level (0, 1, 5, or 6).
EncID is the enclosure ID of the disk found in the previous step.
SlotID is the SlotIDs of the disk found in the previous step.
YYYYY is the size of our first virtual disk specified in MB.
In our example, we will create a RAID-5 volume on our three disks, with 200GB for our operating system.
It is advisable to create a volume with a little more space than the minimum size required. This is to ensure that the system has room for updates and installations.
Here, our first RAID has been created. Now we just have to assign the rest of the available space.
We will therefore create a second RAID via the following command: MegaCli -CfgLdAdd -rX[EncID:SlotID,EncID:SlotID,...] -a0.
X is the desired RAID level (0, 1, 5, or 6).
EncID is the enclosure ID of the disk found in the previous step.
SlotID is the SlotIDs of the disk found in the previous step.
Example:
It's done. Now all we have to do is check our RAID.
Check the RAID's creation
We will use the first command in this guide, which lists the RAID volumes: MegaCli -LDInfo -Lall -aALL.
Example:
We can also use the command fdisk -l to view our two RAID volumes.
Installing Windows from the OVHcloud Control Panel
Finally, go to the OVHcloud Control Panel to proceed with the installation of Windows on your server.
You will need to check the Customize partition configuration box, and change the current partition scheme to one specifying disk C, with a maximum size of 200GB.
Once the system is installed, log in to your Windows system and open up the utility Disk Management, and then partition the second virtual disk (corresponding to our second RAID, which is displayed as "unallocated") in the format GPT.
Go further
Join our community of users.