[Linux-HA] RES: [DRBD-user] software RAID, LVM

Leonardo Rodrigues de Mello Leonardo.Mello at planejamento.gov.br
Thu Feb 2 10:54:00 MST 2006


Hi Nate,
-----Mensagem original-----
>De:    drbd-user-bounces at lists.linbit.com em nome de Nate Reed
>Enviada:       qui 2/2/2006 14:41
>Para:  General Linux-HA mailing list
>Cc:    drbd-user at lists.linbit.com
>Assunto:       [DRBD-user] software RAID, LVM
>
>Anyone have experience setting up DRBD on software RAID, possibly using LVM? 
>I have never setup software RAID or LVM before, so I'm curious about how this
>is done.

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

>Right now we have hardware RAID 1, so all data is redundant, and a /shared
>partition that is replicated across the network using DRBD. 
>
>If we switch to Software RAID 1, would you have DRBD accessing a Linux RAID
>device or a logical volume? 
Its not a good aproach to use DRBD with lvm, use DRBD with raid instead.
you can use lvm, but if one disk fail, your drbd device will go into trouble.
Lvm doenst support failures of internal devices.
Instead if you use RAID-5, RAID-10 or RAID-1 this wont happen. I recomend you to use a linux software raid,


>Can you even put DRBD on top of a volume, since
>the underlying device has to be a block device? 

Yes. every logical volume create one block device in /dev/
but see the last anwser.

>Here's what I was thinking of doing on each machine:
>
>disk 1
>  - swap partition
>  - / partition
>  - Linux RAID partition
> 
>disk 2
>  - Linux RAID partition
>
>Then, create a RAID device out of the two Linux RAID partitions, then put >DRBD
>on top of this device 
>

Good aproach. this is what i had done with success.

>The other setup I was considering is:
>
>disk 1
>  - Linux RAID partition
>
>disk 2
>  - Linux RAID partition
>
>Then, create a RAID device out of these partitions, and create logical
>volumes /, swap, /shared, etc.  Then, have DRBD replicate one of these
>volumes.
if your volumes are compose of raid devices you bypass the lvm failure limitation.

>
>Finally, there is a 3rd option, but I'm not sure this makes any sense: as
>above, put logical volumes /, swap, /shared, etc., on the RAID device, and
>use DRBD to replicate the entire device to the other node.  This doesn't make
>much sense since some data -- esp. swap -- should be local to each machine. 
Doenst make sense :-D
>
>So, what do you think?
>
>1. Have DRBD replicate a logical volume (/shared).  Is this possible?  Is
>there a block device associated with a lv?

Yes there is... if doenst have, you cant format it and use as a physical disk.

>2. Have DRBD replicate a /shared partition on RAID, and keep swap and / on
>disk #1.  Obvious downsides: no redundancy of swap and root, and wasted space
>on disk #2.
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.


>
>Am I missing some other approach?
>
>Thanks,
>Nate
>_______________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux-ha.org/pipermail/linux-ha/attachments/20060202/60b04688/attachment.html>


More information about the Linux-HA mailing list