[ClusterLabs] how to "switch on" cLVM ?
Ferenc Wágner
wferi at niif.hu
Tue Jun 7 21:52:38 UTC 2016
"Lentes, Bernd" <bernd.lentes at helmholtz-muenchen.de> writes:
> ----- On Jun 7, 2016, at 3:53 PM, Ferenc Wágner wferi at niif.hu wrote:
>
>> "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.
>
> So DLM and cLVM just takes care that the metadata is consistent.
> None of them controls any access to the LV itself ?
cLVM contols activation as well (besides metadata consistency), but does
not control access to activated LVs, which are cluster-unaware
device-mapper devices, just like under plain LVM.
>>> 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).
>
> Does the LV need to be a ressource (if i don't have a FS) ?
No. (If you use cLVM. If you don't use cLVM, then your VGs must be
resources, otherwise nothing guarrantees the consistency of their
metadata.)
> From what i understand from what you say the LV's are active on all
> hosts, and the ressource manager controls that a VM is just running on
> one host, so the LV is just used by one host. Right ? So it has not to
> be a ressource.
Right. (The LVs must be active on all hosts to enable free live
migration. There might be other solutions, because the LVs receive I/O
on one host only at any given time, but then you have to persuade your
hypervisor that the block device it wants will really be available once
migration is complete.)
--
Feri
More information about the Users
mailing list