Steps for replacing a bad disk with an image
1. Remove images from hard disks
Because the hard disk is used as an image, we need to remove the image on this hard disk first. It is assumed that there is a problem with hard disk hdisk4, while lvdb02
After the image is created, the command is as follows:
#
Run the following command to check whether the image is successfully removed:
# Lslv-l lvdb02
2. Delete the hard disk from the VG
Assume that hdisk4 originally belongs to the mirrorvg volume group, the command is as follows:
# Performancevg-F mirrorvg hdisk4
Run the following command to check whether hdisk4 is successfully deleted:
# Lsvg-l mirrorvg
3. Delete the hard disk from the system.
Delete the hard disk from the system, that is, delete information about the hdisk4 device from the device database of the system ODM.
Command:
# Rmdev-D-l hdisk4
(This command applies to all SCSI hard disks. If the hard disk is SSA, You need to delete the pdisk device corresponding to hdisk4)
4 Add a new hard disk
After adding a new hard disk to the system Hot swapping, run the following command to enable the system to automatically search for new devices and add
This new Hard Disk:
# Cfgmgr
Run the following command to check whether a new hard disk is successfully added:
# Lsdev-CC Disk
5. Add the hard disk to the volume group
Assume that the hard disk number is still hdisk4, run the following command to add the new hard disk hdisk4
In the mirrorvg volume group:
# Extendvg mirrorvg hdisk4
6. Add the image to the hard disk
Run the following command to copy lvdb02 logical volume in hdisk4:
# Mklvcopy lvdb02 2 hdisk4
Run the following command to check whether the image is successfully created:
# Lsvg-l mirrorvg
7. Synchronize Images
After adding the image to the hard disk, run the following command to synchronize the image:
# Syncvg-P hdisk4
Run the following command to check whether everything is back to normal:
# Lsvg-l mirrorvg