Preserving AIX disk numbering with ghostdev

For AIX VMs that use direct disk mapping instead of volume groups, disk numbers may change during operations such as copying, copying to another region, or saving as a template. Because of this, applications that rely on disk numbers may fail.

Enabling ghostdev triggers AIX to reconfigure disks and generate a unique physical volume identifier (PVID) for each disk. AIX disks that have PVIDs won’t be renumbered.

We strongly recommend that you apply ghostdev to any AIX VMs that use direct disk mapping.

If the LPAR already has custom ODM definitions, ghostdev will clear those definitions.

You can also enable ghostdev after a copy operation to restore the disk mapping to its original state when the VM was first configured.

Displaying current LPAR disk mapping

To display information about all of the disks for an LPAR, type lspv.

For more information, see the lspv Command reference.

Enabling ghostdev for an AIX LPAR

To enable ghostdev for an AIX LPAR, type the following command:

chdev -l sys0 -a ghostdev=2

This generates a unique physical volume identifier (PVID) for each disk, which will prevent disk renumbering in future operations such as cloning and creating templates. For more information, see Changing the PVID and VGID of rootvg and Changing the VGID of rootvg and PVIDs of rootvg disks with ghostdev.

Verifying correct LPAR disk mapping

After ghostdev has been enabled for the LPAR, type the following command to verify disk mapping:

lsattr -E -l sys0 -a ghostdev

For more information, see the lsattr Command reference.

If a volume group for an AIX VM fails to activate after a copy operation, run the following command:

importvg -y volumegroup_name physical_volume