Sys-Admin Information’s

Share Knowledge, Distribute Knowledge, Capture & Modify Knowledge, Create Knowledge

Archive for the ‘LVM’ Category

Rename Volume Group on HP-UX (quick & dirty)

without comments

Can you explain how to rename a volume group (VG)?, How to rename your Volume Group on HP-UX ? and many more question about how to rename the volume group. here I show you the magic of how to rename your Volume Group.

bash> bdf|grep /rdbms/oradata/a
/dev/vg07/lvol1    5144576 3515198 1527542   70% /rdbms/oradata/a

We will rename VG07 to VG20, backup your data first.

Backup VG config First

bash> vgcfgbackup /dev/vg07
Volume Group configuration for /dev/vg07 has been saved in /etc/lvmconf/vg07.conf

Ok, now deactivate the first volume group

bash> vgchange -a n /dev/vg07
Volume group "/dev/vg07" has been successfully changed.

Export Vg07 dengan nama ‘vg20.map’

bash> vgexport -v -s -m /tmp/vg20.map /dev/vg07
Beginning the export process on Volume Group "/dev/vg07".
/dev/dsk/c5t0d0
Volume group "/dev/vg07" has been successfully removed.

Create New Volume group (VG20)

bash> mkdir /dev/vg20
bash> mknod /dev/vg20/group c 64 0x1a0000

Import VG nya

bash> vgimport -v -s -m /tmp/vg20.map /dev/vg20
Beginning the import process on Volume Group "/dev/20".
Logical volume "/dev/vg20/lvol1" has been successfully created
with lv number 1.
Volume group "/dev/vg20" has been successfully created.

Last but not least, Enable the VG

bash> vgchange -a y /dev/vg20
Activated volume group
Volume group "/dev/vg20" has been successfully changed.

Written by Hendrawan

March 22nd, 2009 at 5:37 pm

Posted in HPUX, LVM