1833323 Members
2911 Online
110051 Solutions
New Discussion

Re: LVM Doubts

 
Arockia Jegan
Trusted Contributor

LVM Doubts

Hi,

I have 210Gb single meta volume. I want to keep this in a separate volume group. What may be the best values for pe_size, max_pe (if I want to use another PV in future that's bigger than this PV).

Thanks,
Arockia
5 REPLIES 5
Michael Tully
Honored Contributor

Re: LVM Doubts

Hi,

In LVM one of the rules is this:

Whatever the group gets created with (i.e. the
disk) that is the largest disk that you can
create. Any other disk after that can be smaller but not bigger. If you attempt to add a disk that is larger it will only get created with the same number of extents as that of the first one.

Michael
Anyone for a Mutiny ?
Patrick Wallek
Honored Contributor

Re: LVM Doubts

With a single volume like that, I would probably go for a large PE size, maybe 32MB, and a small number of physicaly volumes, maybe 4 or 6.

I would be tempted to do something like this:

# vgcreate -e 8000 -l 30 -p 3 -s 32 /dev/vg?? /dev/rdsk/c?t?d?

With the -e 8000 and a PE Size of 32 MB (-s 32) you could potentially have a 250GB volume. The '-p 3' will limit you to 3 disks in the VG, do with that as you see fit. The '-l 30' will limit you to 30 logical volumes in this volume group. That can increased or decreased at VG creation time as you see fit.
Roger Baptiste
Honored Contributor

Re: LVM Doubts

<
Since you mentioned META, i presume that this is an EMC array. It would have been nicer to have a smaller Meta and then combining Metas connected across different disk controllers. That would give a better spread and make use of both Meta striping and VG striping on a larger range of disks.



Fine. That should be ok.



It depends on what type of striping you want to use. Distributed striping or LV extent striping?
If it is LV extent striping, you can live with a larger PE_size
of 16MB (through -s 16 in vgcreate) and then use the -i -I options in the lvcreate command with the lv stripe size you need.
OR If you want to use Distributed striping, go for a smallest possible size. I think, in your case it can be 2 Mb stripe (-s 2 -p 4).

I prefer distributed striping, since it is less of a pain and the gains are good enough.

<>

I would suggest that you predecide your VG layout beforehand itself. I normally set a fixed VG size based on the EMC layout/meta configuration etc and create the VGs for all the luns the system can see. The VGs which are not put to immediate use is named free_vgx and whenever a usergroup needs space, i rename the VG with a specific name.

Adding PVs to a VG in a array disk setup is not a good practice. It wont give you good performance to add PVs on the fly.

HTH
raj



Take it easy.
Arockia Jegan
Trusted Contributor

Re: LVM Doubts

Thanks for your replies. The metavolume has setup with the stripe size of
960kb. Do u think having the stripe setup also in logical volume give more performance? If I don't setup stripe in the logical volume what may be the best value for pe_size for VG(One VG has 4 X 210Gb physical volumes). Another Vg has 2 X 430Gb)
Sandip Ghosh
Honored Contributor

Re: LVM Doubts

Since your size of PE is around 1 MB the max PE for the 430 GB physical volume should be 430000 by theory.

But the value of max PE is 65535 maximum for a volume group. So to acomodate the 430 GB physical volume you have to increase the physical extent size with -s option. If you make the PE Size 8MB then the max PE should be 53750 or if you make the PE Size 16 MB then the Max PE should be 26875. To keep some extra provision you can increase the figure of max PE according to your requirement.


Sandip.
Good Luck!!!