randy/megaraid-replace.md
2020-12-07 10:48:27 -08:00

1.7 KiB

Replacing a Dying Drive on a MegaRaid

What we have

vm1.sea.rg.net is a cisco ucs with a megaraid controller, i want to remove phys disk 9, [24:10], which is currently an array member but smart says is dying

-- ID  | Type | Drive Model              | Size     | Status          | Speed    | Temp | Slot ID  | LSI ID | Path
c0u0p9 | HDD  | 9XF0TKYHST9500620NS CC02 | 464.7 Gb | Online, Spun Up | 6.0Gb/s  | 32C  | [24:10]  | 17

and let the hot spare [24:13] already installed as hot spare and spun up take over and then replace [24:10] with a new drive

-- ID  | Type | Drive Model              | Size     | Status            | Speed    | Temp | Slot ID  | LSI ID | Path
c0uXpY | HDD  | 9XF21BHBST9500620NS SN03 | 464.7 Gb | Hotspare, Spun Up | 6.0Gb/s  | 29C  | [24:13]  | 20     | N/A

The plan

i was not completely comfortable with removing [24:10] from the array and causing it to fail over to the hot spare on [24:13]. this seems to tell me how to do it.

Pull Dying Drive Out of Arrary

megacli -PDOffline -PhysDrv [24:10] -a0

and it should fall over to the hot spare magically.

And we can watch the rebuild on the hot spare

megacli -PDRbld -ShowProg -PhysDrv [24:13] -aALL

Set up to Remove Phycical Drive

Mark it as missing

megacli -PDMarkMissing -PhysDrv [24:10] -a0

and set for removal

megacli -PDPrpRmv -PhysDrv [24:10] -a0

Now we can remove the drive

Make New Drive a Hot Spare

Insert the new drive in [24:10] and mark as hot spare

megacli -PDHSP -Set -PhysDrv [24:10] -a0

2020.12.07