You are on page 1of 1

Repairing an inconsistenency in the ODM for the rootvg volume group

For the rootvg volume group, the problem of repairing an inconsistency in the ODM is more difficult than
a non-rootvg volume group because rootvg cannot be exported. It may be possible to fix the problem
using the redefinevg or synclvodm commands.

First, try using the redefinevg and synclvodm commands while the system is running. If that doesn’t
fix the problem, you must boot to maintenance mode from alternate media (typically an installation CD or
NIM server). Before attempting this, you should make sure you have a current mksysb backup.

Use the steps in the following table to recover the rootvg volume group after booting to maintenance
mode, and mounting file system.

Step Action
1 Delete all of the ODM information about logical volumes on rootvg.
Get the list of logical volumes from the VGDA of the physical volume.
# lqueryvg -p hdisk0 -L | awk '{print $2}'| while read LVname; do
> odmdelete -q “name=$LVname” -o CuAt
> odmdelete -q “name=$LVname” -o CuDv
> odmdelete -q “value3=$LVname” -o CuDvDr
> done
2 Delete the volume group information from ODM.
# odmdelete -q “name=rootvg” -o CuAt
# odmdelete -q “parent=rootvg” -o CuDv
# odmdelete -q “name=rootvg” -o CuDv
# odmdelete -q “name=rootvg” -o CuDep
# odmdelete -q “dependency=rootvg” -o CuDep
# odmdelete -q “value1=10” -o CuDvDr
# odmdelete -q “value3=rootvg” -o CuDvDr
3 Add the volume group associated with the physical volume back to the ODM.
# importvg -y rootvg hdisk0
4 Recreate the device configuration database in the ODM from the information on the physical
volume.
# varyonvg -f rootvg

This example assumes that hdisk0 is part of rootvg.

In CuDvDr:
value1 = major number
value2 = minor number
value3 = object name for major/minor number
rootvg always has value1 = 10.

The steps can also be used to recover other volume groups by substituting the appropriate physical
volume and volume group information.

It is suggested that this example be made a script.

You might also like