[linux-lvm] is LVM cluster-aware?

Bryn M. Reeves breeves at redhat.com
Thu Jan 24 17:29:46 UTC 2008

Hash: SHA1

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, and I
> want to access two separate logical volumes on different machines?

LVM2 supports clustering with several generations of Red Hat cluster
(RHEL4 cman, RHEL5 openais with dlm or gulm locking) via the clvmd
deamon. Once a volume group is marked as clustered & the infrastructure
is set up, the tools automatically lock and unlock LVM resources across
the cluster. This prevents a tool running on one node from interfering
with another tool running at the same time on a different node.

If you need it to work with another clustering environment you'll need
to make code changes - see the code in daemons/clvmd/ for the existing
cluster types.

> I don't want to add/remove/rename/resize/etc. any volumes - just access
> them on separate machines.

As long as you never try to update the LVM metadata from two nodes at
the same time (e.g. add/remove/rename/resize etc. running on two nodes
simultaneously) then this is fine, but there is no automatic prevention
of this situation.

If/when you do need to make changes, you'll want to make sure the VG you
are working with is only active on one node.

See various threads on this mailing list & linux-cluster for further
discussion of clvmd and using LVM in a clustered environment without it.


Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org


More information about the linux-lvm mailing list