1833764 Members
2357 Online
110063 Solutions
New Discussion

Re: MAX_PE_per_PV

 
SOLVED
Go to solution
Jack_126
Frequent Advisor

MAX_PE_per_PV

Dear all,
I wanted to extend the size of one volume.
for that I created a physical disk using
pvcreate /dev/rdsk/c16/t0/d1
then I used the following command to extend the volume
vgextend vg01 /dev/dsk/c16/t0/d1
it extended but not given the full capacity of 100g. its given an message that the Max_PE_per_pv is is too samll , so instead of getting the additional 100gb I will get only 70gb.
can anybody help me to shortout this...very urgent
14 REPLIES 14
RAC_1
Honored Contributor
Solution

Re: MAX_PE_per_PV

No way without destroying the vg and creating it again. the max limit is 65535. the default is 1016

Back up vg, re-create and restore.

Anil
There is no substitute to HARDWORK
Steven E. Protter
Exalted Contributor

Re: MAX_PE_per_PV

This is set when the volume group is created. See the man page for vgcreate.

To fix it now you need to do this:

1) Backup all data on the volume group, databases and online data down.
2) vgexport the volume group.
3) re-create the volume group with the max pe parameter set higher.

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
Jack_126
Frequent Advisor

Re: MAX_PE_per_PV

Hi,
I have just extended the vg but I have not extended the logical volume. so is there any way to remove this added disk from the VG.
Geoff Wild
Honored Contributor

Re: MAX_PE_per_PV

You will have to re-create:

vgcreate -s 8 -p 128 /dev/vg01 /dev/dsk/c16/t0/d1


The -s: Sets the number of megabytes in each physical
extent, where pe_size is expressed in units
of megabytes (MB) in the range 1 to 256.
pe_size must be equal to a power of 2 (1, 2,
4, 8, etc.). The default value for pe_size
is 4 (four megabytes).

The -p: Set the maximum number of physical volumes
that the volume group is allowed to contain.
The default value for max_pv is 16. The
maximum number of physical volumes can be a
value in the range 1 to 255.




Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sundar_7
Honored Contributor

Re: MAX_PE_per_PV

Are you running 11.0 or 11i ? if 11i there is unsupported "vgmodify" tool that can be used to increase the Max_PE_per_PV.

sure, you can remove the added PV from the VG

# vgreduce /dev/dsk/c16t0d1

Learn What to do ,How to do and more importantly When to do ?
Geoff Wild
Honored Contributor

Re: MAX_PE_per_PV

I think I'm wrong -s 8 will only work to 32GB, try -s 16

Actually - do a vgdisplay -v vg01 - that will tell you what it is currently...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Helen French
Honored Contributor

Re: MAX_PE_per_PV

You may reduce the added PV using 'vgreduce' command. Also, try doing a backup of original file systems and then recreate the VG with the higher capacity disks. When LVM creates new VG, it adjust the default values (PE size, PE per PV etc) to the highest capacity disk available. You can do this easily through SAM too.

Also if you expect future upgrades, adjust the values accordingly so that you can add higher capacity disks in future. This is the simple calculation you should use:

Max PV size = Max PE per PV x PE size
Life is a promise, fulfill it!
Jack_126
Frequent Advisor

Re: MAX_PE_per_PV

Dear All, this is the output of the below command.

#/>vgdisplay -v vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 17501
VGDA 4
PE Size (Mbytes) 4
Total PE 35000
Alloc PE 17000
Free PE 18000
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg01/lvol11
LV Status available/syncd
LV Size (Mbytes) 68000
Current LE 17000
Allocated PE 17000
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c2t1d0
PV Status available
Total PE 17499
Free PE 499
Autoswitch On

PV Name /dev/dsk/c16t0d1
PV Status available
Total PE 17501
Free PE 17501
Autoswitch On

I am using hp-ux11i , as some one suggested that i can use vgreduce /dev/dsk/c16t0d0.

1>if I use this command the data will be intact.
2>after doing this what i have to do to get the proper size as this disk is of 100gb partion from array.

Sundar_7
Honored Contributor

Re: MAX_PE_per_PV

Hi Jack,

Yes, the data will be intact. The disk is part of the VG but doesnt have any PEs allocated from the PV. so, you bet the data will be intact.

As suggested above, only way to use the whole 100GB of the new slice from the array is to recreate the volume group

You can use the attached vgmodify to change the MAX PE per PV. But not sucessful in most of the cases, also "UNSUPPORTED" by HP.

Before going ahead with anything, create a good backup of the data.

- Sundar.
Learn What to do ,How to do and more importantly When to do ?
Jack_126
Frequent Advisor

Re: MAX_PE_per_PV

Hi Sunder,
1>so for removing the added disk to vg01 i will use the following command
vgreduce /dev/dsk/c16t0d0
2>the attachment you sent I am not able to open it.

I will submit the points to all onece free from this prob.
Zinky
Honored Contributor

Re: MAX_PE_per_PV

Jack..

You're stuck with one of LVM's weaknesses and pitfalls. Heed the advice of the desert dwellers and the salad heads -- recreate your VG.

In our site, we now have a standard to use all the maximum values allowed at vg creation time.

We have:

vgcreate -e 65535 -l 64 -p 64 -s 64

This will heasily handle up to 4TB LUNS (PVs) which is more than enough..



Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
Sundar_7
Honored Contributor

Re: MAX_PE_per_PV

Jack.

Yes..vgreduce /dev/dsk/c16t0d0 will do

Attachment is a PA-RISC binary. You will have to download to your PC. FTP to your 11i box. Set the execute permission and execute.

- Sundar.
Learn What to do ,How to do and more importantly When to do ?
Zinky
Honored Contributor

Re: MAX_PE_per_PV

Is this 100GB LUN coming from an Array with a friendly master? If so, why don't you return the 100GB LUN to him and have it carved into 2 50GB LUNs? That way your VG will still be totally supported.
Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
Jack_126
Frequent Advisor

Re: MAX_PE_per_PV

Dear All,

What I did I removed the disk form the vg, using vgreduce.
then using pvremove i removed the physical disk.
I agin created the LUN in array of 50gb each and then one by on e added to the vg01.
now its Okay to me .

Thanks a lot for your guidance and suggestions.

Regards
Jack