Replace Failed Drive using MegaCLi
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
MegaCli -PDMarkMissing -PhysDrv [E:S] -aN
Prepare drive for removal
MegaCli -PDPrpRmv -PhysDrv [E:S] -aN
Change/replace the drive
If you’re using hot spares then the replaced drive should become your new hot spare drive:
MegaCli -PDHSP -Set -PhysDrv [E:S] -aN
In case you’re not working with hot spares, you must re-add the new drive to your RAID virtual drive and start the rebuilding process
MegaCli -PdReplaceMissing -PhysDrv [E:S] -ArrayN -rowN -aN
MegaCli -PDRbld -Start -PhysDrv [E:S] -aN
Related Articles
MegaCli Common Commands
General Parameters Adapter parameter -aN The parameter -aN (where N is a number starting with zero or the string ALL) specifies the adapter ID. If you have only one controller it’s safe to use ALL instead of a specific ID, but you’re encouraged ...
How to replace a failed HDD using sas2ircu
1. Run as root: # zpool offline data2 <BAD WWN> 2. Remove the failed disk, then insert the replacement. Wait at least 20 seconds for the drive to initialize. 3. Run as root: # devfsadm -Cv This rescans and removes old dangling device links from the ...
Clearing RAID metadata
Usage: Disks that were previously in use by a RAID controller will often contain metadata that identifies them as being part of a RAID. The default behavior for the CentOS/RHEL Anaconda installer is to flag and ignore these types of disks in case ...
Drive failure behavior
Q: What is the default behavior when a drive fails? A: The default settings for a MegaRAID controller will enforce an automatic rebuild policy, and usually an automatic copyback as well. The automatic rebuild, in the presence of commissioned hot ...
Locating failed drives
Q: I need to remove a failed drive from my array, but I’m not sure which slot it resides in. How can I physically identify the failed disk? A: The faulted drive should be automatically marked with the red fault light. If this did not occur ...