OVH Guide

Create a Windows partition with a Hard RAID

Discover here how to create a partitioning for Windows on a RAID Hardware server.

Requirements

Manipulations in this guide requires breaking the existing RAID. This means that all the existing datas will be lost. Be sure to make a backup of your data beforehand. This guide is for experienced users.

To create your partitioning, it will be necessary to create new RAID volumes on the card. For this, you will need to :

  • Have a server with a Hardware RAID. (LSI MegaRaid card)
  • Have at least two identical drives. (In this guide we have a server with 3 disks)
  • Have access to the rescue mode.

Procedure

List the RAID volumes

First, we need to list RAID volumes so we can then delete them.

To do this, we use the following command MegaCli -LDInfo -Lall -aAll

Example :

 root@rescue:~# MegaCli -LDInfo -Lall -aAll   Adapter 0 -- Virtual Drive Information: Virtual Drive: 0 (Target Id: 0) Name                : RAID Level          : Primary-5, Secondary-0, RAID Level Qualifier-3 Size                : 3.637 TB Sector Size         : 512 Is VD emulated      : No Parity Size         : 1.818 TB State               : Optimal Strip Size          : 256 KB Number Of Drives    : 3 Span Depth          : 1 Default Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU Current Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU Default Access Policy: Read/Write Current Access Policy: Read/Write Disk Cache Policy   : Disk's Default Encryption Type     : None Bad Blocks Exist: No PI type: No PI   Is VD Cached: No   Exit Code: 0x00 

We can see that we currently have only one RAID on the server, and that the server has the Virtual Drive 0.

Breaking RAID

We can now break existing the RAID and then create our new RAID.

To do this, we will use the command below, that we will need to adapat with the number of Virtual Drive recovered previously.

MegaCli -CfgLDDel -Lx -a0

The number of Virtual Drive

Example :

 root@rescue:~# MegaCli -CfgLDDel -L0 -a0   Adapter 0: Deleted Virtual Drive-0(target id-0)   Exit Code: 0x00 

If your server already has more than one RAID, repeat the operation with the number of Virtual Drive.

Recover 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 :

 root@rescue:~# MegaCli -PdList -aALL | egrep -i "Adapter|Slot|Enclosure Device" Adapter #0 Enclosure Device ID: 252 Slot Number: 0 Enclosure Device ID: 252 Slot Number: 1 Enclosure Device ID: 252 Slot Number: 2 

We can see that we have 3 disks, the Enclosure ID and SlotID are respectively 252:0, 252:1, et 252:2.

Create new RAID

First, we create the 1st RAID that will be used for our operating system.

We use the following command : MegaCli -CfgLdAdd -rX[EncID:SlotID,EncID:SlotID,...] -szYYYYY -a0

Desired RAID (0, 1, 5, ou 6)

Enclosure ID of the previously recovered disks

SlotIDs of the previously recovered disks

Size of our 1st virtual disk

In our example, we will create a RAID 5 on our 3 disks, of a size of 200GB for our operating system.

It is advisable to take a little more space in order to have a partition of the minimum size required, knowing that the configuration requires a little space.

 root@rescue:~# MegaCli -CfgLdAdd -r5[252:0,252:1,252:2] -sz204800 -a0   Adapter 0: Created VD 0   Adapter 0: Configured the Adapter!!   Exit Code: 0x00 

Here, our first RAID is created. We now 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

Desired RAID (0, 1, 5, ou 6)

Enclosure ID of the previously recovered disks

SlotIDs of the previously recovered disks

Example :

 root@rescue:~# MegaCli -CfgLdAdd -r5[252:0,252:1,252:2] -a0   Adapter 0: Created VD 1   Adapter 0: Configured the Adapter!!   Exit Code: 0x00 

It's done. All we have to do is check our RAID.

Check the RAID's creation

We will then use the first command in this guide, which lists RAID : MegaCli -LDInfo -Lall -aALL

Example :

 root@rescue:~# MegaCli -LDInfo -Lall -aAll     Adapter 0 -- Virtual Drive Information: Virtual Drive: 0 (Target Id: 0) Name                : RAID Level          : Primary-5, Secondary-0, RAID Level Qualifier-3 Size                : 200.195 GB Sector Size         : 512 Is VD emulated      : No Parity Size         : 100.097 GB State               : Optimal Strip Size          : 256 KB Number Of Drives    : 3 Span Depth          : 1 Default Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU Current Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU Default Access Policy: Read/Write Current Access Policy: Read/Write Disk Cache Policy   : Disk's Default Encryption Type     : None Bad Blocks Exist: No PI type: No PI   Is VD Cached: No     Virtual Drive: 1 (Target Id: 1) Name                : RAID Level          : Primary-5, Secondary-0, RAID Level Qualifier-3 Size                : 3.441 TB Sector Size         : 512 Is VD emulated      : No Parity Size         : 1.720 TB State               : Optimal Strip Size          : 256 KB Number Of Drives    : 3 Span Depth          : 1 Default Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU Current Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU Default Access Policy: Read/Write Current Access Policy: Read/Write Disk Cache Policy   : Disk's Default Encryption Type     : None Bad Blocks Exist: No PI type: No PI   Is VD Cached: No   Exit Code: 0x00 

We can also use the command fdisk -l to view our two RAID volumes.

 root@rescue:~# fdisk -l   Disk /dev/sda: 200.2 GiB, 214958080000 bytes, 419840000 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes   Disk /dev/sdb: 3.5 TiB, 3784730214400 bytes, 7392051200 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes 

Installing Windows from the Customer Area

Finally, go to your customer area to proceed with the installation of Windows on your server.

You will need to check the box Customize partition configuration, change the current partition scheme to one specify disk C:, with a maximum size of 200GB.

Once the system is installed, go to your Windows system in the utility Disk Manager, and partition the second virtual disk (corresponding to our second RAID which is displayed as "unallocated") in the format GPT.