Rebuilding a Volume Group's Customized Device Database


About This Document
    Related Documentation
Problem Determination
Before Using the Script
About the Script
The Script

About This Document

Run the script in this document when the ODM (Object Data Manager) entries for the root volume group are corrupted. For non-rootvg volume groups, all that should be required is to varyoff the volume group, export the volume group, and re-import it. If the volume group cannot be varied for some reason, the script may be modified for volume groups other than rootvg. (See the About the Script section in this document.) This document applies to all levels of AIX Version 4.x.

"Related Documentation"

For more in-depth coverage of this subject, the following IBM publications are recommended:

IBM documentation can also be found online at the following url:

Problem Determination

When the ODM entries for a volume group are corrupted, you may notice one of the following symptoms:

Before Using the Script

Before using the following script, you may wish to save the current version of your /etc/objrepos/Cu* files, in case you want to go back to that version at some time. This is optional.

        mkdir /etc/objrepos/Cu.bak
        cp /etc/objrepos/Cu* /etc/objrepos/Cu.bak

About the Script

  1. This script contains only a few provisions for handling error conditions because it is designed to minimize typing mistakes.

  2. The PV (physical volume) and VG (volume group) variables on the first two lines of the script are defaulted for the root volume group (rootvg). The PV is set to /dev/ipldevice, which is a synonym for one of the physical volumes that is a member of the rootvg volume group.

    If you wish to run this script for a volume group other than the rootvg, you must change the VG variable to match the volume group you wish to fix, and change the PV variable to match any one of the physical volumes (/dev/hdisk#) that is a member of that volume group. To determine to which VG a PV belongs, enter the command:

       lsvg `lqueryvg -vp hdisk# ` | grep GROUP 

    Please note that grave (back tic) characters are used in the preceding command.

  3. It is not necessary to reboot after running this script.

  4. If this script is being used to clean up a rootvg AND the rootvg is mirrored, the user must run the bosboot command to the disks that make up the bootable rootvg. Note that there is no need to reboot after the bosboot.

  5. Note that this script calls the synclvodm command, which will change the permissions on all logical volume device files to 660, and their ownership to root:system. This may cause problems with database applications that use raw logical volumes whose device files have had their ownership or permissions changed. Running this script may thus require you to shut down applications that operate in this manner, and change the permissions and ownership on those files when finished.

The Script

  1. Run the following script while in Normal mode and logged in as root.

  2. Depending on how you are viewing this document, some characters in the following code may appear incorrectly. If the characters in the following list do not match their descriptions, be sure to change them in the code.

    [ left bracket
    ] right bracket

  3. Please note that page headers and footers may appear in the following code. They should be removed before the code is used. Also, revision bars (vertical bars in the left margin which mark changes in the document) may appear to the left of the code and should be removed before the code is used.
   lqueryvg -Lp $PV | 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 
   odmdelete -q "name = $VG" -o CuAt 
   odmdelete -q "parent = $VG" -o CuDv 
   odmdelete -q "name = $VG" -o CuDv 
   odmdelete -q "name = $VG" -o CuDep 
   odmdelete -q "dependency = $VG" -o CuDep 
   if [ "$VG" = rootvg ] 
     odmdelete -q "value1 = 10" -o CuDvDr 
     odmdelete -q "value1 = $VG" -o CuDvDr 
   odmdelete -q "value3 = $VG" -o CuDvDr 
   importvg -y $VG $PV           # ignore lvaryoffvg errors 
   varyonvg $VG 
   synclvodm -v $VG 

Rebuilding a Volume Group's Customized Device Database: rvg.4x.krn ITEM: FAX
Dated: 99/01/25~00:00 Category: krn
This HTML file was generated 99/06/24~12:42:09
Comments or suggestions?
Contact us