Technical Knowledge Base

Replacing an AIX Disk Using LVM

  1. 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
  1. 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

  1. Record the physical location displayed in format (17-08-00-0,0)
lsdev -Cc disk |grep <hdisk>
  1. 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

  1. Record the different hdisks listed
lsvg -p <volume group name>
  1. 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
  1. Break the mirror set
unmirrorvg <volume group name> <hdisk>
  1. If the drive to be replaced is a bootable disk, run below command. If the command fails, continue.
chpv -c hdisk
  1. Confirm the unmirrorvg command was successful
lspv -l <hdisk>

The prompt should return without displaying anything afterwards.

  1. Remove the disk drive out of the volume group
reducevg -d <volume group name> <hdisk>
  1. Answer YES to any prompts

    Note: The -d option will not provide a prompt. Ensure that the wrong drive has not been selected.

  2. Confirm the hdisk is no longer part of the volume group

lsvg -p <volume group name>
  1. Remove the device, option -d removes the failed disk drive, -l kills the label
rmdev -dl <hdisk>
  1. Confirm hdisk has been removed from the configuration database
lsdev -Cc disk

Replace the disk using Hot Plug Tasks if possible!

  1. diag
  2. Select Task Selection
  3. Select Hot Plug Task
  4. Select SCSI and SCSI RAID Hot Plug Manager
  5. Select Replace/Remove a Device
  6. Select the location of the failed drive.

    The amber light should come on for the selected drive.

  7. Remove failed disk and press Enter

  8. Press F3
  9. Insert new disk. (There is no command to prompt the system of the insertion of the new disk)
  10. Select Configure Added/Replaced Devices
  11. Select List Hot Swap Enclosure Devices

    Verify the disk is present and has taken the correct hdisk number

  12. Press F10 to exit diag

  13. Confirm the drive was given the same hdisk number
lsdev –Cc disk
  1. Continue with [[#Finishing the repair]]

If Hot Plug Tasks is not available or supported by the system:

  1. Physically replace the disk
  2. configure the new disk
cfgmgr –v

Finishing the repair

  1. Add the disk back into the volume group
extendvg –f <volume group name> <hdisk>
  1. Restart the mirroring for the volume group
mirrorvg <volume group name> <hdisk>
  1. Verify all original logical volumes are back on the replacement disk
lspv -l <hdisk>
  1. 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

  1. Confirm the list was created properly
bootlist -om normal
  1. 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>
  1. Validate the repair
lsvg <volume group name>