After replacing the disk hardware, it is essential to rebuild the disk array. This process can take several hours, depending on the size of the disks and the RAID level used.
Step 1: Check if the storcli package is installed
Before performing any commands, check if the storcli
package is installed in your system. You can use the following command:
rpm -qa | grep -i storcli
If the package is not installed, install it and proceed with the next step.
Step 2: Identify the problem disk
Use the following command to identify the state of the problematic disk:
./storcli64 /c0/e20/s4 show
This command will display information about the disk, including its state. If the disk is in a failed or offline state, proceed with the next step.
Step 3: Replace the disk
Use the following command to locate and stop the blinking LED on the problematic disk:
./storcli64 /c0/e20/s4 start locate
Wait for the LED to blink and then stop it using the following command:
./storcli64 /c0/e20/s4 stop locate
Step 4: Set the disk offline
Use the following command to set the problematic disk offline:
./storcli64 /c0/e20/s4 set offline
Step 5: Confirm the disk is offline
Use the following command to confirm that the disk is in an offline state:
./storcli64 /c0/e20/s4 show
If the disk is indeed offline, proceed with the next step.
Step 6: Replace the disk (optional)
If you have multiple disks configured as a RAID5 array and one of them fails, you may need to replace it. Use the following command to identify hotspare disks:
./storcli64 /c0/e20/s11 delete hotsparedrive
Step 7: Rebuild the disk array
Use the following command to rebuild the disk array:
./storcli64 /c0/e20/s4 show rebuild
This process may take several hours, depending on the size of the disks and the RAID level used.
Step 8 (optional): Add a hotspare drive
If you have multiple disks configured as a RAID5 array, you can add a new disk to replace the failed one. Use the following command:
./storcli64 /c0/e20/s11 add hotsparedrive
Step 9: Verify VD status
Use the following command to verify the status of your virtual disk (VD):
./storcli64 /cx/vall show
If the VD is in a healthy state, proceed with the next step.
Rebuilding a disk array after replacing a failed disk can be a complex process. However, by following these steps and using the storcli
package, you should be able to rebuild your disk array and get your system up and running again.