home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] Need some advice re: RAID and LVM ?!?

William Case wrote:
: Is it worth worrying about, i.e. setting up, either both or either of
: RAID or LVM?  As I said I have read the general bumph regarding the use
: of both, but has anyone with a small system similar to mine found any
: great advantage.

In short: I haven't found any substantial, ever-present advantage to using
LVM, but I also haven't found any disadvantage to using it, either (standard
disk layout caveats apply).

A long-winded opinion piece:

On a small system with two disks, the only RAID that makes sense is a
mirror.  (And I imagine that if you wanted a mirror, you'd have bought the
second hard drive for that explicit purpose.)  Outside of a mirror, on a
two-disk Linux system, RAID is, at best, a mild convenience, and at worst, a
dead system.

As for LVM...

I resisted it for years.  It felt like another layer of kludgy abstraction
that I just didn't need.  Then I played with it, and I've come to quite like
it.  (Okay, so it's not LVM I like, but volume management in general.)

There are a small number of times when I find LVM to be invaluable:

1) I know I'll be doing something different, and I don't know how much disk
to allocation to Partition N for Program X.  LVM allows me to leave
unpartitioned space on the drive, and dynamically allocate it as needed.
(Note that this is a fairly mild benefit, save in corner cases.)

2) Virtualization.  When I was setting up labs on two-to-three system
'networks', I'd install a XEN guest to an LVM 'partition', then strip it of
any identifying information (hostname, network configuration, SID, etc.),
and never turn it on again.  When I needed a new node on the network, I'd
snapshot that partition into a new partition, and turn it on.  This would
let me turn up a full lab of two dozen machines in thirty minutes or less
(depending on OS), with minimal hassle.  It also makes patching a breeze.

3) Mass installs.  When deploying hundreds or thousands of Linux machines,
with no more than 15-20 performing a single function, you often run into
drastically different partitioning needs.  Using LVM for the partitioning
means you can easily leave unpartitioned space at the end of the drive, and
have the imaging environment carve off space as needed, and have it
immediately available.

4) Learning.  Sure, LVM seems like a headache at first, but volume
management is a fairly neat concept, and one with which it is worth
familiarizing oneself.  There may be no clear benefit to LVM on the
standalone workstation, but once you play with it and learn how it works,
it will come in handy in the future.

And #4 is the kicker: LVM is quite stable, and has never given me any
troubles.  It's better to install with LVM and never need it than to install
without LVM and wind up wishing you had it.  It makes expanding local
storage a bit easier (albeit somewhat dangerously, a la RAID 0), and every
now and again makes otherwise complex tasks fairly straightforward.

It's also what pretty much every current distribution is using, meaning it's
harder to /not/ use LVM than it is to just accept the defaults.

In other words: though I rarely need LVM on my desktop, I generally install
it, anyhow.  And leave a chunk of unpartitioned space on the drive, just to
be safe.  After all, on a 250GB drive, it's going to be a while before I
hit the 100GB barrier, let alone actually need the whole drive.