RAID level confusion (MegaCli vs megasasctl output)
Solution 1
I think the table is wrong.
Because RAID 10 is a stripe (RAID-0) of a Mirror (RAID-1)
Primary -> RAID-1
Secondary -> RAID-0
RAID 0 -> RAID 1 -> DISK
-> DISK
-> RAID 1 -> DISK
-> DISK
Solution 2
Just for more background info, you can use the command:
megacli -CfgDsply -aALL
To get a little more info, including disk groups, a info about spans. Below is my commented/indented output of selected lines (from a Windows machine, but it's pretty close).
Note that for the first disk group ("SPANNED DISK GROUP: 0"), it says RAID 10 eventhough it's just two disks mirrored. Ie., it's really RAID 1, but it seems to say RAID 10.
So looking at the 2nd disk group ("SPANNED DISK GROUP: 0"), if span 0 and span 1 were each just 2 concatenated/striped disks, then the next level up could be mirroring them and still report RAID10 (same as the first disk group). Probably, it's implemented as RAID10 not RAID01, but either way it would still report the same total size for the virtual drive. There's just not enough information here to know for sure.
Adapter: 0 Product Name: PERC H710P Mini Number of DISK GROUPS: 2 DISK GROUP: 0 # Simple 2 disk RAID for operating system Number of Spans: 1 SPAN: 0 Number of PDs: 2 Number of VDs: 1 Virtual Drive Information: Virtual Drive: 0 (Target Id: 0) Name : RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0 Size : 837.75 GB # Size of the virtual drive matches the size of each drive Mirror Data : 837.75 GB # indicating RAID 1 mirroring Number Of Drives : 2 Span Depth : 1 Physical Disk: 0 Drive's position: DiskGroup: 0, Span: 0, Arm: 0 Device Id: 0 Sequence Number: 2 Coerced Size: 837.75 GB [0x68b80000 Sectors] Physical Disk: 1 Drive's position: DiskGroup: 0, Span: 0, Arm: 1 Device Id: 1 Sequence Number: 2 Coerced Size: 837.75 GB [0x68b80000 Sectors] # The "spanned disk group 0" below could be either: # device_id 2 mirrored with device_id 3, making span 0 # device_id 4 mirrored with device_id 5, making span 1 # then span 0 and 1 striped together # or # device_id 2 striped/concatentated with device_id 3, making span 0 # device_id 4 striped/concatentated with device_id 5, making span 1 # then span 0 and 1 mirrored together SPANNED DISK GROUP: 0 # This is a different disk group from the one above because of Number of Spans: 2 # the word "spanned". SPAN: 0 Number of PDs: 2 Number of VDs: 1 Virtual Drive Information: Virtual Drive: 1 (Target Id: 1) Name :VD_1 # This virtual drive info is the same for both spans, indicating # the RAID info really associated with the disk group, rather # than the span RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0 Size : 1.635 TB Mirror Data : 1.635 TB Number Of Drives per span:2 Span Depth : 2 Physical Disk: 0 Drive's position: DiskGroup: 1, Span: 0, Arm: 0 Device Id: 2 Sequence Number: 2 Coerced Size: 837.75 GB [0x68b80000 Sectors] Physical Disk: 1 Drive's position: DiskGroup: 1, Span: 0, Arm: 1 Device Id: 3 Sequence Number: 2 Coerced Size: 837.75 GB [0x68b80000 Sectors] SPAN: 1 Number of PDs: 2 Number of VDs: 1 Virtual Drive Information: Virtual Drive: 1 (Target Id: 1) Name :VD_1 # This virtual drive info is the same for both spans, indicating # the RAID info really associated with the disk group, rather # than the span RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0 Size : 1.635 TB Mirror Data : 1.635 TB Number Of Drives per span:2 Span Depth : 2 Physical Disk: 0 Drive's position: DiskGroup: 1, Span: 1, Arm: 0 Device Id: 5 Sequence Number: 2 Coerced Size: 837.75 GB [0x68b80000 Sectors] Physical Disk: 1 Drive's position: DiskGroup: 1, Span: 1, Arm: 1 Device Id: 4 Sequence Number: 2 Coerced Size: 837.75 GB [0x68b80000 Sectors]
Solution 3
They seem to be both indicating a RAID 10 to me. Please have a look at http://www.snia.org/sites/default/files/SNIA_DDF_Technical_Position_v2.0.pdf from page 13 for a nice description of what you got as output from megacli.
Solution 4
First of all, thank you all for your collective help in trying to get accurate information. I am disappointed with LSI's documentation on megacli - the impetus for creating the reference page for myself in the first place. In regards to the section showing the raid levels and megaCLI's outputs, it took me a while to find re-discover the source of my information on that. I found it today. It was taken from the rapidsoft.de site (I'll add attribution on my page seeing that it is getting external attention which I was not thinking about when I posted it) :
I agree with those folks who believe that the output for RAID1 is not what one would expect from the DDF standards - I don't believe that RAID1 should not show a secondary level. However, the most relevant information to put on a webpage is, IMHO, what megacli DOES show, not what should be shown. I think what I have shown is correct, (but will happily update if/when I get better info).
Since this comment is already long, I will add my ideas about the question of Erathiel's situation on my blog. In short, without more data, it does look like RAID10 (first mirror then stripe) I wonder if he did it in several steps and megacli just recorded the final step of mirroring.
Solution 5
After some testing these seem to be both RAID-10 (even if both LD's look quite different regarding span depth and span size):
Virtual Drive: 1 (Target Id: 1)
Name :Virtual_Disk_1
RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0
Size : 2.725 TB
Sector Size : 512
Is VD emulated : No
Mirror Data : 2.725 TB
State : Optimal
Strip Size : 512 KB
Number Of Drives : 10
Span Depth : 1
Adapter 0 -- Virtual Drive Information:
Virtual Drive: 2 (Target Id: 2)
Name :
RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0
Size : 3.271 TB
Sector Size : 512
Is VD emulated : No
Mirror Data : 3.271 TB
State : Optimal
Strip Size : 64 KB
Number Of Drives per span:6
Span Depth : 2
Related videos on Youtube
![Erathiel](https://i.stack.imgur.com/9nAQQ.jpg?s=256&g=1)
Erathiel
Updated on September 18, 2022Comments
-
Erathiel almost 2 years
I'm utterly new to working with LSI MegaRAID controllers and I'm confused as to what RAID level I am actually running. My server is equipped with 4 disks, 4TB each and I would like to have them running in RAID-10. Searching around for some hints I've found this thread and followed the link in one of the answers.
Now, what confuses me is the output of
megacli
andmegasasctl
:# megacli -LDInfo -Lall -aALL | grep RAID RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0
According to the table this should mean I am currently running RAID-1. However according to this I am running RAID-10:
# megasasctl a0 LSI MegaRAID SAS 9260-4i encl:1 ldrv:1 batt:FAULT, module missing, pack missing, charge failed a0d0 7451GiB RAID 10 2x2 optimal a0e252s0 3726GiB a0d0 online a0e252s1 3726GiB a0d0 online a0e252s2 3726GiB a0d0 online a0e252s3 3726GiB a0d0 online
My confusion on this probably couldn't be worse.What am I missing here and which output is the one to be believed?
EDIT (in reply to CharlesH's request)
The output is as follows:
# megacli -LDInfo -Lall -aall Adapter 0 -- Virtual Drive Information: Virtual Drive: 0 (Target Id: 0) Name : RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0 Size : 7.276 TB Sector Size : 512 Is VD emulated : Yes Mirror Data : 7.276 TB State : Optimal Strip 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: WriteThrough, 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 Is VD Cached: No Exit Code: 0x00
-
CharlesH about 10 yearsWhats the output of megacli -LDInfo -L0 -a0 (of course L being your logical drive and a your adapter)? Do you have megaclisas? to run megaclisas-status if you can post this back to give some more information. However I do agree with MichelZ it looks like 10 to me.
-
Erathiel about 10 yearsThe output is way too long to post in a comment so I've added that to the question.
-
CharlesH about 10 yearsLooks perfect for RAID 10 to me.. Size : 7.276 TB (around 50% space loss from the 4 drives is correct) Number Of Drives per span:2 (as in per RAID 0 and then two set in RAID 1 so RAID 1+0 10) Span Depth : 2
-
Erathiel about 10 yearsWell, it looked like a RAID-10 to me as well, as far as I could tell from the available size and other things but this
RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0
thing and the reference at the blog got me terribly confused, given my next to zero experience with advanced RAID controllers. Thank you for your clarification! -
arganzheng about 8 yearsYou should combine with the
Span Depth
info to determine what raid is it. for example,RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0
withSpan Depth: 1
means RAID 1, whileRAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0
withSpan Depth: 2
means RAID 10.
-
-
Michael Hampton about 10 yearsWelcome to Server Fault. Please note that answers should be complete and self-contained. It's OK to link to external sites, but it should not be necessary to visit one to get the answer. With that in mind, your answer is too short, not too long.