RSS구독하기:SUBSCRIBE TO RSS FEED
즐겨찾기추가:ADD FAVORITE
글쓰기:POST
관리자:ADMINISTRATOR
리눅스시스템/관리  2013/07/05 11:26
MegaRAID
Just a little something a bud and myself experienced with the cryptic MegaRAID cli commands and if you happen to hate the MegaRAID WebBios like most people do and that would include myself.

MegaCli64 important parameters
-aX or All, where X is the adapter number 0 or 1, etc
-PhysDrv [E:S] refers to the particular physical disk, where E is the enclosure ID and S is the slot number of the physical disk
To find out what is the enclosure ID, refer to the enclosure info output
e.g.
 In case there is a single LSI MegaRAID adapter, if the enclosure ID is 252 and the disk that is supposed to be replaced is Slot 5 (in actual fact it is Slot 6, the slot number starts from 0). So the format of the [E:S] is [252:5].

- To view adapter info, this will tell you how many LSI MegaRAID adapters are there installed
MegaCli64 -AdpAllInfo -aAll

- To view the enclosure info
MegaCli -EncInfo -aALL

- To view the list of all virtual disks that is connected to the LSI MegaRAID adapters
MegaCli64 -LDInfo -Lall -aALL

- To view the list of all physical disks that is connected to the LSI MegaRAID adapters
MegaCli64 -PDList -aALL

- To view the information of a particular physical disk
MegaCli64 -PDInfo -PhysDrv [E:S] -aALL

- To set the state of a particular disk to offline
MegaCli64 -PDOffline -PhysDrv [E:S] -aX

- To set the state of a particular disk to online
MegaCli64 -PDOnline -PhysDrv [E:S] -aX

- To mark a physical disk as missing, used specifically for disk replacement
MegaCli64 -PDMarkMissing -PhysDrv [E:S] -aX

- To prepare a physical for removal
MegaCli64 -PDPrpRmv -PhysDrv [E:S] -aX

- To replace a missing drive
MegaCli64 -PDReplaceMissing -PhysDrv [E:S] -ArrayM -rowN -aX

- To rebuild a drive
MegaCli64 -PDRbld -Start -PhysDrv [E:S] -aX
MegaCli64 -PDRbld -Stop -PhysDrv [E:S] -aX
MegaCli64 -PDRbld -ShowProg - PhysDrv [E:S] -aX

- To change the status of particular disk from bad to good, or from Unconfigured-Bad to Unconfigured-Good, this is especially useful when a disk has been removed abruptly without properly removing the disk from a particular virtual drive by abruptly pluggin the disk out of it's slot
MegaCli64 -PDMakeGood -PhysDrv [E:S] -aX


To change/replace a drive that is a part of a mirror logical disk
- In the case of the disk replacement we did in RHB, the faulty disk is on slot 5 (6th slot) on enclosure with the ID of 252 on adapter 0

1. Set the drive offline, if it is already not offline
MegaCli64 -PDOffline -PhysDrv [252:5] -a0

2. Mark the drive as missing
MegaCli64 -PDMarkMissing -PhysDrv [252:5] -a0

3. Prepare drive for removal
MegaCli64 -PDPrpRmv -PhysDrv [252:5] -a0

4. Physically remove the disk from the slot, and plug in the new disk

5. Add the new disk back to the affected virtual drive and start rebuilding.
MegaCli64 -PDReplaceMissing -PhysDrv [252:5] -Array2 -row1 -a0
MegaCli64 -PDRbld -Start -PhysDrv [252:5] -a0

6. To view the progress of the rebuild
MegaCli64 -PDRbld -ShowProg -PhysDrv [252:5] -a0

A note on step 4, how do you find out which Array number was affected by the bad disk, we can get find this out by viewing the status of all the logical disk configured on the HBA card (by running MegaCli64 -LDInfo -Lall -aALL) the status of the logical drive should have been marked as degraded.

Another note on step 4, how do you want to now which row the disk is logically at (this row number does not correspond to the slot number). You can find this out by running (MegaCli –PdGetMissing -a0, hopefully you won't have more that one disk missing/removed manually by your goodself)

To replace a drive that is the designated hotspare on a RAID-5 logical disk, well maybe next time.
2013/07/05 11:26 2013/07/05 11:26
http://zosel.net/trackback/68
ZOSEL:Too much is as bad as too little...!! 자공(子貢)이 공자에게 "사(師:子張의 이름)와 상(商:子夏의 이름)은 어느 쪽이 어집니까?" 하고 묻자, 공자는 "사는 지나치고 상은 미치지 못한다"고 대답하였다. "그럼 사가 낫단 말씀입니까?" 하고 반문하자, 공자는 "지나친 것은 미치지 못한 것과 같다(過猶不及)"고 말하였다.
Too much is as bad as too little...!! 자공(子貢)이 공자에게 "사(師:子張의 이름)와 상(商:子夏의 이름)은 어느 쪽이 어집니까?" 하고 묻자, 공자는 "사는 지나치고 상은 미치지 못한다"고 대답하였다. "그럼 사가 낫단 말씀입니까?" 하고 반문하자, 공자는 "지나친 것은 미치지 못한 것과 같다(過猶不及)"고 말하였다.
전체 (209)
리눅스시스템 (92)
윈도우시스템 (16)
프로그램 (7)
네트워크시스템 (7)
최근관심 (1)
«   2024/05   »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
  1. yeezyboost-350.co.uk  2021
    yeezyboost-350.co.uk
  2. 강남역 풀싸롱  2021
    강남역 풀싸롱
  3.   2021
  1. 2018/02 (1)
  2. 2017/03 (2)
  3. 2016/12 (2)