<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=Windows-1252">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6603.0">
<TITLE>RES: [DRBD-user] software RAID, LVM</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>
<P><FONT SIZE=2>Hi Nate,<BR>
-----Mensagem original-----<BR>
>De: drbd-user-bounces@lists.linbit.com em nome de Nate Reed<BR>
>Enviada: qui 2/2/2006 14:41<BR>
>Para: General Linux-HA mailing list<BR>
>Cc: drbd-user@lists.linbit.com<BR>
>Assunto: [DRBD-user] software RAID, LVM<BR>
><BR>
>Anyone have experience setting up DRBD on software RAID, possibly using LVM?<BR>
>I have never setup software RAID or LVM before, so I'm curious about how this<BR>
>is done.<BR>
<BR>
I had used DRBD to syncronize one software raid in one machine with other software raid in other machine. It just works. Linux software raid create one block device /dev/mdX, you should use this block device when configuring your DRBD<BR>
<BR>
>Right now we have hardware RAID 1, so all data is redundant, and a /shared<BR>
>partition that is replicated across the network using DRBD.<BR>
><BR>
>If we switch to Software RAID 1, would you have DRBD accessing a Linux RAID<BR>
>device or a logical volume?<BR>
Its not a good aproach to use DRBD with lvm, use DRBD with raid instead.<BR>
you can use lvm, but if one disk fail, your drbd device will go into trouble.<BR>
Lvm doenst support failures of internal devices.<BR>
Instead if you use RAID-5, RAID-10 or RAID-1 this wont happen. I recomend you to use a linux software raid,<BR>
<BR>
<BR>
>Can you even put DRBD on top of a volume, since<BR>
>the underlying device has to be a block device?<BR>
<BR>
Yes. every logical volume create one block device in /dev/<BR>
but see the last anwser.<BR>
<BR>
>Here's what I was thinking of doing on each machine:<BR>
><BR>
>disk 1<BR>
> - swap partition<BR>
> - / partition<BR>
> - Linux RAID partition<BR>
><BR>
>disk 2<BR>
> - Linux RAID partition<BR>
><BR>
>Then, create a RAID device out of the two Linux RAID partitions, then put >DRBD<BR>
>on top of this device<BR>
><BR>
<BR>
Good aproach. this is what i had done with success.<BR>
<BR>
>The other setup I was considering is:<BR>
><BR>
>disk 1<BR>
> - Linux RAID partition<BR>
><BR>
>disk 2<BR>
> - Linux RAID partition<BR>
><BR>
>Then, create a RAID device out of these partitions, and create logical<BR>
>volumes /, swap, /shared, etc. Then, have DRBD replicate one of these<BR>
>volumes.<BR>
if your volumes are compose of raid devices you bypass the lvm failure limitation.<BR>
<BR>
><BR>
>Finally, there is a 3rd option, but I'm not sure this makes any sense: as<BR>
>above, put logical volumes /, swap, /shared, etc., on the RAID device, and<BR>
>use DRBD to replicate the entire device to the other node. This doesn't make<BR>
>much sense since some data -- esp. swap -- should be local to each machine.<BR>
Doenst make sense :-D<BR>
><BR>
>So, what do you think?<BR>
><BR>
>1. Have DRBD replicate a logical volume (/shared). Is this possible? Is<BR>
>there a block device associated with a lv?<BR>
<BR>
Yes there is... if doenst have, you cant format it and use as a physical disk.<BR>
<BR>
>2. Have DRBD replicate a /shared partition on RAID, and keep swap and / on<BR>
>disk #1. Obvious downsides: no redundancy of swap and root, and wasted space<BR>
>on disk #2.<BR>
You will have to apply patchs to your system inicialization, to mount your DRBD partition before starting anything, i didnt done this yet, but believe its possible.<BR>
<BR>
<BR>
><BR>
>Am I missing some other approach?<BR>
><BR>
>Thanks,<BR>
>Nate<BR>
>_______________________________________________</FONT>
</P>
</BODY>
</HTML>