IBM Support

Steps of replacing an AIX® disk with another new disk in VG

How To


Summary

How to replace disk with another new disk in VG and remove old disk from VG in AIX® for storage migration.

Objective

Replacing a disk with another new disk in VG and remove old disk from VG in AIX® due to storage migration.

Steps

These procedures DO NOT apply in the following environment:
The disk is in a shared volume group. This would apply to environments that use HACMP, RVSD, or any other management software.
Refer to the documentation for that product for correct disk replacement procedures. The SSA User's Guide explains the procedures for changing disks in a RAID or hot swap environment. It is available for download at:
ftp://ftp.storsys.ibm.com/7133/pdfs/AdvSerRAIDXUsersGde.pdf
To replace disk with another new disk in VG and remove old disk from VG in AIX®
Mirroring the Volume Group would be the best way to do it.
In order to achieve that, you will need to do the following:
Before starting note that:
*hdisk# is the number of the NEW disk
*VGname is the name of the Volume Group you will be working on.
1- Extend the VG to include the new storage.
# extendvg VGname hdisk#
2- Mirror the VG that will take some time due to the VG size.
# mirrorvg -S VGname hdisk#
Note: run # lsvg -l VGname to make sure that the VG is mirrored.
3- Unmirror the VG from the old disks , specify from which disks you would like to unmirror.
# unmirrorvg VGname hdisk#
Note: Make sure that there are no remaining LVs on the OLD disks:
# lspv -l hdisk#
If there ARE remaining LVs, run the command:
# migratepv -l LogicalVolumeName SourcePhysicalVolume DestinationPhysicalVolume
Then, run this command again to make sure that there are no remaining LVs:
# lspv -l hdisk#
4 -Reduce the old disks out of the VG.
# reducevg VGname hdisk#
Important Note: For the rootvg VG ONLY, you have to run the following commands after the data is migrated to the new storage:
# bosboot -a -d /dev/hdisk#
# bootlist -m normal hdisk#
# bootlist -m normal -o
One thing you can do to test the new disks, if you have time, is to create a VG on the new disks and do a lot of reads and writes to test them out. That way no real data would be affected. When you are satisfied that the disks are OK, you can remove the VG and add the disks to the existing VG and mirror it.

After you execute the mirrorvg -S command, it will take quite a bit of time for the data between the 2 copies to be synchronized. It will be a good idea to leave it for at least a day and monitor the error log for disk and/or LVM errors.
Before you decide to un-mirror, you can run the following command against the new/destination disks, one at a time, to check if there are any stale/unsynchronized PPs left.
# lspv -L -M hdisk# | grep stale | wc -l
The output will be a number. If there are no stale PPs left the number will be 0.
If you decide to try the command periodically the value of the number you are getting should be decreasing.

Additional Information

SUPPORT

If you require more assistance, use the following step-by-step instructions to contact IBM to open a case for software with an active and valid support contract.  

1. Document (or collect screen captures of) all symptoms, errors, and messages related to your issue.

2. Capture any logs or data relevant to the situation.

3. Contact IBM to open a case:

   -For electronic support, see the IBM Support Community:
     https://www.ibm.com/mysupport
   -If you require telephone support, see the web page:
      https://www.ibm.com/planetwide/

4. Provide a clear, concise description of the issue.

 - For guidance, see: Working with IBM AIX Support: Describing the problem.

5. If the system is accessible, collect a system snap, and upload all of the details and data for your case.

 - For guidance, see: Working with IBM AIX Support: Collecting snap data

Document Location

Worldwide

[{"Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"a8m0z000000cvyiAAA","label":"LVM"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"}]

Document Information

Modified date:
22 September 2020

UID

ibm16333595