StorCLI: Commands to Replace Hard Drives and Check Status
Common Commands
Check Hard Drive Status
storcli64 /c0/eall/sall show allCheck Status of a Specific Hard Drive
/opt/MegaRAID/storcli/storcli64 /c0/e22/s8 show allTurn On Locator Light
storcli64 /c0/e252/s2 start locateTurn Off Locator Light
storcli64 /c0/e252/s2 stop locateSet Hard Drive to Unconfig Good
storcli64 /c0/e252/s2 set good forceSet Hard Drive as Hot Spare
storcli64 /c0/e65/s5 add hotsparedriveReplacement Steps for Predictive Failure Hard Drives
1. Use commands to confirm that the disk's Predictive Failure Count value is 11 or higher.
storcli /c0/e62/s29 show2. After confirming the hard drive, use the following two commands to set the hard drive to Offline and Lost.
storcli /c0/e62/s29 set offline
storcli /c0/e62/s29 set missing3. Turn on the hard drive locator light.
storcli /c0/e62/s29 start locate4. Wait for physical replacement of the hard drive.
5. After replacing the hard drive, turn off the hard drive locator light.
storcli /c0/e62/s29 stop locate6. Check the new hard drive status.
storcli /c0/e62/s29 show7. If the hard drive is not in Ugood status, use the command below to set the hard drive to Unconfig Good status.
storcli /c0/e62/s29 set good force8. Set the hard drive as a hot spare.
storcli /c0/e62/s29 add hotsparedriveOffline Hard Drive Steps Reference
1. Wait for rebuild to complete.
2. Check rebuild status, VD (Raid Group status), and hard drive Media Error count.
storcli64 /c0/eall/sall show rebuild
storcli64 /c0/vall show all
storcli64 /c0/eall/sall show all3. Use the following two commands to set the first hard drive (the one with more errors, e252/s2) to Offline.
storcli64 /c0/e252/s2 set offline4. Turn on the hard drive locator light.
storcli64 /c0/e252/s2 start locate5. Wait for the engineer to physically replace the first hard drive; only proceed with the steps below after receiving confirmation of replacement.
6. Turn off the hard drive locator light.
storcli64 /c0/e252/s2 stop locate7. Check the new hard drive status and rebuild status.
storcli64 /c0/e252/s2 show
storcli64 /c0/eall/sall show rebuild8. If the new hard drive has not automatically rebuilt, set the new hard drive to Ugood. (If rebuild has already started, ignore this step.)
storcli64 /c0/e252/s2 set good force
storcli64 /c0/eall/sall show rebuild9. If the new hard drive still has not rebuilt, set the hard drive as a hot spare. (If rebuild has already started, ignore this step.)
storcli64 /c0/e252/s2 add hotsparedrive
storcli64 /c0/eall/sall show rebuild10. Wait for rebuild to complete, then confirm that rebuild is complete, VD (raid group) status is normal, and the new hard drive has no Media Errors.
storcli64 /c0/eall/sall show rebuild
storcli64 /c0/vall show all
storcli64 /c0/eall/sall show all11. After confirming the previous step, use the following two commands to set the second hard drive (e23/s0) to Offline.
storcli64 /c0/e23/s0 set offline12. Turn on the hard drive locator light.
storcli64 /c0/e23/s0 start locate13. Wait for the engineer to physically replace the second hard drive; only proceed with the steps below after receiving confirmation of replacement.
14. Turn off the hard drive locator light.
storcli64 /c0/e23/s0 start locate15. Check the new hard drive status and rebuild status.
storcli64 /c0/e23/s0 show
storcli64 /c0/eall/sall show rebuild16. If the new hard drive has not automatically rebuilt, set the new hard drive to Ugood. (If rebuild has already started, ignore this step.)
storcli64 /c0/e23/s0 set good force
storcli64 /c0/eall/sall show rebuild17. If the new hard drive still has not rebuilt, set the hard drive as a hot spare. (If rebuild has already started, ignore this step.)
storcli64 /c0/e23/s0 add hotsparedrive
storcli64 /c0/eall/sall show rebuild18. Wait for rebuild to complete, then confirm rebuild status, VD (raid group) status is normal, and the new hard drive has no Media Errors.
storcli64 /c0/eall/sall show rebuild
storcli64 /c0/vall show all
storcli64 /c0/eall/sall show all