How to re-create a VG on HP-UX 11i server (374 Views)
Occasional Advisor
Posts: 12
Registered: ‎05-16-2007
Message 1 of 4 (374 Views)

How to re-create a VG on HP-UX 11i server

Hi All,
We need to change each PE size to 8 or 16.currently it is 4 MB. So We need to Re-create the VGs. So that We can avoid below problem.

lvextend -l 69000 /dev/vg11dap/lvol1
"LogicalExtentsNumber": Must be a value between 1 and 65535.

Even we have space in VG. But due to the max LE limitations it is giving the error.
Can Any one please help me here.
Exalted Contributor
Posts: 33,806
Registered: ‎08-15-2002
Message 2 of 4 (374 Views)

Re: How to re-create a VG on HP-UX 11i server


Back up all data.
lvremove all logical volumes
vgexport the volume group.
vgcreate anew
lvcreate new logical volumes
newfs new fileystems
restore all data.

The number of logical extents is one of the basic characteristics of a volume group that can not be changed after creation.

Consider the -p parameter when re-creating. The default behavior of LVM is to assume 255 physical disks. THis causes limitations in flexibility. I generally set my number around 10. This allowes for a lot of growth but vastly improves how much data I can get in the volume group.

Steven E Protter
Owner of ISN Corporation
Honored Contributor
Posts: 980
Registered: ‎01-30-2006
Message 3 of 4 (374 Views)

Re: How to re-create a VG on HP-UX 11i server

u can use -s pe_size -e max_pe with vgcreate so u can utilise the full disk space.
Time has a wonderful way of weeding out the trivial
Honored Contributor
Posts: 4,934
Registered: ‎08-14-2002
Message 4 of 4 (374 Views)

Re: How to re-create a VG on HP-UX 11i server

Hi PNVS, how's India?

You've got two common LVM problems here, A) bigger disks ( PV's ), and B) File too Large Error, where all VG data must fit into a VGRA but can't because only one PE ( physical extent ) is used to accomodate the VGRA, and this PE needs to be increased if its to be big enought to fit all the new information from bigger disks.

Get familiar with the VGCREATE man page and these parameters: ' -s ' PE_SIZE and ' -e ' MAX_PE.

PE_SIZE defaults to 4 MB but can be increase to any power of 2. I.e., 1,2,4,8,16 ... 256.

MAX_PE (* total PE's on in a VG *) defaults to 1016.

Note these formulaa:

PE_SIZE = 2 * ( 30 + MAX_PE ) / 1024


If ( PV size > MAX_PE * PE_SIZE ), then increase MAX_PE or PE_SIZE.


vgcreate -e 9000 -s 8 /dev/vg07 /dev/dsk/c10t2d5

... for a 70 GB PV, or,

vgcreate -e 4500 -s 16 /dev/vg07 /dev/dsk/c10t2/d5

... also for a 70 GB PV.

The above is your answer to B). For problem A), you've got to split you old VG if you don't have enough disk, but you stated "...even we have space in VG...", so I'm assuming you've got enought to bypass splitting and can make a new VG with what you've got.

So use the B) answer to make a new VG, new LVs, and make temporary mount points to mount your new LV to. Use ' cp -p -r ' to copy data from old to new mount points and verify your data in the new LVs. When your satisfied then update your /etc/fstab file with tne new VG and LV names but keep the old mount points and clean up. That's it.
Support Fatherhood - Stop Family Law
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.