LVM ODM Problems: Difference between revisions

From UNIX Systems Administration
Jump to navigation Jump to search
No edit summary
 
Line 2: Line 2:
# Unmount all file systems associated with the volume group.
# Unmount all file systems associated with the volume group.
# Varyoff the volume group, you may need to use a -f to force varyoff.
# Varyoff the volume group, you may need to use a -f to force varyoff.
## <tt>'''varyoffvg <vg_name>'''</tt>
#: <tt>'''varyoffvg <vg_name>'''</tt>
# Remove volume group information from the ODM.
# Remove volume group information from the ODM.
## <tt>'''exportvg <vg_name>'''</tt>
#: <tt>'''exportvg <vg_name>'''</tt>
# Import the volume group information back into the ODM.
# Import the volume group information back into the ODM.
## <tt>'''importvg -y <vg_name> <hdisk#>'''</tt>
#: <tt>'''importvg -y <vg_name> <hdisk#>'''</tt>


== Fixing ODM Problems (rootvg) ==
== Fixing ODM Problems (rootvg) ==

Latest revision as of 21:06, 13 December 2017

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:
PV=hdisk#
VG=rootvg

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;
do
     odmdelete -q "name=$LVname" -o CuAt
     odmdelete -q "name=$LVname" -o CuDv
     odmdelete -q "value3=$LVname" -o CuDvDr
done

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