[DRBD-user] Best way to use LVM with drbd

Rudolph Bott rb at megabit.net
Thu Feb 14 23:04:59 CET 2008

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


Harald Rinker schrieb:
> Hi @all
> 
> What is the best solution to use LVM with drbd
> 
> i think there are 2 possible way?s to do so
> 
> 1. drbd on top of lvm
I wouldn't recommend this - there's almost no point in this kind of 
setup because you loose all the flexibility of LVM and its dynamic 
logical volumes!

> 2. lvm on top of drbd
this is quite the way to go, but MAKE SURE (via /etc/lvm/lvm.conf or 
whatsoever) that LVM *only* scans the drbd devices under /dev/
Otherweise it might find the underlaying device (/dev/sdX or /dev/mdX 
etc.) and brake your whole setup!

If you need to extend your storage you can add another drbd device 
(maybe on top of another raid device or a new harddisk etc.) and add it 
to your LVM setup as a new physical volume. Then extend your volume 
group(s) to also use the new physical volume and you're done.

On top of that don't start LVM on the server which is currently the 
secondary - it won't be able to find the LVM metadata on the drbd volume 
because it is locked by the system. Which means if you fail over you 
have to restart LVM/re-run the checks on the new primary to make sure 
the system 'sees' all  of the volumes that have been 
added/changed/removed on the old primary before it went down.

Another point is that you can use snapshots of your logical volumes to 
create backups etc.
Having drbd ON TOP of lvm would mean that you could only create 
snapshots of logical volume(s) containing the drbd structures - which is 
quite pointless in my eyes...

> 
> what is the preferred?
> 
> regards
> Harald Rinker
> 
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user
> 
> 



Mit freundlichen Grüßen / with kind regards

Rudolph Bott
-- 
Megabit Informationstechnik GmbH
Karstr.25  41068 Moenchengladbach  Tel:02161/30898-0  Fax:-18
AG MG HRB 10141, GF: Dipl.-Ing. Thomas Tillig, Michael Benten



More information about the drbd-user mailing list