[ClusterLabs] how to "switch on" cLVM ?

Ferenc Wágner wferi at niif.hu
Tue Jun 7 13:53:53 UTC 2016


"Lentes, Bernd" <bernd.lentes at helmholtz-muenchen.de> writes:

> Ok. Does DLM takes care that a LV just can be used on one host ?

No.  Even plain LVM uses locks to serialize access to its metadata
(avoid concurrent writes corrupting it).  These locks are provided by
the host kernel (locking_type=1).  DLM extends the locking concept to a
full cluster from a single host, which is exactly what cLVM needs.  This
is activated by locking_type=3.

> cLVM just takes care that the naming is the same on all nodes, right?

More than that.  As above, it keeps the LVM metadata consistent amongst
the members of the cluster.  It can also activate LVs on all members
("global" activation), or ensure that an LV is active on a single member
only ("exclusive" activation).

>>> Later on it's possible that some vm's run on host 1 and some on host 2. Does
>>> clvm needs to be a ressource managed by the cluster manager?

The clvm daemon can be handled as a cloned cluster resource, but it
isn't necessary.  It requires corosync (or some other membership/
communication layer) and DLM to work.  DLM can be configured to do its
own fencing or to use that of Pacemaker (if present).

>>> If i use a fs inside the lv, a "normal" fs like ext3 is sufficient, i think. But
>>> it has to be a cluster ressource, right ?

If your filesystem is a plain cluster resource, then your resource
manager will ensure that it isn't mounted on more than one node, and
everything should be all right.

Same with VMs on LVs: assuming no LV is used by two VMs (which would
bring back the previous problem on another level) and your VMs are
non-clone cluster resources, your resource manager will ensure that each
LV is used by a single VM only (on whichever host), and everything
should be all right, even though your LVs are active on all hosts (which
makes live migration possible, if your resource agent supports that).
-- 
Feri




More information about the Users mailing list