trying to decide whether to use LVM or not
matthias at blankertz.org
Sun May 6 07:37:28 UTC 2007
Eric S. Johansson wrote:
> Craig Hagerman wrote:
>> If you use LVM to span a couple disks (make a more than one 'appear'
>> as a single hard drive) then if you have a failure or other problem
>> with one disk you will likely lose everything - even the stuff on the
>> good disc. THAT was the killer for me.
> That's a really good gotcha. It's interesting how the different types of
> failure tug us in different directions. For example, the reconstruction time
> for a raid array implies that you want to have multiple small array so that if
> you lose one array, it's faster to rebuild. The same principle applies to
> filesystem checks. You want lots of small partitions to keep your fsck time
> down and narrow the region of damage should something fail. But with small
> partitions and raid arrays, you have inefficient storage allocation as a
> partition approaches full, one must either shift data to another partition or
> enlarge the partition.
> Logical volume management was designed to fix this problem to unify lots of
> small partitions and enable more efficient storage allocation. But as you point
> out, lose one partition, you lose the whole thing. Without any further counter
> evidence, I'm convinced that LVM isn't worth it even in a corporate environment
> (unless you're on a Sun or IBM platform). So I'll have one partition, 250 MB
> large, raid1 with a spare drive. I'll take a hit on rebuild time for raid1 and
> an fsck. If I need any small partitions, there's always a loopback device.
You could also use LVM on raid, which fixes the problem with disk
failures. That way you have the best of both worlds:
- The LVM physical volume is a raid device (for example /dev/md0), and
it fails only if and when the raid array fails (and if that happened,
you would loose all your data anyway.)
- With the LVM you can flexibly partition the raid array, add new
partitions without rebooting, resize filesystems and all the other nice
stuff LVM can do.
This is also described here:
More information about the ubuntu-users