Renaming VG in hpux.
Here is the procedure for renaming a VG in hpux. Renaming a VG is simple as exporting the the VG as importing with different name. (eg: vgapp to vgdb)
1. Verify the existing configuration
# bdf|grep vgapp
# umount /apps/test1
2. Deactivate Vg.
3. Create a map file which can be used whileimporting back . File name is /tmp/vgapp
4. Export VG
5. Create device files for vgdb
6. Import the VG with new name using the mapfile
# vgimport -s -N -m /tmp/vgapp vgdb
vgimport: Volume group "/dev/vgdb" has been successfully created.
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating the volume group.
Note: -N is for pvlink to be in new persistant dsf naming
7. Activate the new VG.
8. Verify the VG and mount the volume
# mount /dev/vgdb/test1 /mnt
Here is the procedure for renaming a VG in hpux. Renaming a VG is simple as exporting the the VG as importing with different name. (eg: vgapp to vgdb)
1. Verify the existing configuration
#vgdisplay vgappVG Name /dev/vgappVG Write Access read/writeVG Status availableMax LV 255Cur LV 2Open LV 2Max PV 16Cur PV 4Act PV 4Max PE per PV 1016VGDA 8PE Size (Mbytes) 32Total PE 508Alloc PE 336Free PE 172Total PVG 0Total Spare PVs 0Total Spare PVs in use 0VG Version 1.0VG Max Size 508gVG Max Extents 16256
1. Umount all the logical volume from vgapp.# bdf|grep vgapp
/dev/vgapp/test1 10485760 20062 9811599 0% /apps/test1# umount /apps/test1
2. Deactivate Vg.
# vgchange -a n vgappVolume group "vgapp" has been successfully changed.
3. Create a map file which can be used whileimporting back . File name is /tmp/vgapp
# vgexport -v \ # --> -p \ # Preview the actions to be taken without updating lvmtab -s \ # Scan option for creating map file -m /tmp/vgapp vgapp #description of the volume group and its associated logical volumeBeginning the export process on Volume Group "vgapp"./dev/disk/disk38/dev/disk/disk39/dev/disk/disk40/dev/disk/disk41vgexport: Preview of vgexport on volume group "vgapp" succeeded.
4. Export VG
# vgexport vgappvgexport: Volume group "vgapp" has been successfully removed.
5. Create device files for vgdb
root@rx16-243 [/root]# ls -l /dev/*/groupcrw-r----- 1 root sys 64 0x000000 Feb 18 20:30 /dev/vg00/group# mknod /dev/vgdb/group c 64 0x010000# ls -l /dev/*/groupcrw-r----- 1 root sys 64 0x000000 Feb 18 20:30 /dev/vg00/groupcrw-r--r-- 1 root sys 64 0x010000 Feb 20 04:36 /dev/vgdb/group
6. Import the VG with new name using the mapfile
# vgimport -s -N -m /tmp/vgapp vgdb
vgimport: Volume group "/dev/vgdb" has been successfully created.
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating the volume group.
Note: -N is for pvlink to be in new persistant dsf naming
7. Activate the new VG.
# vgchange -a y vgdbActivated volume group.Volume group "vgdb" has been successfully changed.
8. Verify the VG and mount the volume
# vgdisplay -v vgdb--- Volume groups ---VG Name /dev/vgdbVG Write Access read/writeVG Status availableMax LV 255Cur LV 2Open LV 2Max PV 16Cur PV 4Act PV 4Max PE per PV 1016VGDA 8PE Size (Mbytes) 32Total PE 508Alloc PE 336Free PE 172Total PVG 0Total Spare PVs 0Total Spare PVs in use 0VG Version 1.0VG Max Size 508gVG Max Extents 16256
--- Logical volumes --- LV Name /dev/vgdb/test LV Status available/syncd LV Size (Mbytes) 512 Current LE 16 Allocated PE 16 Used PV 1
LV Name /dev/vgdb/test1 LV Status available/syncd LV Size (Mbytes) 10240 Current LE 320 Allocated PE 320 Used PV 3
--- Physical volumes --- PV Name /dev/disk/disk38 PV Status available Total PE 127 Free PE 0 Autoswitch On Proactive Polling On
PV Name /dev/disk/disk39 PV Status available Total PE 127 Free PE 0 Autoswitch On Proactive Polling On
PV Name /dev/disk/disk40 PV Status available Total PE 127 Free PE 45 Autoswitch On Proactive Polling On
PV Name /dev/disk/disk41 PV Status available Total PE 127 Free PE 127 Autoswitch On Proactive Polling On# mount /dev/vgdb/test1 /mnt
# bdf /mntFilesystem kbytes used avail %used Mounted on/dev/vgdb/test1 10485760 20062 9811599 0% /mnt
No comments:
Post a Comment