[CentOS] Booting Software RAID

Wed Jan 29 16:57:33 UTC 2014
Lists <lists at benjamindsmith.com>

On 01/29/2014 08:15 AM, Matt wrote:
> If I am putting both 4TB drives in a single RAID1 array for /vz would
> there be any advantage to using LVM on it?

My (sometimes unpopular) advice is to set up the partitions on servers 
into two categories:

1) OS
2) Data

OS partitions don't really grow much. Most of our servers' OS partitions 
total less than 10 GB of used space after years of 24x7 use. I recommend 
keeping things *very* *simple* here, avoid LVM. I use simple software 
RAID1 with bare partitions.

Data partitions, by definition, would be much more flexible. As your 
service becomes more popular, you can get caught in a double bind that 
can be very hard to escape: On one hand, you need to add capacity 
without causing downtime because people are *using* your service 
extensively, but on the other hand you can't easily handle a day or so 
to transfer TBs of data because people are *relying* on your service 
extensively. To handle these cases you need something that gives you the 
ability to add capacity without (much) downtime.

LVM can be very useful here, because you can add/upgrade storage without 
taking the system offline, and although there *is* some downtime when 
you have to grow the filesystem (EG when using Ext* file systems) it's 
pretty minimal.

So I would strongly recommend using something to manage large amounts of 
data with minimal downtime if/when that becomes a likely scenario.

Comparing LVM+XFS to ZFS, ZFS wins IMHO. You get all the benefits of LVM 
and the file system, along with the almost magical properties that you 
can get when you combine them into a single, integrated whole. Some of 
ZFS' data integrity features (See RAIDZ) are in "you can do that?" 
territory. The main downsides are the slightly higher risk that ZFS on 
Linux' "non-native" status can cause problems, though in my case, that's 
no worry since we'll be testing any updates carefully prior to roll out.

In any event, realize that any solution like this (LVM + XFS/Ext, ZFS, 
or BTRFS) will have a significant learning curve. Give yourself *time* 
to understand exactly what you're working with, and use that time 
carefully.