Mastering Non-Disruptive Maintenance in AIX: Cloning rootvg with alt_disk_copy

When running mission-critical enterprise workloads on IBM AIX and PowerVM infrastructure, scheduling maintenance windows for OS updates, kernel tweaks, or Technology Level (TL) upgrades can be a high-stakes task. System administrators are constantly looking for ways to execute upgrades while minimizing risk and ensuring a fail-safe rollback plan.

Fortunately, AIX provides one of the most reliable tools in the UNIX ecosystem for OS cloning and migration: alt_disk_copy.

In this article, we’ll cover how to clone your active rootvg to an alternate disk while explicitly deferring the bootlist update—giving you complete control over when to boot into your fresh alternate disk.

Why Suppress the Bootlist Update? (The -B Flag)

By default, when you execute alt_disk_copy, AIX automatically updates the system’s normal bootlist to point to the newly created clone disk. If the system restarts unexpectedly after the copy, it would automatically boot off the new disk image.

Adding the -B switch changes this behavior by telling alt_disk_copy not to modify the bootlist upon completion:

  • Stage Upgrades in Advance: Perform the cloning operation during standard business hours without altering production boot behavior.

  • Controlled Cutover Window: Inspect, test, or modify configuration parameters before explicitly directing the system to boot from the target disk.

  • Low-Risk Maintenance: If maintenance plans are delayed, your original production boot path remains completely untouched and secure.

Step-by-Step Walkthrough

Step 1: Identify and Verify the Target Disk

First, check for an unassigned, available target disk using lspv:

Bash
lspv

Example Output:

Plaintext
hdisk0          00c28e905221d464     rootvg          active
hdisk1          00f6d51b9a5ef20f     None            none

Ensure the destination disk (e.g., hdisk1) is not assigned to any existing volume group and has sufficient capacity to accommodate rootvg.

⚠️ Important LVM Naming Constraint:

During the cloning process, AIX prepends alt_ (4 characters) to all logical volume names. Because AIX LVM enforces a maximum name length of 15 characters, any logical volume in your active rootvg with a name longer than 11 characters will cause alt_disk_copy to fail. Rename any long LVs prior to running the utility.

Step 2: Execute alt_disk_copy with -B

Run the cloning command specifying the target disk and suppressing bootlist changes:

Bash
alt_disk_copy -d hdisk1 -B
  • -d hdisk1: Designates hdisk1 as the target disk for the clone.

  • -B: Suppresses automatic updates to the system bootlist.

Step 3: Track the Clone Operation

You can monitor progress in real-time by reviewing the alternate disk installation log:

Bash
tail -f /var/adm/ras/alt_disk_inst.log

Once the process finishes successfully, lspv will show the target disk assigned to altinst_rootvg:

Bash
lspv
Plaintext
hdisk0          00c28e905221d464     rootvg          active
hdisk1          00f6d51b9a5ef20f     altinst_rootvg

Step 4: Cut Over and Reboot (When Ready)

When your planned maintenance window arrives, update the bootlist and initiate the reboot:

  1. Verify current boot configuration:

    Bash
    bootlist -m normal -o
    
  2. Set the bootlist to your new alternate disk:

    Bash
    bootlist -m normal hdisk1
    
  3. Reboot the partition/system:

    Bash
    shutdown -Fr
    

Post-Reboot Management & Cleanup

After the partition reboots off hdisk1, AIX automatically shifts the volume group roles: hdisk1 becomes your active rootvg, and the original disk (hdisk0) is renamed to old_rootvg.

  • Clean up the original disk (Once verified):

    If the new environment is running smoothly and you wish to reclaim the old disk, remove the old_rootvg definition:

    Bash
    alt_rootvg_op -X old_rootvg
    
  • Instant Rollback Strategy:

    If you encounter unforeseen issues on the new disk, simply set the bootlist back to the original disk (bootlist -m normal hdisk0) and execute shutdown -Fr to revert immediately to your prior state.

Summary

Combining alt_disk_copy -d <disk> with the -B flag provides AIX administrators with an ideal blend of automation and manual control. It enables zero-downtime background preparation of new boot environments while ensuring that the final cutover occurs strictly on your terms.


Post a Comment

0 Comments