1837526 Members
3599 Online
110117 Solutions
New Discussion

Curious LVM items...

 
SOLVED
Go to solution
Craig Rants
Honored Contributor

Curious LVM items...

I wanted to get a felling from those in the forum about a couple LVM issues we have had on a new rp5470.

First, the box came from hp with a 36GB vg00. The PE size was 8MB. Is there a reason that I would want to use this over a 4MB PE? I can't find any hard evidence that either size is better.

Second, I ran a script to create another bootable copy of vg00 modifying the PE size to 4MB. Rebooted off the new disk, then re-ran the script to destroy vg00 and create it with a 4MB PE size. Then rebooted off of vg00. I then ran my make_tape_recovery with inc_entire=vg00 and restored of the ignite tape. My PE size is back to 8MB. What gives?

Thanks in advance,
Craig
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
7 REPLIES 7
Peter Kloetgen
Esteemed Contributor

Re: Curious LVM items...

Hi Craig,

it can make sense to take a bigger size for PEs if you have large volume groups. Normally, the max. number of PEs per volume is limited to 1024, which means 4 GB per volume. You either have to increase the max PE number or the PE size or both values when creating a Volume Group. Another reason to chose a big PE size could be an application, for example a big database. They just love big PE sizes.

No idea, what causes your old VG to appear again, sorry.

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping
S.K. Chan
Honored Contributor

Re: Curious LVM items...

1) I think it not so much of the issue "which one is better 4 or 8 MB". It has to do with the size of the disk which determines the size of the PE. Check this doc (KBRC00009036).

http://us-support3.external.hp.com/emse/bin/doc.pl/sid=ba3c936011ba85985c?todo=search&searchcategory=ALL&rn=100&presort=rank&searchtext=KBRC00009036&searchcriteria=allwords&searchtype=SEARCH_TECH_DOCS&x=60&y=6

2)Check (KBRC00008114), that might explain your 2nd question.

http://us-support3.external.hp.com/emse/bin/doc.pl/sid=71c1e0731479720f2a?todo=search&searchcategory=ALL&rn=100&presort=rank&searchtext=KBRC00008114&searchcriteria=allwords&searchtype=SEARCH_TECH_DOCS&x=61&y=7

Hope they'll help answer your questions ..

James R. Ferguson
Acclaimed Contributor
Solution

Re: Curious LVM items...

Hi Craig:

The 8MB extent size is fixed with 36GB disk. Do a 'pvdisplay /dev/dsk/cXtydZ' and you will see.

This has obvious impact when you are creating logical volumes and are expecting rounding to 4MB extents. For instance, if you use the Advanced Installion feature of Ignite recovery in a disaster recovery site and don't realize that your 4/9/18 GB vg00 from "home" is now a 36GB disk and you attempt to size a logical volume (filesystem) that is not a multiple of 8MB (the extent size), you will find that Ignite resizes it to a multiple of 8MB as it should! However, the first time you see it, you may think your "nuts"! :-))

Regards!

...JRF...
Martin Johnson
Honored Contributor

Re: Curious LVM items...

Generally, the bigger the PE the better. Larger PEs allow for larger disks. If you replace a vg00 disk with a larger disk and you have a small PE you will not be able to use all the disk. The PE size cannot be changed on the volume group. Therefore, you would have to delete and rcreate the volume group to take advantage of the larger PEs.

vgcreate takes the size of the first disk to determine the value of PE.

HTH
Marty
Bill Hassell
Honored Contributor

Re: Curious LVM items...

Unlike the Unix block size and frag size in filesystems, the extent size in LVM is simply a building block for laying out space, and except for striping, you can change it to almost any value. There is a maximum limit on the number of extents in a single volume group and with a terabyte sized volume group, a 4meg extent will exceed the maximum physical extents allowed (65k). So for large disks, a larger extent is better, simply to keep the numnber of extents under control. I don't like having LVM tracking 60k+ extents so I typically increase the extent size to 16 or 32 megs so I can keep the extent count under 10k when dealing with 100 Gb or larger volumes.

Note: The maximum number of physical extents is settable *only* when you create the volume group, so if you think you might extend a volume group in the future, then increase max-pe and the extent-size to cover the largest volume size you might ever have.


Bill Hassell, sysadmin
James R. Ferguson
Acclaimed Contributor

Re: Curious LVM items...

Hi (again) Craig:

To add to Bill's commentary, given that the maximum number of physical extents that can be allocated from any of the physical volume is 65535 ('max_pe'); and the 'max_pe' size is 256MB; we find that the largest disk supported by these criteria alone, would be:

(256 * 65535) = 16,776,960

...or about 16,383 GB...rather large!

Regards!

...JRF...

Craig Rants
Honored Contributor

Re: Curious LVM items...

Thanks for all the replies. I was really just curious about the reason my ignite reverted to a 8MB PE as well as why it came with a 8MB PE when the default for vgcreate was 4MB PE.

Craig
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut