Operating System - HP-UX
1826077 Members
2076 Online
109690 Solutions
New Discussion

Re: Increasing PE size of an LV

 
SOLVED
Go to solution
Philip Kernohan
Advisor

Increasing PE size of an LV

Howdy,

I have a LV that has been created with 4 MB PEs. I now require more than 65535 x 4 MB for that LV (> ~256 GB).

It appears I now need to increase my PE size from 4 MB to perhaps 8 MB (or maybe 16 MB before this is over).

The LV is not striped. I have Online JFS installed - great product but I'm not sure it will help me here.

Questions:
Must I recreate the Volume group from scratch?

What affect would a 8 or 16 MB PE have over a 4 MB PE in terms of performance - the VG is used for large files?

I can backup/move all of the data off of the VG/LV as necessary.

PS: I have an outstanding post to assign points against - when we get around to performing that last task I will award the points - apologies.
It's nice to be important but it's more important to be nice
6 REPLIES 6
Sanjay_6
Honored Contributor
Solution

Re: Increasing PE size of an LV

Hi Philip,

No Choice, You cannot do that once the Vg is created. It is possible at the time of VG creation. Do "man vgcreate" for more info.

This is my opinion. Someone else may have a different solution for you.

thanks
Michael Tully
Honored Contributor

Re: Increasing PE size of an LV

Hi,

Sorry you will need to create a new volume. You can only change the defaults (which is 4) at the time of creation. Suggest you create a new one with the extent size that you would like and copy across you data.

HTH
-Michael
Anyone for a Mutiny ?
Sanjay_6
Honored Contributor

Re: Increasing PE size of an LV

Hi Philip,

This link might be old, but may help you in finding the answers you are looking for.

http://us-support2.external.hp.com/cki/bin/doc.pl/sid=c2d9f5640e298a7b6f/screen=ckiDisplayDocument?docId=400000000354541

Hope this helps.

thanks
Wodisch
Honored Contributor

Re: Increasing PE size of an LV

Hello Philip,

yes, you have to re-create your VG!
But choose your poison wisely - a PE-size of
8MB is NOT much better than 4MB...

Ask yourself the following questions:
1) how big will the biggest LV become, ever?
2) how many PVs will you have to add, ever?
3) what size-restrictions do your LVs have?
4) how many LVs will you need in the VG, ever?

Now for the answers:
1) seems like 256GB to the supported limit of
1) 1TB (=1024GB).

2) depending on your RAID-boxes, you might have
2) something from 4GB to 100GB per LUN or
2) single PV. And you will have therefor from
2) 64 to 255 (maximum value) PVs in that VG.

3) Does it matter to you/your company wether
3) you have some "slack" of a few MBs?
3) So can you live with LVs having sizes in
3) multiples of, say, 32MB, or 64MB?

4) Even for huge databases I guess you will not
4) need more than, say 30-50 LVs, right?

That makes your "vgcreate" command-line like:

vgcreate -p 128 -l 64 -s 64 -e 2048 /dev/vgBIG ...

or even like this:

vgcreate -p 128 -l 32 -s 256 -e 1024 /dev/vgBIG ...

The first example would allow to have up to 128 PVs, each of up to 2048 * 64MB and to be
used by up to 64 LVs, whereas the second does
permit you to have up to 128 PVs, again, but
this time each one of up to 1024 * 256MB, and
(only) up to 32 LVs.
So the maximum size for the VG would be a mere
128 * 2048 * 64MB = 16TB or even
128 * 1024 * 256MB = 32TB
where each LV could be up to 1TB (=1024GB) in
size (for that's the officially supported
limit for the sizes of LVs).

AND you would be able to add PVs of whatever
size you want (well, up to 256GB/Disk or LUN)
later on...

BTW: PE-size is *NOT* about speed of disk-access!!!

Just my ?0.02,
Wodisch
Sridhar Bhaskarla
Honored Contributor

Re: Increasing PE size of an LV

PE is not manageable with lv commands. It is fixed during the volume group creation. It's a volume group attribute. So, you need to recreate the volume group with a different size.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Wim Rombauts
Honored Contributor

Re: Increasing PE size of an LV

You have probably already considered this, but in case you haven' : if it is possible to split up the logical volume in different smaller logical volumes (and filesystems), you just have to create new LV's for the new filesystems, and only copy those files. In that case, there is no reason to create a whole new volume group and copy all files of all LV's in the volume group.