Wednesday, March 1, 2017

REPLACING AN LSI RAID DISK WITH MEGACLI

REPLACING AN LSI RAID DISK WITH MEGACLI

# cd /opt/MegaRAID/MegaCli

1) First we set the original disk offline if an error has not already cause the controller to set it offline

[root@ndelta MegaCli] # ./MegaCli64 -pdoffline -physdrv[15:4] -a0

2) Mark the failed disk as missing

[root@ndelta MegaCli] # ./MegaCli64 -pdmarkmissing -physdrv[15:4] -aAll  ---  -a0 for adapter 0

3) Mark the failed disk as prepared for removal

[root@ndelta MegaCli] # ./MegaCli64 -pdprprmv -physdrv[15:4] -a0

4) Now you can go replace the faulty disk, it might help to use the hdd identify command to locate the disk

[root@ndelta MegaCli] # ./MegaCli64 -pdlocate -start -physdrv[15:4] -a0

*** Step 5 has two options below ***
#### 5) If you use hot spares and the original hot spare was already put into the raid array, set the new disk
 to replace the hot spare that just went into service
#### [root@ndelta MegaCli] # ./MegaCli64 -PDHSP -Set -PhysDrv[15:4] -a0
#### Don't use above commands

5) If you don’t use hot spares you will need to add the disk to the array and start the rebuild manually

[root@ndelta MegaCli]# ./MegaCli64 -CfgDsply -a0   --- Displays information

****Span Reference: 0x01 is the number of the array (strip the 0x0 part).
****We can see that Physical Disk: 4 has no information, which means the drive is missing.
****The number N of the array parameter is the Span Reference you get using "MegaCli -CfgDsply -aALL"
****and the number N of the row parameter is the Physical Disk in that span or array starting with zero
****(it’s not the physical disk’s slot!).

[root@ndelta MegaCli] # ./MegaCli64 -PdReplaceMissing -PhysDrv[15:4] -Array1 -row4 -a0
Adapter: 0: Missing PD at Array 1, Row 4 is replaced

[root@ndelta MegaCli] # ./MegaCli64 -PDRbld -Start -PhysDrv[15:4] -a0

6) Optional: We can watch the rebuild progress. Depending on the size of the array this may take a considerabl
e amount of time. Also the raid array is usable during this time, but you can expect to encounter performance
hits while the raid array is rebuilding.

[root@ndelta MegaCli] # ./MegaCli64 -PDRbld -ShowProg -PhysDrv[15:4] -a0


#############################################################################
Replace a Failed Drive

# MegaCli64 -PDOffline -PhysDrv [15:4] -a0

# MegaCli64 -PDPrpRmv -PhysDrv [15:4] -a0

Pull the drive, insert a new one
# MegaCli64 -Pdgetmissing -a0

Adapter 0 – Missing Physical drives
No. Array Row Size Expected
0 1 4 1907200 MB

# MegaCli64 -PdReplaceMissing -PhysDrv [15:4] -Array1 -row4 -a0


No comments:

Post a Comment

  How to Change Instance Type & Security Group of EC2 in AWS By David Taylor Updated April 29, 2023 EC2 stands for Elastic Compute Cloud...