[linux-lvm] How to implement live migration of VMs in thinlv after using lvmlockd

Zhiyong Ye yezhiyong at bytedance.com
Tue Nov 1 17:02:27 UTC 2022

Hi Dave,

Thank you for your reply!

Does this mean that there is no way to live migrate VMs when using lvmlockd?

As you describe, the granularity of thinlv's sharing/unsharing is per 
read/write IO, except that lvmlockd reinforces this limitation for the 
lvm activation command.

Is it possible to modify the code of lvmlockd to break this limitation 
and let libvirt/qemu guarantee the mutual exclusivity of each read/write 
IO across hosts when live migration?



在 11/1/22 10:42 PM, David Teigland 写道:
> On Tue, Nov 01, 2022 at 01:36:17PM +0800, Zhiyong Ye wrote:
>> Hi all,
>> I want to implement live migration of VMs in the lvm + lvmlockd + sanlock
>> environment. There are multiple hosts in the cluster using the same iscsi
>> connection, and the VMs are running on this environment using thinlv
>> volumes. But if want to live migrate the vm, it will be difficult since
>> thinlv which from the same thin pool can only be exclusive active on one
>> host.
>> I found a previous subject that discussed this issue:
>> https://lore.kernel.org/all/20180305165926.GA20527@redhat.com/
> Hi, in that email I tried to point out that the real problem is not the
> locking, but rather the inability of dm-thin to share a thin pool among
> multiple hosts.  The locking restrictions just reflect that technical
> limitation.
> Dave

More information about the linux-lvm mailing list