LVM Mirroring failure notification
mike at dev-zero.net
Tue May 12 11:18:04 MDT 2009
Aaron Toponce wrote:
> On Tue, May 12, 2009 at 02:46:23AM -0600, Mike Lovell wrote:
>> So I have a box that I want to use 6 drives with lvm on for xen virtual
>> machines with. While experimenting with things, I found that I can just
>> do a pv for each disk and then add -m1 to lvcreate to do a mirror. The
>> question I have is how can I make things automatically notify me by
>> email if one of the drives, that has parts of a mirror, fails? I am
>> liking using LVM mirroring in this situation but I it doesn't help me a
>> lot if I don't know when a drive fails. Thanks for any help.
> Wait, let me get this straight- you have 6 drives, and you're using RAID
> level 1 through LVM? You know what that means, right? You've just lost 5
> disks worth of space. Why not just give the 5 disks to me? I could put
> them to good use. :)
> Unless you need that extreme redundancy, I would suggest starting over
> using Linux software RAID beneath LVM. With 6 drives, I would do RAID
> level 6 with all active in the array. Then, you're utilizing a decent
> amount of disk space for your 6 drives, and should a drive fail, you'll
> deprecate to RAID 5, which works well.
> Just a thought.
I'm not trying to do a 6 drive raid 5. Doing a -m1 creates one copy of
the new LV. So in this case, I would lose the equivalent of half of the
storage space which would be the same as doing a RAID10.
The particular case I am looking at this for is for a VG for many Xen
virtual machines with each virtual machine having an LV. If I were to do
a RAID10 underneath LVM, IO access for a single virtual machine would
touch all 6 disks in the array. But if I just use LVM to also create a
single mirror, IO access for a virtual machine would only touch 2 of the
disks (technically 3 if you include the mirror_log). I don't need the
performance gains that doing the RAID0 part would give me and so I am
hoping to remove one layer. But I need to receive a notification when a
disk dies. I have used a RAID10 on a similar box and it worked okay but
an experimenting with something else. So does anyone know of a way to do
notifications if a PV in LVM dies?
More information about the PLUG