Operating System - HP-UX
1834779 Members
2874 Online
110070 Solutions
New Discussion

Re: vgcreate/vgextend: number of pe per vg

 
Tonny Sejr Kromann
Frequent Advisor

vgcreate/vgextend: number of pe per vg

Hi

I have a problem adding large disks t a volumegroup due to too many physical extents.
Can I do anything about that?
Due to performance I want to have 3 x ~150G in one vg.

Dialog:
myhost:/home/sysadm/nydisk#vgcreate -p 3 vg_inf_DK3 /dev/dsk/c9t0d0
Increased the number of physical extents per physical volume to 43394.
Volume group "/dev/vg_inf_DK3" has been successfully created.
Volume Group configuration for /dev/vg_inf_DK3 has been saved in /etc/lvmconf/vg_inf_DK3.conf
myhost:/home/sysadm/nydisk#vgextend vg_inf_DK3 /dev/dsk/c9t0d1
vgextend: Too many physical extents for volume group.
Cannot add physical volume to volume group.
LVM_MAXPXS: 65535
myhost:/home/sysadm/nydisk#vgremove vg_inf_DK3
Volume group "vg_inf_DK3" has been successfully removed.
myhost:/home/sysadm/nydisk#vgcreate -e 139182 -p 3 vg_inf_DK3 /dev/dsk/c9t0d0
Usage: vgcreate
[-f]
[-A Autobackup]
[-x Extensibility]
[-e MaxPhysicalExtents]
[-l MaxLogicalVolumes]
[-p MaxPhysicalVolumes]
[-s PhysicalExtentSize]
[-g PhysicalVolumeGroupName]
VolumeGroupName PhysicalVolumePath...
"MaxPhysicalExtents": Must be a value between 1 and 65535.
myhost:/home/sysadm/nydisk#

--
Regards
Tonny
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: vgcreate/vgextend: number of pe per vg

Hi Tonny:

You can start over and create the volume group from scratch specifying a larger physical extent size than the default of <4> and reducing the 'max_pv' allowed downwards from its default of <255>.

The LVM table is restricted to one extent where the table size is essentially (max_pe * max_pv). 'max_pe' can range from 1-65535 and 'max_pv' from 1-255 -- quite a range. The problem is that once the volume group is created, non of these attributes can be changed, so be careful how you configure things.

Obviously, if you have already populated the volume group with logical volumes and data, you will need to copy your data to another place or medium; recreate the volume group, etc.; and reload your data.

...JRF...
Wieslaw Krajewski
Honored Contributor

Re: vgcreate/vgextend: number of pe per vg

Hi,

What James says is true, but I'd like to add some extra remarks.

0. I suspect that mentoned three disks are not exactly equal size what results in the impossibility of adding new disk to the VG. This new disk seems to be larger than the previous one.

1. I think that it is not necessary to change default PE size, although it could be usefull. 4 MB PE is enough to use the whole disk, assuming that the size is as given in the question. If however the disk to be added is greater than of course must think about doubling PE size.

2. Option -e is to specify MaxPE per PV and should be less than 65535. So, to be sure that everything is OK Toni can use this option with max available value.

3. Specifying option -p 3 Toni restricted max PV in this VG to 3.

To conclude, Toni must recreate VG with new valeu for -e option and possibly new value for -s option.

Hope this helps.

Rgds.
Permanent training makes master
Tonny Sejr Kromann
Frequent Advisor

Re: vgcreate/vgextend: number of pe per vg

Well I have 3 identical disk (actually 3 x raid5) and I want to ?stripe the lvols across all 3 disks.
Now I managed to create the vg by setting the PE size to 8MB, and thereby reducing the number og PE exactly enough to keep within 65535. This leads to the next small problem by creating the lv. The command:
lvcreate -L 2048 -n lv_inf_DK3_254 -r N -i 3 -I 1024 -p w vg_inf_DK3

says Stripesize must be 4,8,16,32 or 64.
However the manpage says up to 32768k. I have earlier on other systems created lv's with stripesize of 1024k. What may the reason be?
I am able to create the lv with 64k with no problem.
Thanks for your help.

--
Tonny
Wieslaw Krajewski
Honored Contributor

Re: vgcreate/vgextend: number of pe per vg

Hi again,

To use stripes of size greater than 64k you should patch your system.

Install for example PHCO_21269 if you use HPUX11.0

Rgds.
Permanent training makes master
Tonny Sejr Kromann
Frequent Advisor

Re: vgcreate/vgextend: number of pe per vg

Hi
This patch was a great help. It solved my problem (but not the performance).
Thanks a lot :)

Regards
Tonny