[ale] Question: to LVM or not LVM

Jeff Lightner jlightner at water.com
Mon Feb 12 09:10:55 EST 2007


Having used LVM for many years in HP-UX I was happy to have it for
Linux.  One thing it does is eliminate a number of partitions limit.
You can have as many logical volumes (LVs) as you want on a single
drive.

Another thing it does is allow you combine (easy concatenation) multiple
drives so your LV (which can be thought of as a logical partition) can
be much larger than a single partition of one of your drives.

As mentioned below it also allows for easier expansion and reduction.

The downside on Linux is it doesn't come with mirroring by default.   I
wouldn't use LVM to try put /boot or /root on more than one drive.
HP-UX has an add on called Mirror/UX that allows you mirror under LVM.
(Of course you can always use mdadm for Linux mirroring instead.)   A
benefit to the way Linux does LVM is that it like mdadm will allow you
to use partitions as your devices rather than requiring you to use the
whole drive as HP-UX does.

In summary I believe there's a lot of value to LVM in Linux.

-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of Greg
To: ale at ale.org
Freemyer
Sent: Saturday, February 10, 2007 7:08 PM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] Question: to LVM or not LVM

On 2/10/07, cfowler at outpostsentinel.com <cfowler at outpostsentinel.com>
wrote:
> On Sat, Feb 10, 2007 at 01:04:06PM -0500, Robert Reese wrote:
> > I have a question I hope y'all can help me with...
> >
> > I am installing openSUSE 10.2 on my laptop and want to use the Xen
virtualization or the VMWare solution to run XP Pro inside a virtual
machine.  Looking at LVM, which I found is different than a VM, the
prospect intrigues me as I have a growing number of spare harddrives and
external harddrives.
> >
> > The question is whether I should install openSUSE with LVM or will I
find a much more difficult time ahead than without LVM?
>
> Good question.  I don't really care for it personally.  I used LVM on
AIX
> and had good reason to.  We would install systems and they of course
would
> have small disks.  Using LVM we were able to add a new hard disk(s)
and
> we could grow the AIX FS into those disks.  Need more pagging space?
That was
> under LVM too.  We would just grow that into new disks.  With Linux
I've had
> decent size disks and have never had to use LVM for any reason.  I
guess
> you could grow the LVM to use more space but what about ext3?  Does
> ext3 support growth or shrinkage?  I've never used it enough to know.
>
> LVM to me is good when you have more than one disk or plan on it
> in the future and want to grow your file systems into new space.  It
> is easier to grow the FS then to tar it up, re-format, and un tar it
> back on the newly formated FS.  Other than that I don't really see the
> benefit of using LVM.  Especially if you only have one drive to begin
> with.
>
> >
> > TIA,
> > Robert Reese~

First, I would never boot dom0 off of LVM.  If you have a problem it
makes it hard to fix.

Other than that LVM is a good fit with any VM if you are going to
creating / deleting VM setups.  OTOH, if it is a one time thing you
don't need it.

There are 2 big advantages to LVM; flexibility and snapshots.

Flexibility is the ability to easily create Volumes on the fly or to
resize them.  Yes ext3 can at a minimum grow on the fly.  I don't
remember if they have shrink at all.  Reiserfs, JFS, XFS can also all
grow on the fly.  At least one of the above can shrink, but again I
don't remember.

The 2nd advantage does not sound like it applies, but maybe.  With a
LVM you can snapshot a volume.  I have not kept up with LVM in the 2.6
kernel.  In the 2.4 kernel all you could do is use that snapshot as a
source for tape backups, or manual file by file restores.

More capable LVMs allow you to restore the entire snapshot at one
whack.  ie. I was at a clients a couple weeks ago and they were using
Netapp filers to hold their Oracle DBs.  They would snapshot them as a
backup.  The they would retain numerous snapshots going back 4 days or
so as their main backup strategy.  (Netapp supports 255 snapshots per
volume AIUI).

Hope that helps,
Greg
-- 
Greg Freemyer
The Norcross Group
Forensics for the 21st Century
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale



More information about the Ale mailing list