[linux-lvm] Best Practices deploying LVM

Chris Cox chris_cox at stercomm.com
Thu Oct 29 23:58:32 UTC 2009

On Fri, 2009-10-30 at 00:45 +0100, Abraham Pérez wrote:
> Hi everyone,
> I'm looking for some whitepapper or similar document to find any kind
> of best practices using LVM.
> For example, usually i make only one volume group in each server and
> inside it I create different logical volumes for different purposes,
> but talking with one colleague, we discover that he makes one volume
> group for each logical volume (more or less)... so my final question
> is: in performance terms, what configuration is more efficient and
> why?

Define "efficient"... anyhow, the idea of a volume group is
to present a pool of storage.  So making a volume group per logical
volume sort of defeats the intended purpose.

So... a volume group has more to do with defining a class of
storage pool.  Ideally physical volumes inside of a single volume
group have some kind of relationship (e.g. maybe they are all
of the same speed or type or raid, etc).  It's common for low
end systems to have just one volume group.  However, you COULD
segment storage pool types by function.  Thus you could have
a System volume group for the OS volumes and a Data volume group
for user data (just an example).

There is a lot of ways to look at it.

Personally, just because of pvmove, I see physical volumes
as whole disks and not a myriad of piece meal partitions.
That way you get the potential ability to move data off
of a physical volume in a volume group to free areas on
different drives in that same group and remove a drive
from the volume group and from the system (e.g. think of upgrading
the size of drives you use inside of a volume group... you could
use this to upgrade the drives without having to necessarily
take anything down).

So my best practices...

1. Use multiple volume groups to define classes of storage.

2. Use full disk physical volumes over partitions.

3. I like unique naming of volume groups just so that if
a drive lands else where, and it presents itself to the system,
it will not collide with existing volume group names.
(but there is good reason for not doing this... and really
only a factor if you have a tendency to throw drives into
different computers all of the time)

> Please excuse my writen english, but I don't use it very often.

I use english all of the time.... it doesn't seem to help.

More information about the linux-lvm mailing list