[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Problem Solving Guide and Reference

Reinitializing the rootvg Volume Group

To reinitialize the rootvg volume group, copy the shell script to /bin/rvgrecover and run the following to make that file executable:

chmod +x /bin/rvgrecover 

Then run:

/bin/rvgrecover

Use the following shell script to reinitialize the ODM entries for the rootvg volume group:

PV=/dev/ipldevice
VG=rootvg
    cp /etc/objrepos/CuAt /etc/objrepos/CuAt.$$
    cp /etc/objrepos/CuDep /etc/objrepos/CuDep.$$
    cp /etc/objrepos/CuDv /etc/objrepos/CuDv.$$
    cp /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

[ Previous | Next | Contents | Glossary | Home | Search ]