大网数据广告活动
服务器运维问答

How to create Raid 10 with megacli

· 52CE 我爱测

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 l…

问题原文

原帖链接 · Henno · CC BY-SA 3.0

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?

社区高分解答

原帖链接 · abkrim · CC BY-SA 4.0

Response a Create Raid 10 (not Raid 6)

  1. First get the Adapter #

    # MegaCli Adpallinfo -aall | grep '^Adapter'  
    Adapter #0   
    

    MegaCli or megacli depending distro *nix

    In this case Adapter it's Adapter #0

  2. Get Device ID and Slot disk values:

     # MegaCli64 -PDlist -aall | grep -e '^Enclosure Device ID:' -e '^Slot Number:'
     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 Raid1 with disk 0 and 2, and other array for Raid1 with disks 1 and 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
    

    Or if megasasctl is unavailable:

     # 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
    

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2013-07-01)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。