MegaCli命令设置raid磁盘阵列为直通模式

MegaCli设置raid磁盘阵列为直通模式

最近研发同事们接到了一个奇怪的BUG:在24块硬盘并发读写时,写速率大大超过读的速率,需要在服务器的raid磁盘阵列中将硬盘设置为直通模式来测试复现。
一般来说直通模式只要在BIOS里设置就行了,但这个服务器比较特殊。架构和固件等均为国产,固件扩展性较差,不支持直通模式的设置。于是进入Linux系统,使用自带的MegaCli命令设置。

  1. 设置磁盘阵列模式为直通:
MegaCli -AdpSetProp -EnableJBOD -1 -aALL 

若设置成功,返回日志如下:

Adapter 0: Set JBOD to Enable success.

Exit Code: 0x00
  1. 清除当前所有能识别的的raid:
MegaCli  -CfgLdDel -Lall -a0

若清除成功,返回日志如下:

Adapter 0: Deleted Virtual Drive-0(target id-0)
Adapter 0: Deleted Virtual Drive-1(target id-1)
Adapter 0: Deleted Virtual Drive-2(target id-2)
Adapter 0: Deleted Virtual Drive-3(target id-3)

Exit Code: 0x00
  1. 查询每一块硬盘的详细信息:
MegaCli -PDList -aALL

单块硬盘信息如下,记录Enclosure Device ID和Slot Number:

Enclosure Device ID: 8
Slot Number: 7
Enclosure position: 1
Device Id: 16
WWN: 5000c500cf59ef4b
Sequence Number: 4
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA

Raw Size: 7.277 TB [0x3a3812ab0 Sectors]
Non Coerced Size: 7.276 TB [0x3a3712ab0 Sectors]
Coerced Size: 7.276 TB [0x3a3710000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  4096
Firmware state: JBOD
Device Firmware Level: SN02
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5001c45028621287
Connected Port Number: 0(path0) 
Inquiry Data:             WKD15YBHST8000NM000A-2KE101                     SN02    
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 :34C (93.20 F)
PI Eligibility:  No 
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : Enabled
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s 
Drive has flagged a S.M.A.R.T alert : No
  1. 设置单块硬盘的模式为直通,其中8是Enclosure Device ID,5是Slot Number:
MegaCli  -PDMakeJBOD -PhysDrv[8:5] -a0

若成功设置,返回日志如下:

Adapter: 0: EnclId-8 SlotId-5 state changed to JBOD.


Exit Code: 0x00

注意每块硬盘都要单独设置直通

  • 0
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值