1846373 Members
3972 Online
110256 Solutions
New Discussion

Increase max PE per PV

 

Increase max PE per PV

Hi all,
We have a problem, we created a VG without specifying the -e option (max PE per VG) and LVM fixed it to the value necesary to use all the bigger disk we was using to form the VG, 2169. Now we are trying to extend the VG with new disks of 18 GB, the problem is that LVM only allocates 2169 PE in these disks, i.e. we only can use 2169*4=8676 MB of our new disks.

Do you know any way to increase the value of max PE per PV without recreate the VG?

Best Regards
Juan Gonzalez
7 REPLIES 7
Edward Sedgemore
Trusted Contributor

Re: Increase max PE per PV


Sorry, your out of luck. There is no current way to do this without recreating the volume group. Time to offload the data, recreate it and reload.
Printaporn_1
Esteemed Contributor

Re: Increase max PE per PV

Hi,

I confirm Edward's idea.
enjoy any little thing in my life
Thierry Poels_1
Honored Contributor

Re: Increase max PE per PV

"no way Jos?"
It's simply not possible to build a skyscraper on the foundation of a small cottage ;)
Like Edward mentioned you'll have to recreate the volume group, or you could put the bigger disk in a new volume group and maybe move some directories.

Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Pedro Sousa
Honored Contributor

Re: Increase max PE per PV

If it is the root vg (vg00) you cannot do it,
just if you want to re-install the system.

If it's another vg, my idea is:
- create a new VG in the new disk
- crate the same lv structure
- copy/move all the information from the actual vg to the new one
- remove the actual vg
- extend the new one to the old disk.


good luck.
Rob Smith
Respected Contributor

Re: Increase max PE per PV

I agree with the suggestion above. I have done this many times never had a problem. Use cpio to copy the data from the old disks to the new and then verify the file count to make sure everything is there.
Learn the rules so you can break them properly.
Les Schuettpelz
Frequent Advisor

Re: Increase max PE per PV

Dave Fargo using Les's ITRC login...

Of course it is a good practice to set a fairly high max PE per PV when any new vol group is created.

You might want to check that your pvcreate gave access to the entire disk to begin with. I think what happens is that when you pvcreate a disk larger than the largest disk LVM knows about on a system, the pvcreate defaults to that maximum physical size. Try using the -s option to force pvcreate to recognize the full size, in sectors. This is tricky, diskinfo may tell you a sector size of 512 but it may really be 1k. I don't recall if 'oversizing' gives you the real size, like extendfs.

Once you get the pvcreate right, try vgcreating a temporary vg with it, to prove LVM sees the full disk. Then, you should be able to remove the temp vg and vgextend onto the new disk at full size, the VG should dynamically increase the max PE value.

Also, the -x option of vgextend may be helpful, not sure, the man page isn't too clear on this. I am pretty sure we have done this here in some of our mixed-size VG's, not just with brand new VG's.
Wodisch
Honored Contributor

Re: Increase max PE per PV

Hello Carlos,

DON'T increase the "max PE/PV", but increase the
"PE size"! Make it something like 64MB (up to 256MB),
and REDUCE "max PE/PV" to something like 1024 (which
would leave your VG ready for substitute disk of up to
64GB, each). Of course, your LVs have to multiples of
that PE size, but that should not be any problem.
AND increase the "max PV/VG" parameter to something
sensible, like 60 or so (the default of 16! is plain useless
today), and DECREASE "max LV/VG", for you will never
use 255 LVs/VG, so a value of 32 (or less) might be ok.
All in all you should get by with smaller PV/VG headers
(PVRA, VGRA) on the disk drives, and smaller tables in
your kernel. AND the output of the "-v" options to the
"lvdisplay/pvdisplay" commands will be much easier to
read...
HTH,
Wodisch
BTW: if that problems happens to your boot VG, your
only chance is to use "make_tape_recovery" (Ignite/UX)
to backup and RE-INSTALL your boot disks. W.