Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (10) AWS (5) numerology (5)

Wednesday, June 4, 2014

VG recreation steps in HPUX

VG recreation steps:

Backup your DATA of that volume group on tape or disk.
1. # ll /dev/vgxx/group
To get major & minor number

2. # bdf |grep -i vgxx
To get FS details (current sizes of your FS) of vgxx.

3. #vgdisplay -v vgxx|more
to get PV device names cXtYdZ & lv details etc.

4. #vgdisplay -v vgxx|grep -i  vgxx|grep -v alternate  > /tmp/vgxx.disks
To get number of disks present in vgxx & redirect it to /tmp/vgxx.disks

5. #umount
unmount all filesystems in that vg

6. # vgchange -a n /dev/vgxx
Deactivate vgxx

7. # vgexport /dev/vgxx
Export vgxx. Exporting a VG means the following: remove the VG and corresponding PV entries from /etc/lvmtab and remove the VG directory with their device files in /dev. Again - the data on the disks is left unchanged.

8. # mkdir /dev/vgxx
Create vgxx directory under /dev

9. # mknod /dev/vgxx/group c <64ie .major="" no.=""> <0xyy0000 ie.="" minor="" no.="">
By which LVM kernel & LVM command communicates within the vgxx. Which you will get from step 1

10. #pvcreate /dev/rdsk/cxtxdx
Create the LVM structure on all disks of vgxx. You will get the disks information from step 4.

11. #vgcreate -e -s -p <255_no_of_pvs> -l <255_no_of_lvs> vgxx /dev/dsk/cxtxdx
-e: to set value of max_pe
Formula: -e * -s = Size of disk; Hence this para is very useful

12. #lvcreate -L -n /dev/vgxx
In vg rebuild use -L option instead of -l option. You will get this info from step 3.
If striping is used then u have to use:
-i: No. of disk to stripe across
-I: Stripe size

13.# newfs -F vxfs -o largefiles -b 8192
To create Metadata structure

14. # mkdir
Create Mount point

15. mount
Mount all Filesystem

16. vgextend /dev/vgxx
To create the Alternate links if they were present. You will get this info from step 3.


17. Then restore data to new vg.


Thanks...
Kirraan Jadhav

No comments:

Post a Comment