LVM ODM Problems

From UNIX Systems Administration
Jump to: navigation, search

Fixing ODM Problems (non-rootvg)

  1. Unmount all file systems associated with the volume group.
  2. Varyoff the volume group, you may need to use a -f to force varyoff.
    varyoffvg <vg_name>
  3. Remove volume group information from the ODM.
    exportvg <vg_name>
  4. Import the volume group information back into the ODM.
    importvg -y <vg_name> <hdisk#>

Fixing ODM Problems (rootvg)

  1. Create the following script:

cp -p /etc/objrepos/CuAt /etc/objrepos/CuAt.$$
cp -p /etc/objrepos/CuDep /etc/objrepos/CuDep.$$
cp -p /etc/objrepos/CuDv /etc/objrepos/CuDv.$$
cp -p /etc/objrepos/CuDvDr /etc/objrepos/CuDvDr.$$

lqueryvg -Lp $PV | awk '{ print $2 }' | while read LVname;
     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
odmdelete -q "value1=10" -o CuDvDr
odmdelete -q "value3=$VG" -o CuDvDr

importvg -y $VG $PV                    # ignore lvaryoffvg errors
varyonvg $VG

Further Reading

  1. IBM pSeries and AIX Information Center