Difference between revisions of "hidden:Exchange disks LSI"

From Lsdf
(Created page with "= MegaRAID disk exchange HowTo = == Walkthrough: Change/replace a drive == Prepare variable for command: megacli=/opt/MegaRAID/MegaCli/MegaCli or megacli=/opt/MegaR...")
 
m (Walkthrough: Change/replace a drive)
 
Line 3: Line 3:
   
 
Prepare variable for command:
 
Prepare variable for command:
megacli=/opt/MegaRAID/MegaCli/MegaCli
+
megacli=/opt/MegaRAID/MegaCli/MegaCli
 
or
 
or
megacli=/opt/MegaRAID/MegaCli/MegaCli64
+
megacli=/opt/MegaRAID/MegaCli/MegaCli64
   
 
Read enclosure number, drive number
 
Read enclosure number, drive number
E (starts with 32, typically)
+
E (starts with 32, typically)
S (starts with 0)
+
S (starts with 0)
   
 
Address correct controller
 
Address correct controller
-a0 (mostly only one, starts with 0)
+
-a0 (mostly only one, starts with 0)
   
 
To enable autorebuild
 
To enable autorebuild
${megacli} -AdpAutoRbld -Enbl -a0
+
${megacli} -AdpAutoRbld -Enbl -a0
   
 
Set the drive offline, if it is not already offline due to an error
 
Set the drive offline, if it is not already offline due to an error
${megacli} -PDOffline -PhysDrv [E:S] -aN
+
${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)
 
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
+
${megacli} -PDMarkMissing -PhysDrv [E:S] -aN
   
 
Prepare drive for removal
 
Prepare drive for removal
${megacli} -PDPrpRmv -PhysDrv [E:S] -aN
+
${megacli} -PDPrpRmv -PhysDrv [E:S] -aN
   
 
Change/replace the drive
 
Change/replace the drive
   
 
To watch the rebuild progress on drive 11 (counted 0 to 11) on controller 0 and enclosure 32
 
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
+
${megacli} -PDRbld -ShowProg -PhysDrv[32:11] -a0
   
 
If you are using hot spares then the replaced drive should become your new hot spare drive
 
If you are using hot spares then the replaced drive should become your new hot spare drive
${megacli} -PDHSP -Set -PhysDrv [E:S] -aN
+
${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
 
In case you are not working with hot spares, you must re-add the new drive to your
 
RAID virtual drive and start rebuilding
 
RAID virtual drive and start rebuilding
${megacli} -PdReplaceMissing -PhysDrv [E:S] -ArrayN -rowN -aN
+
${megacli} -PdReplaceMissing -PhysDrv [E:S] -ArrayN -rowN -aN
to get the numbers use:
+
to get the numbers use:
${megacli} -Pdgetmissing -a0
+
${megacli} -Pdgetmissing -a0
${megacli} -PDRbld -Start -PhysDrv [E:S] -aN
+
${megacli} -PDRbld -Start -PhysDrv [E:S] -aN

Latest revision as of 09:05, 7 October 2015

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