的方式來檢測相關引數,從而通知管理人員。
1.顯示 rebuid 進度
/opt/megaraid/megacli/megacli64 -pdrbld -showprog -physdrv[20: ] -aal
2.檢視 e s
/opt/megaraid/megacli/megacli64 -pdlist -aal -nol g | rep -ei "(enclosure|slot)"
3.檢視所有硬碟的狀態
/opt/megaraid/megacli/megacli64 -pdrbld -star -physdrv[12: 0] -a0
11 .檢視 megacli 的 log
/opt/megaraid/megacli/megacli64 -fwtermlog dsply -a0 > adp2.log
12.設定 hotspare
/opt/megaraid/megacli/megacli64 -pdhsp -set [-dedicated [-ar ay2] [-enclaf in ty]
[-no rev rtible] -physdrv[4:1 ] -a0
/opt/megaraid/megacli/megacli64 -pdhsp -set [-enclaf in ty] [-no rev rtible] -physdrv[32:1}]
-a013.關閉 rebuild
/opt/megaraid/megacli/megacli64 -adpautorbld -dsbl -a0
14.設定 rebuild 的速率
/opt/megaraid/megacli/megacli64 -adpsetprop rebuildrate -30 -a0
#/opt/megaraid/megacli/megacli64 -pdrbld -progdsply -physdrv [1:5] -a0
= = = = = = = = = = = = = = = = = = = = = =
/opt/megaraid/megacli/megacli64 -ldinfo -lal -aal | grep -e "raid lev l|strip size|number
of drives|span depth|^size" 檢視做 raid 的情況
/opt/megaraid/megacli/megacli64 -cfglddel -l1 -a0 # # 刪
/opt/megaraid/megacli/megacli64-cfglda d -r5
[9:4,9:5,9:6,9:7,9:8,9: ,9:10,9:1 ,9:12,9:13,9:14] wb cached cachedbadb u -strpsz1024 -a0
/opt/megaraid/megacli/megacli64 -pdhsp -set [-enclaf in ty] [-no rev rtible] -physdrv[9:15]
-a0/opt/megaraid/megacli/megacli64 -ldsetprop -endskcache -l1 -a0
# 做 raid5
/opt/megaraid/megacli/megacli64 -pdlist -aal | grep -e "enclosure device id|slot
number|raw size|firmware sta e" # 檢視盤的數量
uiqnum=` /opt/megaraid/megacli/megacli64 -pdlist -aal | grep "id" | uniq |
awk -f: '' | awk ''` # # 取 enclosure device id
disknum=`/opt/megaraid/megacli/megacli64 -pdlist -aal | grep -e "disk\ gro
up|slot\ number|postion:|firmware\ sta e:" | grep slot | awk -f[:\ ] ''` # # 取 slot number
diskto al=`/opt/megaraid/megacli/megacli64 -pdlist -aal | grep -e "disk\ g
roup|slot\ number|postion:|firmware\ sta e:" | grep slot | awk -f[:\ ] '' | wc -l` # #算出總數
ar ay=($disknum)
MegaCli 常用命令
1.顯示rebuid進度 megacli pdrbld showprog physdrv 20 2 aall 2.檢視e s megacli pdlist aall nolog grep ei enclosure slot 3.檢視所有硬碟的狀 megacli pdlist aall nolog 4...
MegaCli常用命令詳細介紹
megacli常用引數介紹 megacli adpcount 顯示介面卡個數 megacli adpgettime aall 顯示介面卡時間 megacli adpallinfo aall 顯示所有介面卡資訊 megacli ldinfo lall aall 顯示所有邏輯磁碟組資訊 megacli ...
常用命令彙總
變數 含義 0 當前指令碼的檔名 n傳遞給指令碼或函式的引數。n 是乙個數字,表示第幾個引數。例如,第乙個引數是 1,第二個引數是 2。傳遞給指令碼或函式的引數個數。傳遞給指令碼或函式的所有引數。傳遞給指令碼或函式的所有引數。被雙引號 包含時,與 稍有不同,下面將會講到。上個命令的退出狀態,或函式的...