[DRBD-user] is LVM cluster-aware?

Ross S. W. Walker rwalker at medallion.com
Fri Jan 25 19:10:58 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.


Tomasz Chmielewski wrote:
> 
> Is LVM cluster-aware? Of course it's not, but... Will I loose 
> data if I 
> have a LVM physical volume replicated on two machines with DRBD (two 
> primaries), and I want to access two separate logical volumes on 
> different machines?
> 
> 
> Machine_1
>           \            /--Logical_volume_1
>            DRBD-LVM2-PV
>           /            \--Logical_volume_2
> Machine_2
> 
> 
> On Machine_1 I only want to read/write to Logical_volume_1.
> On Machine_2 I only want to read/write to Logical_volume_2.
> 
> I don't want to add/remove/rename/resize/etc. any volumes - 
> just access 
> them on separate machines.
> 
> 
> Perhaps the answer is: yes, you will loose your data, but I 
> wanted to be 
> sure ;)
> 
> Are there any workarounds to that (with just two volumes it's 
> simple - 
> don't use LVM; but let's suppose there are many logical volumes)?

LVM by itself isn't cluster aware, but using either heartbeat or
Redhat cluster services it can be made to be.

The Redhat cluster services method is more reliable, but more
complex, but heartbeat can be made to work as well AFAIK by
marking a volume group or logical volume as unavailable (-an)
with [vg|lv]change, then using heartbeat to activate the logical
volume on the primary host for a resource with [vg|lv]change -aly,
which modifies the devmapper data only without modifying the
lvm metadata, so the other hosts in the heartbeat cluster still
still see the availability as 'n'. The 'e' (exclusive) option will
only work if the cluster is managed by 'cman' and if you have the
'clvmd' process running.

-Ross



______________________________________________________________________
This e-mail, and any attachments thereto, is intended only for use by
the addressee(s) named herein and may contain legally privileged
and/or confidential information. If you are not the intended recipient
of this e-mail, you are hereby notified that any dissemination,
distribution or copying of this e-mail, and any attachments thereto,
is strictly prohibited. If you have received this e-mail in error,
please immediately notify the sender and permanently delete the
original and any copy or printout thereof.




More information about the drbd-user mailing list