MegaRAID Configuration

The MegaRAID by default will be be set in a RAID 1 configuration. This means that the data will be mirrored between the two drives. If we had a server which consist of 2 x 2TB HDD, we would only have a total usable space of 2 TB.

If we was to change the MegaRAID configuration to RAID 0, we would have a total usable space of 4 TB. If your using a Linux based distribution for your OS, then the OS partitioning will be configured automatically. If you have chosen to use Microsoft Windows server as the OS then you may have issues if the partitioning is done using MBR due to the limitations for partitioning table not being able to use hard drives beyond 2 TB.

As we have the MegaRAID controller, we can look to over come this by taking advantage of the RAID controller by creating a virtual disk under Microsoft Windows server.

We would look to access the MegaRAID BIOS Config Utility by pressing CTRL + H during the boot phase under KVM access. This will bring up utility. By default the RAID controller is set for RAID 1. We will look to delete the configuration and set a new configuration for the controller.

There are many ways to delete the RAID controller settings, we can look to do this via MegaRAID CLI of MegaCli syntax and via the GUI of MegaRAID BIOS Config Utility.

To delete the configuration with MegaCli:

MegaCli -CfgLdDel -L0 -a0
MegaCli -CfgLdDel -Lall -aAll
                                     
Adapter 0: Deleted Virtual Drive-0(target id-0)

Exit Code: 0x00

To set the the RAID controller to be RAID 0:

MegaCli -CfgLDAdd -R0[252:0,252:1] -a0
                                     
Adapter 0: Created VD 0

Adapter 0: Configured the Adapter!!

Exit Code: 0x00

The value of -R0[252:0,252:1] defines the RAID level of 0 for the enclosure ID of 252. The hard drives are defined on slot 0 and 1.

If you wish to revert back to the default settings of RAID 1, you can run the command of “MegaCli -CfgLdDel -L0 -a0″ to delete the current configuration and to set the new configration of RAID 1 we can use:”MegaCli -CfgLDAdd -R1[252:0,252:1] -a0“.

Now that we have set the RAID controller to use both drives of 2 x 2TB as RAID 0 so that we can make full use of the drives capacity, we can look verify the controller status by checking the RAID.

To check the RAID configuration:

MegaCli -LDInfo -Lall -a0 |grep -i size

Size                : 3.637 TB
Sector Size         : 512
Parity Size         : 0
Strip Size          : 256 KB

Here we can see that the total size for the RAID controller is 3.637 TB, this means that we can set our Windows server with a single C:\ drive for 3.637 TB. This works if your installing your own ISO directly as you can set the partition table to be GPT. 

In the situation where by your using a template or a installer for Windows server under MBR, you would need to make some adjustments to the configuration. Under MBR the maximum drive capacity is 2 TB, however our server has a total disk space of 2 x 2 TB HDD. In order for the server to see more than 2 TB, we would need to first define the OS partition for C:\ and then to assign the remaining space as D:\. This is to satisfy the MBR limitation and to have the remaining drive capacity created as a virtual drive.

As we will be defining the OS drive of C:\, we will set the OS drive to be 200GB. This should be enough storage for applications and other media to be installed. The remaining space will be defined as D:\.

Here we can see the configuration of the RAID controller from the MegaRAID BIOS Config Utility.

MegaRAID_virtual_configuration

The virtual drive 0 has been set as 200 GB. This will be our OS drive for C:\, we have the remaining capacity of 3.442 TB which remains unconfigured. We can look to configure this within the MegaRAID BIOS Config Utility, or we can look to do this under MegaRAID Storage Manager

To check the RAID configuration:

MegaCli -LDInfo -Lall -a0 |grep -i size

Size                : 200.0 GB
Sector Size         : 512
Parity Size         : 0
Strip Size          : 256 KB

To verify the RAID configuration.

MegaCli -CfgDsply -a0
                                     
==============================================================================
Adapter: 0
Product Name: LSI MegaRAID SAS 9271-4i
Memory: 1024MB
BBU: Present
Serial No: SV50418291
==============================================================================
Number of DISK GROUPS: 1

DISK GROUP: 0
Number of Spans: 1
SPAN: 0
Span Reference: 0x00
Number of PDs: 2
Number of VDs: 1
Number of dedicated Hotspares: 0
Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :
RAID Level          : Primary-0, Secondary-0, RAID Level Qualifier-0
Size                : 200.0 GB
Sector Size         : 512
Is VD emulated      : No
Parity Size         : 0
State               : Optimal
Strip Size          : 256 KB
Number Of Drives    : 2
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
Physical Disk Information:

Physical Disk: 0
Enclosure Device ID: 252
Slot Number: 0
Drive's position: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: N/A
Device Id: 5
WWN: 5000cca22dd0909e
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA

Raw Size: 1.819 TB [0xe8e088b0 Sectors]
Non Coerced Size: 1.818 TB [0xe8d088b0 Sectors]
Coerced Size: 1.818 TB [0xe8d00000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: Online, Spun Up
Commissioned Spare : No
Emergency Spare : No
Device Firmware Level: AA70
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x4433221103000000
Connected Port Number: 1(path0) 
Inquiry Data:       PN2134P6H5EN9PHGST HUS724020ALA640                    MF6OAA70
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None 
Device Speed: 6.0Gb/s 
Link Speed: 6.0Gb/s 
Media Type: Hard Disk Device
Drive:  Not Certified
Drive Temperature :32C (89.60 F)
PI Eligibility:  No 
Drive is formatted for PI information:  No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s 
Drive has flagged a S.M.A.R.T alert : No

Physical Disk: 1
Enclosure Device ID: 252
Slot Number: 1
Drive's position: DiskGroup: 0, Span: 0, Arm: 1
Enclosure position: N/A
Device Id: 4
WWN: 5000cca22dd08483
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA

Raw Size: 1.819 TB [0xe8e088b0 Sectors]
Non Coerced Size: 1.818 TB [0xe8d088b0 Sectors]
Coerced Size: 1.818 TB [0xe8d00000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: Online, Spun Up
Commissioned Spare : No
Emergency Spare : No
Device Firmware Level: AA70
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x4433221102000000
Connected Port Number: 0(path0) 
Inquiry Data:       PN2134P6H5AEAPHGST HUS724020ALA640                    MF6OAA70
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None 
Device Speed: 6.0Gb/s 
Link Speed: 6.0Gb/s 
Media Type: Hard Disk Device
Drive:  Not Certified
Drive Temperature :30C (86.00 F)
PI Eligibility:  No 
Drive is formatted for PI information:  No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s 
Drive has flagged a S.M.A.R.T alert : No

Exit Code: 0x00

We can now look to install Windows to the server itself under the 200GB partition. Once the OS has been installed we can look to active the MegaRAID Storage Manager. We should see the following information:

MegaRAID_Storage_Manager_Logical
If we select the capacity of “3.442 TB”, we can create another virtual drive to hold the data.

MegaRAID_virtual_drive_summary

The drive will appear straight away under Windows with the capacity of 3.44 TB under drive D:\.

MegaRAID_my_computer

MegaRAID_drive_properties

Here is what Windows Computer Management sees:

MegaRAID_computer_management

To set the 200GB you can define it with:

MegaCli -CfgLdDel -L0 -a0
MegaCli -CfgLdAdd -R0[252:0,252:1] -sz200GB -a0