Megacli常用命令匯總


https://www.linuxhub.org/?p=4389
http://dp2u.com/2016/MegaCli-online-create-RAID.html

 

 

 

 

1.顯示Rebuid進度

/opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -ShowProg -physdrv[20:2] -aALL

2.查看E S

/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aAll -NoLog | grep -Ei "(enclosure|slot)"

3.查看所有硬盤的狀態

/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aAll -NoLog

4.查看所有Virtual Disk的狀態

/opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aAll -NoLog

RAID Level對應關系:

RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0 RAID 1
RAID Level : Primary-0, Secondary-0, RAID Level Qualifier-0 RAID 0
RAID Level : Primary-5, Secondary-0, RAID Level Qualifier-3 RAID 5
RAID Level : Primary-1, Secondary-3, RAID Level Qualifier-0 RAID 10

5.在線做Raid

/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[0:11] WB NORA Direct CachedBadBBU -strpsz64 -a0 -NoLog /opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r5 [12:2,12:3,12:4,12:5,12:6,12:7] WB Direct -a0 

6.點亮指定硬盤(定位)

/opt/MegaRAID/MegaCli/MegaCli64 -PdLocate -start -physdrv[252:2] -a0 

7.清除Foreign狀態

/opt/MegaRAID/MegaCli/MegaCli64 -CfgForeign -Clear -a0 

8.查看RAID陣列中掉線的盤

/opt/MegaRAID/MegaCli/MegaCli64 -pdgetmissing -a0 

9.替換壞掉的模塊

/opt/MegaRAID/MegaCli/MegaCli64 -pdreplacemissing -physdrv[12:10] -Array5 -row0 -a0 

10.手動開啟rebuid

/opt/MegaRAID/MegaCli/MegaCli64 -pdrbld -start -physdrv[12:10] -a0 

11.查看Megacli的log

/opt/MegaRAID/MegaCli/MegaCli64 -FwTermLog dsply -a0 > adp2.log 

12.設置HotSpare

/opt/MegaRAID/MegaCli/MegaCli64 -pdhsp -set [-Dedicated [-Array2]] [-EnclAffinity] [-nonRevertible] -PhysDrv[4:11] -a0 /opt/MegaRAID/MegaCli/MegaCli64 -pdhsp -set [-EnclAffinity] [-nonRevertible] -PhysDrv[321}] -a0

13.關閉Rebuild

/opt/MegaRAID/MegaCli/MegaCli64 -AdpAutoRbld -Dsbl -a0 

14.設置rebuild的速率

/opt/MegaRAID/MegaCli/MegaCli64 -AdpSetProp RebuildRate -30 -a0 


http://www.opstool.com/article/184


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM