linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* Re: [linux-lvm] LVM snapshot with Clustered VG [SOLVED]
@ 2013-03-15 16:31 David Teigland
  2013-03-15 17:46 ` Vladislav Bogdanov
  0 siblings, 1 reply; 20+ messages in thread
From: David Teigland @ 2013-03-15 16:31 UTC (permalink / raw)
  To: linux-lvm; +Cc: Vladislav Bogdanov, Andreas Pflug

> I need to convert lock on a remote node during last stage of ver3
> migration in libvirt/qemu

Hi, I wrote and maintain the dlm and have more recently written a new
disk-based lock manager called sanlock, https://fedorahosted.org/sanlock/
which operates with only shared storage among nodes (no networking or
other cluster manager.)

sanlock was written to allow RHEV to manage leases for vm images on shared
storage, including the ability to migrate leases among hosts (which is the
most complicated part, as you've mentioned above.)  sanlock plugs into the
libvirt locking api, which also supports file locks (usable on local or
nfs file systems.)  (Search for "virtlockd".)

Trying to use/control vm locks via lvm commands is not a good way to solve
the vm management/migration problem at the present time (but see below).
Instead, I'd suggest doing the locking via the libvirt locking api which
was designed for this purpose.  As I mentioned, libvirt supports both
sanlock and file locks, but another option is to write a new libvirt
locking plug-in for dlm/corosync.  This would be the best way to use dlm
locks to protect vm images on shared storage; I've been hoping someone
would do this for some time.

Incidentally, I've recently started a new project which is to replace
clvmd with a new "lvmlockd".  I'm designing lvmlockd to support both dlm
and sanlock on the back side (transparent to lvm itself).  With sanlock,
you will not need a dlm/corosync cluster to have the benefits of locking
vgs and lvs on shared storage.  This project is requiring a lot of
preliminary work in the lvm code, because the clvmd approach reaches
deeply into lvm itself.  Relating back to virt environments, lvmlockd will
give you direct control of the lock types, modes and objects in each
command.  This will hopefully make it much easier to use lvm locks in a
controlled and programatic way to solve problems like vm management.

So, in preparation for lvmlockd, you should not assume that lvm commands
will operate in a dlm/corosync environment.  Any new options or
capabilities should be considered more generally.  Also, the concept of
lvm commands executing remote operations in a cluster was a poor design
choice for clvm.  lvmlockd will probably not support this notion.
Executing remote commands should be done at a higher layer.

Dave

^ permalink raw reply	[flat|nested] 20+ messages in thread
* Re: [linux-lvm] LVM snapshot with Clustered VG
@ 2013-03-01 11:28 Andreas Pflug
  2013-03-01 15:41 ` Vladislav Bogdanov
  0 siblings, 1 reply; 20+ messages in thread
From: Andreas Pflug @ 2013-03-01 11:28 UTC (permalink / raw)
  To: LVM general discussion and development, bubble

Hi Vladislav,

I tried the patch you mentioned in 
https://www.redhat.com/archives/linux-lvm/2013-January/msg00006.html , 
but apparently it doesn't work for me. On a locally active LV, I still get

./lvm lvchange -aey -vvvv vg/locktest

...
Activating logical volume "locktest" exclusively
#activate/dev_manager.c:284         Getting device info for vg-locktest 
[LVM-oW2W7O2cgWRLUhoVR8qqqQY7wlcYexmWU8y83bGQz9IcnXh3GfXslBN6ziZrC3BN]
#ioctl/libdm-iface.c:1724         dm info 
LVM-oW2W7O2cgWRLUhoVR8qqqQY7wlcYexmWU8y83bGQz9IcnXh3GfXslBN6ziZrC3BN 
NF   [16384] (*1)
#locking/cluster_locking.c:568         Lock held for 
oW2W7O2cgWRLUhoVR8qqqQY7wlcYexmWU8y83bGQz9IcnXh3GfXslBN6ziZrC3BN, node 
7400a8c0 : CR
#activate/activate.c:1067       vg/locktest is active
#locking/cluster_locking.c:508       Locking LV 
oW2W7O2cgWRLUhoVR8qqqQY7wlcYexmWU8y83bGQz9IcnXh3GfXslBN6ziZrC3BN EX 
(LV|NONBLOCK|CLUSTER|LOCAL) (0xdd)
#locking/cluster_locking.c:395   Error locking on node 7400a8c0: Device 
or resource busy

Can you give me a hint what to try further?

Regards
Andreas

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2013-03-16 11:00 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-15 16:31 [linux-lvm] LVM snapshot with Clustered VG [SOLVED] David Teigland
2013-03-15 17:46 ` Vladislav Bogdanov
2013-03-15 18:38   ` David Teigland
2013-03-16 11:00     ` Vladislav Bogdanov
  -- strict thread matches above, loose matches on Subject: below --
2013-03-01 11:28 [linux-lvm] LVM snapshot with Clustered VG Andreas Pflug
2013-03-01 15:41 ` Vladislav Bogdanov
2013-03-06  7:40   ` Andreas Pflug
2013-03-06  7:58     ` Vladislav Bogdanov
2013-03-06  9:15       ` Andreas Pflug
2013-03-06  9:35         ` Vladislav Bogdanov
2013-03-06  9:59           ` Andreas Pflug
2013-03-06 11:20             ` Vladislav Bogdanov
2013-03-06 12:17               ` Andreas Pflug
2013-03-06 13:28                 ` Vladislav Bogdanov
2013-03-13 15:14                   ` [linux-lvm] LVM snapshot with Clustered VG [SOLVED] Andreas Pflug
2013-03-13 16:53                     ` Vladislav Bogdanov
2013-03-13 17:37                       ` Andreas Pflug
2013-03-13 18:30                         ` Vladislav Bogdanov
2013-03-14 21:57                           ` Andreas Pflug
2013-03-15  9:00                             ` Zdenek Kabelac
2013-03-15  9:29                               ` Vladislav Bogdanov
2013-03-15  9:37                                 ` Zdenek Kabelac
2013-03-15 12:53                                   ` Vladislav Bogdanov
2013-03-15 13:11                                     ` Vladislav Bogdanov
2013-03-15 13:32                                     ` Zdenek Kabelac
2013-03-15 14:51                                       ` Vladislav Bogdanov
2013-03-15 15:02                                         ` Zdenek Kabelac
2013-03-15 15:36                                           ` Vladislav Bogdanov
2013-03-15 15:55                                             ` Zdenek Kabelac
2013-03-15 17:16                                               ` Vladislav Bogdanov

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).