LVM questions

Paul Mora paulmora-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Mon Apr 11 02:19:49 UTC 2005


On Apr 7, 2005 7:19 PM, Walter Dnes <waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org> wrote:

>   Only the 4th partition is actually under LVM.  I believe that ReiserFS
> or ext3 or whatever runs on top of LVM.  Is there a speed hit with LVM?

Nope, as far as I know there isn't any performance degredation when using LVM.
 
>  Is extent assignment random-access?  To illustrate it better, let's
> assume I start with the following logical partitions...
> 
>   A) 10 gigs
>   B) 20 gigs
>   C) 10 gigs
> 
> ...can I later delete A and add those 10 gigs to C, even though they're
> physically separated by intervening logical B?

Assignment is not random access.  Normally, when you create a logical
volume (LV) (what used to be a "partition", the thing you format with
a filesystem), LVM uses physical extents (PE) on the first disk in the
volume group with the corresponding space.  If it runs out, it will
allocate PEs that are on the other disks in the volume group (VG).  Of
course, this is all tuneable, if you want.  You can say, for example,
create an LV, but use the free PEs on hdb1.  You can also stripe the
data across all your VG disks.  In some cases this will give you
better performance; sort of like a striped RAID array.

The thing to keep in mind with LVM, is that once you create your VG,
it, essentially, is your "disk".  It is a pool of space, made up from
all the drives in it.  You no longer have to worry about things like
disk size, primary/extended/logical partitions.  You just tell LVM
that you want a "partition" (eg. LV) and how big, and it does the
rest.  Same thing goes for shrinking and reducing the LVs.  If you
want to add more space later on, you can do it without affecting the
other LVs.  LVM simply allocates the space from the free space in the 
 VG. (caveat: shrinking/growing the size of an LV does NOT shrink/grow
the size of the filesystem!  You must use the appropriate filesystem
command to do that part, and there are restrictions on the different
types of filesystems and how they can be changed.)  And the best part?
 You can do all this while the disks are online, and without encurring
a reboot, or, in some cases, even single user mode.

For a real good writeup of how LVM works, check out this whitepaper
from Novell.  It's a bit dated when it comes to the commands part, but
they should work for the most part.  It's the explanation that is
really good.

<http://www.novell.com/products/linuxenterpriseserver8/whitepapers/LVM.pdf>

pm

-- 
Paul Mora
email: paulmora-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list