Replacing an AIX Disk Using LVM
- Capture the resource name and indentifier for entries that have a P in the T column. Check time and date of the entry
errpt |more
- List all entries for this type of error
errpt -aj <identifier> |more
Collect the following
* The physical volume name (hdisk1)
* The location of the failed drive (V0.1-P1-I3/Z1-A1)
* The FRU number
* The serial number
- Record the physical location displayed in format (17-08-00-0,0)
lsdev -Cc disk |grep <hdisk>
- Display physical volume information
lspv <hdisk>
Record the following
* Volume Group name
* Number of stale partitions
* Number of logical volumes
Confirm the physical volume name
- Record the different hdisks listed
lsvg -p <volume group name>
- Run below command on all the logical volumes assigned to this disk drive and check their protection status
lslv <logical volume name>
- Copies \= 1 The logical volume is not mirrored
- Copies \= 2 or more. The logical volume is mirrored
- Break the mirror set
unmirrorvg <volume group name> <hdisk>
- If the drive to be replaced is a bootable disk, run below command. If the command fails, continue.
chpv -c hdisk
- Confirm the unmirrorvg command was successful
lspv -l <hdisk>
The prompt should return without displaying anything afterwards.
- Remove the disk drive out of the volume group
reducevg -d <volume group name> <hdisk>
-
Answer YES to any prompts
Note: The -d option will not provide a prompt. Ensure that the wrong drive has not been selected.
-
Confirm the hdisk is no longer part of the volume group
lsvg -p <volume group name>
- Remove the device, option -d removes the failed disk drive, -l kills the label
rmdev -dl <hdisk>
- Confirm hdisk has been removed from the configuration database
lsdev -Cc disk
Replace the disk using Hot Plug Tasks if possible!
- diag
- Select Task Selection
- Select Hot Plug Task
- Select SCSI and SCSI RAID Hot Plug Manager
- Select Replace/Remove a Device
-
Select the location of the failed drive.
The amber light should come on for the selected drive.
-
Remove failed disk and press Enter
- Press F3
- Insert new disk. (There is no command to prompt the system of the insertion of the new disk)
- Select Configure Added/Replaced Devices
-
Select List Hot Swap Enclosure Devices
Verify the disk is present and has taken the correct hdisk number
-
Press F10 to exit diag
- Confirm the drive was given the same hdisk number
lsdev –Cc disk
- Continue with [[#Finishing the repair]]
If Hot Plug Tasks is not available or supported by the system:
- Physically replace the disk
- configure the new disk
cfgmgr –v
Finishing the repair
- Add the disk back into the volume group
extendvg –f <volume group name> <hdisk>
- Restart the mirroring for the volume group
mirrorvg <volume group name> <hdisk>
- Verify all original logical volumes are back on the replacement disk
lspv -l <hdisk>
- Verify all logical volumes show synced
lsvg -l <volume group name>
Note: When replacing a disk with the OS on it (the disk drive was assigned to the rootvg volume group), the following command will be prompted to make this drive bootable
bootlist -m normal hdiskx hdisky (The second hdisk “y” is the remaining half of the mirror that was NOT replaced.)
This will set the list of boot drives
- Confirm the list was created properly
bootlist -om normal
- Perform below command on both boot disks. This makes both drives bootable. (Never assume the remaining original disk is set up to boot properly)
bosboot -ad <hdisk>
- Validate the repair
lsvg <volume group name>