Find it

Friday, September 4, 2009

Rename VG in AIX

Rename VG in AIX

# lsvg
CPIdatavg
CPIindexvg
CPIbkupvg

We need to rename above VGs to QPIdatavg, QPIindexvg, QPIbkupvg respectively.

# lsvg -l CPIdatavg
# lsvg -l CPIindexvg
# lsvg -l CPIbkupvg

See what all filesystems associated with each VG and umount all of them first.

Now check what all disks associated with respective VG.

# lsvg -p CPIdatavg
CPIdatavg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk14 active 126 126 26..25..25..25..25
hdisk15 active 254 254 51..51..50..51..51



# lsvg -p CPIindexvg
CPIindexvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk16 active 126 126 26..25..25..25..25


# lsvg -p CPIbkupvg
CPIbkupvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk17 active 510 510 102..102..102..102..102

Varyoff all VG those needs to be rename

# varyoffvg CPIdatavg
# varyoffvg CPIindexvg
# varyoffvg CPIbkupvg

# lspv <<<< This command will now show all above disks inactive (It will not show anything in last field)
hdisk14 00c21e0284e6a5b0 CPIdatavg ----No Active Status---
hdisk15 00cfaefca8f9ee92 CPIdatavg ----No Active Status---
hdisk16 00c21e0284e7e4a0 CPIindexvg ----No Active Status---
hdisk17 00cfaefca8fdef94 CPIbkupvg ----No Active Status---


Now lets export the VG

# exportvg CPIdatavg
# exportvg CPIindexvg
# exportvg CPIbkupvg

After exporting look lspv O/P

#lspv
hdisk14 00c21e0284e6a5b0 None
hdisk15 00cfaefca8f9ee92 None
hdisk16 00c21e0284e7e4a0 None
hdisk17 00cfaefca8fdef94 None

Now let us import the VGs as shown below -

# importvg -y QPIdatavg hdisk14
# varyonvg QPIdatavg
# mount -a

Do same for rest of the VGs.

This method is not recommended for HACMP setup.

1 comment: