Operating System - HP-UX
1752808 Members
5991 Online
108789 Solutions
New Discussion юеВ

what is max LUN with PE size...

 
SOLVED
Go to solution
derek b smith_1
Regular Advisor

what is max LUN with PE size...

Its a good friday!

I read the LVM limits whitepaper and reviewed some related posts about PE sizes, however I want to make sure I get this right.

# vgdisplay vg20
--- Volume groups ---
VG Name /dev/vg20
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 31
Open LV 31
Max PV 16
Cur PV 15
Act PV 15
Max PE per PV 17264
VGDA 30
PE Size (Mbytes) 8
Total PE 228702
Alloc PE 222314
Free PE 6388
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0


my Max PE per PV is 17264 and my PE size is 8.
# echo 17264*8|bc
138112
is my size in Mb which I can utilize from one disk in the entire VG?

But what about the this calculation:
# echo 2^16-1 |bc
65535
root@xxx [/tmp]
# echo 65535*8|bc
524280

this would be the max size of a LUN with a PE size of 8Mb?

and on page 16 in the attachment, see the table and compare the calc of 16PVs (y axis) and PE size of 8 (x axis) to mine above?

63228
494.0G

thank you!
2 REPLIES 2
James R. Ferguson
Acclaimed Contributor
Solution

Re: what is max LUN with PE size...

Hi Derek:

> my Max PE per PV is 17264 and my PE size is 8 [...so...] 138112 is my size in Mb which I can utilize from one disk in the entire VG?

Yes.

> But what about the this calculation... 524280 ...this would be the max size of a LUN with a PE size of 8Mb?

Yes.

> ...and on page 16 in the attachment, see the table and compare the calc of 16PVs (y axis) and PE size of 8 (x axis) to mine above?

Yes, the table shows the maximum space based on the extent size and the maximum number of extents allowed. Your physical disk as a limit of 17,264 extents on any one of up to 16 physical volumes that the volume group can contain (based on the MAX PV). The table you cite is saying that with a 'pe_size' set to 8 (for example) during 'vgcreate' and with an upper limit of 65535 extents, a physical disk no larger than 524GB could be 100% utilized. Since version 1.0 volume groups can't have more than 65535 physical extents, adding a 1000GB physical disk would waste about 50% of its capacity.

When you transition to the 11.31 (using the March 2008 or later release) you can avail yourself of version 2.x volume groups, where it is no longer necessary to set maximums for physical volumes, logical volumes, or extents per physical volume.

Regards!

...JRF...
chris huys_4
Honored Contributor

Re: what is max LUN with PE size...

Hi,

> The table you cite
> is saying that with a 'pe_size' set to 8 > (for example) during 'vgcreate' and with > an upper limit of 65535 extents, a
> physical disk no larger than 524GB could > be 100% utilized.
The table, which is part of the LVM chapter of the by the HP-UX competency center written recovery guide, says, that a volumegroup which has a physical extent size of 8Mbyte and which has a maximum number of 16 physical volumes, can have at most 63228 physical extents for each of the 16 physical volumes.

This because the size of the lvm header of a "version 1" volumegroup is equal to exact 1 physical extent. And what takes most (disk)space in a lvm header, is that every disk of the volumegroup is contained "as a table of physical extents" in the lvm header.

Something like.
Suppose
/dev/vg01
/dev/dsk/c1t2d0
/dev/dsk/c2t2d0

And suppose c1t2d0 has 10000 physical extents.
And c2t2d0 has 2000 physical extents

>>>> lvm header disk c1t2d0 >>>>
lvm header
[..]
pv header 0 (c1t2d0)
PE LV LE
0 1 0
1 1 1
.. .. ..
10000 10 1000

pv header 1 (c2t2d0)
PE LV LE
0 1 0
1 1 1
.. .. ..
2000 2 500
>>>> lvm header disk c1t2d0 >>>>

>>>> lvm header disk c2t2d0 >>>>
[..]
pv header 0 (c1t2d0)
PE LV LE
0 1 0
1 1 1
.. .. ..
10000 10 1000

pv header 1 (c2t2d0)
PE LV LE
0 1 0
1 1 1
.. .. ..
2000 2 500
>>>> lvm header disk c2t2d0 >>>>

Thus in summary. The physical extent size, in this case 8Mbyte, determines, the product of max PV*max_pe_per_pv

i.e. max PV*max_pe_per_pv = 8Mbyte .

* "for a given PE size",
the higher max PV -> the lower max_pe_per_pv becomes
* "for a given PE size",
the higher max_pe_per_pv -> the lower max PV becomes

And the higher PE size becomes, the higher the product max PV*max_pe_per_pv becomes.

But anyway that all is not that interesting. The max_pe_per_pv of 17264 in the vg20 case, was most probably set on vgcreate time, when a lun of 134Gbyte was "given" with the vgcreate command, together with setting the PE size on 8mbyte.

I.e the most probable vgcreate command was something like.

# vgcreate -s 8 -p 16 /dev/vg20 /dev/dsk/<134Gb_lun> /dev/dsk/

result : max_pe_per_pv = 134Gb/8Mbyte = 17264

And from then on the max_pe_per_pv had been set "in stone" and the other maximum, i.e. the 63228, doesnt count anymore.

It would have been different if a "manual max_pe_per_pv would have been specified" with a number higher then any of the "disks" "given" at vgcreate time.
i.e.

# vgcreate -s 8 -e 63228 /dev/vg20 /dev/dsk/<134Gb_lun>

result : max_pe_per_pv = 63228

Moral of the story. Just give in a "PE size" at vgcreate time, that includes "future growth". If you add at vgcreate time a 134 Gbyte lun, and you think about given it a 8Mbyte physical extent size, then this 134Gbyte lun, would occupy 17000+ physical extents, then its not unlikely, that in the future, 8 times that lunsize, i.e. 1TByte luns are added to that volumegroup, so then it might be better to opt for a 64Mbyte PE size at vgcreate time, 8 times the "8Mbyte PE size" and for good measure, while a 134Gbyte lun, with a 64Mbyte size, will only need 2100+ (=17000/8) extents, the 1Tbyte lun, would need again 17000+ extents, which would lead best to give at vgcreate time a max_pe_per_pv (max_pe) of around 20000.
Or something like that.. ;)

i.e.
vgcreate -s 64 -e 20000 /dev/vg20 /dev/dsk/

would have allowed, a 20000*64mbyte = 1.28Tbyte lun to be added, instead of the current max of a 134Gbyte lun.

Greetz,
Chris