Pages

Fixing Volume Group ODM Corruption in AIX

In AIX, the ODM (Object Data Manager) stores configuration details of volume groups and logical volumes. If these entries become corrupted or out of sync, system commands may fail or show incorrect volume group information.

1. Gathering ODM data
Use the following script to find LVM data in ODM. Name it as you want. Run it
with one argument, such as LV_NAME. or PV_NAME.
#!/usr/bin/ksh
for class in CuAt CuDv CuDep CuDvDr PdAt PdDv
do
odmget $class | grep -ip $1
done

2. Fixing Non-rootvg Volume Groups
For non-root volume groups, ODM corruption can be corrected by exporting and re-importing the volume group:
# varyoffvg data_vg
# exportvg data_vg
# importvg -y data_vg hdisk#
  • varyoffvg deactivates the volume group.
  • exportvg removes ODM entries for the volume group.
  • importvg recreates the ODM entries from disk metadata.

3. Fixing rootvg ODM Corruption
For the root volume group (rootvg), use the redefinevg command:
# redefinevg rootvg -d hdisk1

This command scans all disks, determines volume group membership, and rebuilds the ODM entries for rootvg.

4. Synchronizing LVM Information
If both ODM and LVM (Logical Volume Manager) information on disk are corrupted, use:
# synclvodm -v myvg

This synchronizes and rebuilds the LVCB (Logical Volume Control Block), the ODM database, and the VGDA (Volume Group Descriptor Areas).

No comments:

Post a Comment