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?
Response a Create Raid 10 (not Raid 6)
First get the Adapter #
MegaCli or megacli depending distro *nix
In this case Adapter it's
Adapter #0
Get Device ID and Slot disk values:
ID in this case for all it's 252
According MegaCli command for create RAID 10 it's
MegaCli -CfgSpanAdd -r10 -Array0[E:S,E:S] -Array1[E:S,E:S] -aN
In this case, create a RAID 10, creating one array for Raid1 with disk 0 and 2, and other array for Raid1 with disks 1 and 3 and N = 0 (-a0)
Verify RAID
Or if
megasasctl
is unavailable: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):
2. Get E and S values:
You will get something like this:
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:
I used that (couple months ago to create raid 50):
IBM x3560 and:
I just created a 6-disk RAID-10 with MegaCli, and used the following commands:
(Assuming there is only one controller in these examples, so that
-aALL
can be used instead of specifying a particular controller.)Show the physical drives attached to the controller:
Note the "Enclosure Device ID" and "slot number" for the drives from this list as these are the numbers you replace "E" and "S" with, respectively, in the later raid-set creation commands.
Show the existing logical drives (i.e. RAID sets):
If you have an existing RAID array which you are going to re-use disks from then you need to remove the existing logical drive which those disks are part of. The logical drive number should be obtained from the previous command. Obviously this will destroy the data on this existing RAID array if you run it:
Now you have a bunch of disks which should be in the "Unconfigured(good)" state and hence are available for use in a new logical drive. Lets create a RAID-10 set of 6-disks, which is really a span of 3 RAID-1 pairs of disks:
In my case the disks are disks 2 to 7 on enclosure 32. These numbers are obtained from the PDList output you got earlier. If you have 4 disks then it's just two pairs, but the "ArrayN" chunks are always pairs as the underlying RAID-1 pairs in a RAID-10 set.
Your RAID array should now show up to your OS and be available for partitioning etc from there! :)
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. :(
MegaCli cfgspanadd r10 array0 "[25:02,25:21]" array1 "[25:02,25:21]" wb cached nocachedbadbbu a0
should work without problems.