hidden:Exchange disks LSI
From Lsdf
Jump to navigationJump to search
MegaRAID disk exchange HowTo
Walkthrough: Change/replace a drive
Prepare variable for command:
megacli=/opt/MegaRAID/MegaCli/MegaCli
or
megacli=/opt/MegaRAID/MegaCli/MegaCli64
Read enclosure number, drive number
E (starts with 32, typically) S (starts with 0)
Address correct controller
-a0 (mostly only one, starts with 0)
To enable autorebuild
${megacli} -AdpAutoRbld -Enbl -a0
Set the drive offline, if it is not already offline due to an error
${megacli} -PDOffline -PhysDrv [E:S] -aN
Mark the drive as missing (seems to not work on R510 H700 card, so just do the next step)
${megacli} -PDMarkMissing -PhysDrv [E:S] -aN
Prepare drive for removal
${megacli} -PDPrpRmv -PhysDrv [E:S] -aN
Change/replace the drive
To watch the rebuild progress on drive 11 (counted 0 to 11) on controller 0 and enclosure 32
${megacli} -PDRbld -ShowProg -PhysDrv[32:11] -a0
If you are using hot spares then the replaced drive should become your new hot spare drive
${megacli} -PDHSP -Set -PhysDrv [E:S] -aN
In case you are not working with hot spares, you must re-add the new drive to your RAID virtual drive and start rebuilding
${megacli} -PdReplaceMissing -PhysDrv [E:S] -ArrayN -rowN -aN to get the numbers use: ${megacli} -Pdgetmissing -a0 ${megacli} -PDRbld -Start -PhysDrv [E:S] -aN