[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Advice on raid/lvm



On Wed, 08 Apr 2009, Miles Fidelman wrote:
> One suggestion: think very carefully about whether you really want to do  
> this.

I second that.  It is really not smart to have / (or /boot) in LVM if you
can help it.

I suggest that a small (1GB-4GB) partition for simple md-raid1 be used for
/ instead.  That won't give you any headaches, including on disaster
recovery scenarios.

> I'm currently in my third day of rebuilding a machine that had /boot and  
> / on an LVM volume on raided disks.  After one drive died, I ended up in  
> a weird mode where LVM was mounting one of the component drives, rather  
> than the raid volume - with the long result being that I'm reinstalling  
> the o/s from scratch and hoping that my backups are good enough that I  
> haven't lost any user data.

If you forget to have THIS on lvm.conf when using software raid:

    filter = [ "a|/md|", "r/.*/" ]

(or any other combination that makes sure lvm won't ever touch the md
component devices)

and lvm manages to put its filthy hands on one of the md component devices
(e.g.  because the raid didn't come up yet, or it was degraded and lvm
found the component device first), you're screwed.

Oh, and that needs to go inside the initrd as well, if you have / in lvm.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


Reply to: