linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Zhiyong Ye <yezhiyong@bytedance.com>
To: David Teigland <teigland@redhat.com>
Cc: damon.devops@gmail.com,
	LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] How to implement live migration of VMs in thinlv after using lvmlockd
Date: Wed, 2 Nov 2022 17:01:59 +0800	[thread overview]
Message-ID: <db994d2a-65e6-c0bf-aa21-d587b5a7de69@bytedance.com> (raw)
In-Reply-To: <20221101175756.GB11193@redhat.com>



在 11/2/22 1:57 AM, David Teigland 写道:
> On Wed, Nov 02, 2022 at 01:02:27AM +0800, Zhiyong Ye wrote:
>> Hi Dave,
>>
>> Thank you for your reply!
>>
>> Does this mean that there is no way to live migrate VMs when using lvmlockd?
> 
> You could by using linear LVs, ovirt does this using sanlock directly,
> since lvmlockd arrived later.
> 

Yes, standard LV is theoretically capable of live migration because it 
supports multiple hosts using the same LV concurrently with a shared 
lock (lvchange -asy). But I want to support the live migration feature 
for both LVs (thin LV and standard LV).

>> 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?
> 
> lvmlockd locking does not apply to the dm i/o layers.  The kind of
> multi-host locking that you seem to be talking about would need to be
> implemented inside dm-thin to protect on-disk data structures that it
> modifies.  In reality you would need to write a new dm target with locking
> and data structures designed for that kind of sharing.

I can try to write a new dm thin target or make some modifications based 
on the existing dm-thin target to support this feature, if it is 
technically feasible. But I'm curious why the current dm-thin doesn't 
support multi-host shared access, just like dm-linear does.

Regards!

Zhiyong

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

  parent reply	other threads:[~2022-11-03  7:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-01  5:36 [linux-lvm] How to implement live migration of VMs in thinlv after using lvmlockd Zhiyong Ye
2022-11-01 14:42 ` David Teigland
2022-11-01 17:02   ` Zhiyong Ye
2022-11-01 17:57     ` David Teigland
2022-11-01 18:15       ` Demi Marie Obenour
2022-11-02  9:18         ` Zhiyong Ye
2022-11-02  9:01       ` Zhiyong Ye [this message]
2022-11-01 18:08   ` Stuart D Gathman
2022-11-02  9:31     ` Zhiyong Ye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=db994d2a-65e6-c0bf-aa21-d587b5a7de69@bytedance.com \
    --to=yezhiyong@bytedance.com \
    --cc=damon.devops@gmail.com \
    --cc=linux-lvm@redhat.com \
    --cc=teigland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).