Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have OpenFiler storage server.

Without installing Windows and MSM, I want to create raid10 array from disks 2 to 21.

I have already successfully installed MegaCli to OpenFiler but I'm stuck in figuring out the correct command line for creating a raid 10 array.

The documentations says that the syntax for creating a raid 10 is:

MegaCli -CfgSpanAdd -r10 -Array0[E:S,E:S] -Array1[E:S,E:S] -aN

My enclosure ID is 25, so:

[root@linux-h5ut ~]# MegaCli -CfgSpanAdd -r10 -Array0[E25:S02,E25:S21] -Array1[E25:S02,E25:S21] WB Cached NoCachedBadBBU -a0
Invalid input at or near token E

I have googled high and low but there doesn't seem to be any example doing raid10 with megaraid (only the syntax).

Can anyone explain what is wrong?

share|improve this question

You didn't understand the man page. E25:S02 - its like variable which should have int values. All you need:

1.Get adapter ID (it's 0 in my example):

root@sto# megacli Adpallinfo -aall | grep '^Adapter'                                                    
Adapter #0

2. Get E and S values:

megacli -PDlist -aall | grep -e '^Enclosure Device ID:' -e '^Slot Number:'

You will get something like this:

Enclosure Device ID: 20
Slot Number: 0
Enclosure Device ID: 20
Slot Number: 1
Enclosure Device ID: 20
Slot Number: 2
Enclosure Device ID: 20
Slot Number: 3
Enclosure Device ID: 20
Slot Number: 4

This is you E and S numbers, i.g. 20:0,20:1,20:2,20:3,20:4 So the command to create for example RAID6, will be:

megacli -CfgLdAdd -r6 [20:0,20:1,20:2,20:3,20:4] -a0
share|improve this answer

I used that (couple months ago to create raid 50):

megacli -CfgSpanAdd -r50 -Array0[252:2,252:3,252:4] Array1[252:5,252:6,252:7] WB RA Direct CachedBadBBU -a0

IBM x3560 and:

Product Name    : ServeRAID M5015 SAS/SATA Controller
Serial No       : SV14018726
FW Package Build: 12.13.0-0179
share|improve this answer

Response a Create Raid 10 (no Raid 6, no other raid)

  1. First get Adapter

    MegaCli Adpallinfo -aall | grep '^Adapter'  
    Adapter #0   
    
    #MegaCli or megacli depending distro *nix
    #In this case Adapter i'ts ---> 0
    
  2. Get Device ID and Slot disk values:

     Enclosure Device ID: 252
     Slot Number: 0
     Enclosure Device ID: 252
     Slot Number: 1
     Enclosure Device ID: 252
     Slot Number: 2
     Enclosure Device ID: 252
     Slot Number: 3
     #ID in this case for all it's 252
    
  3. According MegaCli command for create RAID 10 it's MegaCli -CfgSpanAdd -r10 -Array0[E:S,E:S] -Array1[E:S,E:S] -aN

     megacli -CfgSpanAdd -R10 -Array0[252:0,252:2] -Array1[252:1,252:3] -a0
     #In this case, create a RAID 10, creating one array for Raid0 with disk 0 & 2, and other array for Raid1 with disks 1&3 and N = 0 (-a0)
    
  4. Verify RAID

     megasasctl
     a0       LSI MegaRAID SAS 9271-4i encl:1 ldrv:1  batt:FAULT, low voltage, charge failed
     a0d0      1489GiB RAID 10  2x2  optimal
     a0e252s0    745GiB  a0d0  online
     a0e252s1    745GiB  a0d0  online
     a0e252s2    745GiB  a0d0  online
     a0e252s3    745GiB  a0d0  online
    

If not has megasasctl

     MegaCli -LDInfo -Lall -aALL


     Adapter 0 -- Virtual Drive Information:
     Virtual Disk: 0 (Target Id: 0)
     Name:
     RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
     Size:1.454 TB
     State: Optimal
     Stripe Size: 256 KB
     Number Of Drives per span:2
     Span Depth:2
     Default Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
     Current Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
     Access Policy: Read/Write
     Disk Cache Policy: Enabled
     Encryption Type: None
share|improve this answer

Seems that I should not use E and S letters.

At first I understood correctly and tried it letterlessly but also got invalid token errors because I was using -aALL instead of -a0 ("If you have only one controller it’s safe to use ALL instead of a specific ID"), and then read from this site that "E is the enclosure device ID in which the drive resides and S the slot number" and hence concluded that I should replace E and S with actual IDs. :(

share|improve this answer
    
But nevertheless, without E and S letters, megaraid responds with "OSSpecificInitialize: Failed to load libsysfs.so.2.0.2 Please ensure that libsfs is present in the system. The dependent library libsysfs.so.2.0.1 not available. Please contact LSI for distribution of the package Mix of configured and unconfigured drives are not possible.". I guess I have to get this library somehow. – Henno Jul 1 '13 at 14:01
    
I had to put /root/opt/lsi/3rdpartylibs/x86_64/libsysfs.so.2.0.2 to the same directory I had put MegaCli (/usr/local/bin) – Henno Jul 1 '13 at 14:08
    
Are you sure? Correct it's megacli -CfgSpanAdd for raids 10,50,60 and others with arrays – abkrim Jun 4 '15 at 18:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.