AW: [DRBD-user] Choosing right combination of md-raid, LVM and DRBD

Kelly Byrd kbyrd-drbd at memcpy.com
Fri Sep 28 14:16:26 CEST 2007

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.



> Because it is a system, that can be offline while we are on work for
about
> 1
> hour, i don't think we will really need LVM, i am sure to be able to
> re-setup partitions in this time. Another point is, that this system
> doesn't
> need that much of disk-space, i will only use about 1/3, so i have 2/3 of
> free space for future partitioning.

LVM is often cited for this exact case: ease of future partitioning and
adding to volum


> 
> For speedup i thought about making the root and data-partitions on
md-raid
> 0, because the DRBD will do the mirroring, if one disk fails...? IS that
a
> bad idea?
>

Are the machines active/passive? If so, you can't boot the second one while

the first one is primary. So you would have two drbds, each
primary/secondary,
each mounted as '/' on one machine? Otherwise you're talking about a single
drbd
using primary/primary and a clustering filesystem for '/', and unless
you're doing
a big cluster, I'd say that's adding complexity. I like to keep '/' as
simple
as possible. Wow, I totally lied. I'm currently using 'md' to do raid10 on
'/'


I would make a small '/' partition on each drive, raid1 those. Make a small
swap (however much you need) on each drive. raid1 those. Maybe I'm
paranoid,
but I believe in mirroring swap to keep a box alive.

Booting from raid1 is easy. When you setup grup/lilo, be sure to 'install'
on
each drive and mark each partition as bootable. 


How much you need for '/' depends on what you need in your OS. 2GB is
usually
tons of speace, especially if you don't install X and GNOME/KDE (my biggest
use
of space on a mininmal CentOS is the locales directory).

The rest of the disk can be one big partition, which you can then raid0.
Then
run a drbd on top of that. giving you raid01. Many people (Lars) on this
list
suggest that you should have local reliable storage under drbd. That's your
call. 

> 
> Perhaps it doesn't make sense, because the overlaying drbd via
> GB-interfaces
> is so slow, that the raid 0-speedup is never used and i can take raid 1
> without any impact on speed?

If you do use raid0 under drbd, reads are always local at raid0 speed,
until
a drive fails, then the reads and writes are remote.

> 
> And basically, is it better to make the raid 1 via LVM instead of md-raid
> to
> reduce the overhead? THAN i would use only LVM without md-raid...?
> 

I recently asked this exact question about md vs. LVM raid0 on the LVM
list.
I didn't get a definitive answer. If I didn't need LVM for partitioing
reasons,
I wouldn't use it in place of md. Because I do need logical volumes, I
figure
kicking md out of the stack is one less layer to manage and have go wrong.








More information about the drbd-user mailing list