Operating System - HP-UX
1753922 Members
7734 Online
108810 Solutions
New Discussion юеВ

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

 
pnvs
Occasional Advisor

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.
3 REPLIES 3
Steven E. Protter
Exalted Contributor

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

Shalom,

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.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Mridul Shrivastava
Honored Contributor

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
Michael Steele_2
Honored Contributor

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

-and-

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

Example,

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