linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Damon Wang <damon.devops@gmail.com>
To: David Teigland <teigland@redhat.com>
Cc: linux-lvm@redhat.com
Subject: Re: [linux-lvm] [lvmlockd] Refresh lvmlockd leases after sanlock changes
Date: Wed, 7 Mar 2018 13:50:24 +0800	[thread overview]
Message-ID: <CABZYMH5UEDWhO30KiZ1xVe1z+S0pA4DR_yJ8TQ1sCYK48+0d9g@mail.gmail.com> (raw)
In-Reply-To: <20180305165926.GA20527@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1660 bytes --]

Hi Dave,

Thank you for your reply!

>
thin lv's from the same thin pool cannot be used from different hosts
> concurrently.  It's not because of lvm metadata, it's because of the way
> dm-thin manages blocks that are shared between thin lvs.  This block
> sharing/unsharing occurs as each read/write happens on the block device,
> not on LV activation or any lvm command.
>

My plan is one vm has one thin lv as root volume, and each thin lv get its
own
thin lv pool, Is this a way to avoid the problem of block share within thin
lv pool?

I suggest trying https://ovirt.org


I did some research on ovirt, there are two designs now
(https://github.com/oVirt/vdsm/blob/master/doc/thin-provisioning.md)
and I found it really relies on SPM host, once SPM host fails, all vms'
availability
will be influenced, which is we don't want to see.


> You need to release the lock on the source host after the vm is suspended,
> and acquire the lock on the destination host before the vm is resumed.
> There are hooks in libvirt to do this.  The LV shouldn't be active on both
> hosts at once.
>

 I did some experiments on this since I have read the libvirt migrate hook
page
(https://libvirt.org/hooks.html#qemu_migration) and it seems useless.
I wrote a simple script and confirm that the hook execute process is:

   1. on dest host, do "migrate begin", "prepare begin", "start begin",
   "started begin"
   2. after a while (usually a few seconds), on source host, do "stopped
   end" and
   "release end"

In a word, it not provide a way to do some thing on the time of vm suspend
and resume.🙁

Thanks!

Damon

[-- Attachment #2: Type: text/html, Size: 3414 bytes --]

  reply	other threads:[~2018-03-07  5:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-05  8:37 [linux-lvm] [lvmlockd] Refresh lvmlockd leases after sanlock changes Damon Wang
2018-03-05 16:59 ` David Teigland
2018-03-07  5:50   ` Damon Wang [this message]
2018-03-07  7:11     ` Damon Wang
2018-03-07  8:14   ` Damon Wang

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=CABZYMH5UEDWhO30KiZ1xVe1z+S0pA4DR_yJ8TQ1sCYK48+0d9g@mail.gmail.com \
    --to=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).