linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] resize and snapshots with clvm
@ 2013-02-19 13:37 Andreas Pflug
  2013-02-19 13:59 ` Jacek Konieczny
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Pflug @ 2013-02-19 13:37 UTC (permalink / raw)
  To: linux-lvm

I'm using clvm over corosync, sharing iscsi hosted PVs. I'm generally 
using Debian squeeze/wheezy, lvm2 2.2.95.

What I'm missing is the possibility to resize a LV or taking a snapshot 
of it while a volume is used on one node. I'd expect this to work on the 
active node, if the volume is inactive on all other nodes. But when I 
try that, I get
cluster request failed: Invalid argument
   Failed to suspend <logvol>

I've seen the message 
https://www.redhat.com/archives/linux-lvm/2013-January/msg00006.html ,
Compiled 2.2.98 with the patch applied 
(--with-clvmd=cman,corosync,openais --with-cluster=internal), no further 
success.
What can I do?

Regards,
Andreas

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

* Re: [linux-lvm] resize and snapshots with clvm
  2013-02-19 13:37 [linux-lvm] resize and snapshots with clvm Andreas Pflug
@ 2013-02-19 13:59 ` Jacek Konieczny
  2013-02-20 13:18   ` Andreas Pflug
  0 siblings, 1 reply; 5+ messages in thread
From: Jacek Konieczny @ 2013-02-19 13:59 UTC (permalink / raw)
  To: linux-lvm

On Tue, 19 Feb 2013 14:37:07 +0100
Andreas Pflug <pgadmin@pse-consulting.de> wrote:
> 
> What I'm missing is the possibility to resize a LV or taking a
> snapshot of it while a volume is used on one node. I'd expect this to
> work on the active node, if the volume is inactive on all other
> nodes.

I can confirm this works.

> But when I try that, I get
> cluster request failed: Invalid argument
>    Failed to suspend <logvol>

Are you sure you have the volume activated _exclusively_ on the single
node.
'is used on one node' doesn't mean much when any other node is allowed
to activate the volume at any time.

When the LV is exclusively activated (lvchange -aey) snapshots should
work (and they do work for me).

Greets,
	Jacek

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

* Re: [linux-lvm] resize and snapshots with clvm
  2013-02-19 13:59 ` Jacek Konieczny
@ 2013-02-20 13:18   ` Andreas Pflug
  2013-02-20 13:30     ` Jacek Konieczny
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Pflug @ 2013-02-20 13:18 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Jacek Konieczny

Am 19.02.13 14:59, schrieb Jacek Konieczny:
> On Tue, 19 Feb 2013 14:37:07 +0100
> Andreas Pflug <pgadmin@pse-consulting.de> wrote:
>> What I'm missing is the possibility to resize a LV or taking a
>> snapshot of it while a volume is used on one node. I'd expect this to
>> work on the active node, if the volume is inactive on all other
>> nodes.
> I can confirm this works.
>
>> But when I try that, I get
>> cluster request failed: Invalid argument
>>     Failed to suspend <logvol>
> Are you sure you have the volume activated _exclusively_ on the single
> node.
> 'is used on one node' doesn't mean much when any other node is allowed
> to activate the volume at any time.

I would have expected lvm to take that exclusive lock implicitely when 
necessary?

>
> When the LV is exclusively activated (lvchange -aey) snapshots should
> work (and they do work for me).

The volume is "lvchange -aly" active on one node and in use there (e.g. 
mounted or attached to a VM). If I try to lvchange -aey on that node, I 
get "Error locking on node xxxx: Device or resource busy". Apparently 
the problem is propagating the activation to exclusive if the device is 
busy.
Actually, lock exclusive will even fail if the device is not in use, but 
only active locally.

A workaround would probably be to activate the lv exclusively _before_ 
using it, but then it would be impossible to migrate the vm to another 
host later on.

Regards
Andreas

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

* Re: [linux-lvm] resize and snapshots with clvm
  2013-02-20 13:18   ` Andreas Pflug
@ 2013-02-20 13:30     ` Jacek Konieczny
  2013-02-20 15:41       ` Andreas Pflug
  0 siblings, 1 reply; 5+ messages in thread
From: Jacek Konieczny @ 2013-02-20 13:30 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: pgadmin

On Wed, 20 Feb 2013 14:18:23 +0100
Andreas Pflug <pgadmin@pse-consulting.de> wrote:
> I would have expected lvm to take that exclusive lock implicitely
> when necessary?

I would not expect that. LVM provides means to activate in a shared or
exclusive way, but it does not choose itself.

> > When the LV is exclusively activated (lvchange -aey) snapshots
> > should work (and they do work for me).
> 
> The volume is "lvchange -aly" active on one node and in use there
> (e.g. mounted or attached to a VM). If I try to lvchange -aey on that
> node, I get "Error locking on node xxxx: Device or resource busy".

I do not use '-aly' (in fact I am not sure what it does), so I cannot
relate.

> Actually, lock exclusive will even fail if the device is not in use,
> but only active locally.
> 
> A workaround would probably be to activate the lv exclusively
> _before_ using it, but then it would be impossible to migrate the vm
> to another host later on.

I use clustered LVM for my VMs too and always use "-aey" locking mode –
each volume can be active on a single cluster node a time. When doing VM
migration I first deactivate the volume on one host, then activate
it (exclusively) on the other. I feel safer knowing none of the volumes
will ever be active on more than one host.

Is your scenario much different?

Greets,
	Jacek

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

* Re: [linux-lvm] resize and snapshots with clvm
  2013-02-20 13:30     ` Jacek Konieczny
@ 2013-02-20 15:41       ` Andreas Pflug
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Pflug @ 2013-02-20 15:41 UTC (permalink / raw)
  To: Jacek Konieczny; +Cc: LVM general discussion and development

Am 20.02.13 14:30, schrieb Jacek Konieczny:
> On Wed, 20 Feb 2013 14:18:23 +0100
> Andreas Pflug <pgadmin@pse-consulting.de> wrote:
>> I would have expected lvm to take that exclusive lock implicitely
>> when necessary?
> I would not expect that. LVM provides means to activate in a shared or
> exclusive way, but it does not choose itself.

I could live with that if it would be possible to elevate a LV from 
normal active to exclusive manually, but that seems not possible ATM.
Actually I guess that lvm _does_ perform the exclusive lock implicitely, 
if it can (i.e. lv inactive on all nodes)

>
>>> When the LV is exclusively activated (lvchange -aey) snapshots
>>> should work (and they do work for me).
>> The volume is "lvchange -aly" active on one node and in use there
>> (e.g. mounted or attached to a VM). If I try to lvchange -aey on that
>> node, I get "Error locking on node xxxx: Device or resource busy".
> I do not use '-aly' (in fact I am not sure what it does), so I cannot
> relate.
It activates only on the local node; other nodes might enable as well if 
necessary.
>
>> Actually, lock exclusive will even fail if the device is not in use,
>> but only active locally.
>>
>> A workaround would probably be to activate the lv exclusively
>> _before_ using it, but then it would be impossible to migrate the vm
>> to another host later on.
> I use clustered LVM for my VMs too and always use "-aey" locking mode –
> each volume can be active on a single cluster node a time. When doing VM
> migration I first deactivate the volume on one host, then activate
> it (exclusively) on the other. I feel safer knowing none of the volumes
> will ever be active on more than one host.
>
> Is your scenario much different?

You're obviously doing offline migration. While migrating live, there's 
a period with two nodes needing the volume being active. Thus exclusive 
locking would prevent live migration.

Regards
Andreas

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

end of thread, other threads:[~2013-02-20 15:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-19 13:37 [linux-lvm] resize and snapshots with clvm Andreas Pflug
2013-02-19 13:59 ` Jacek Konieczny
2013-02-20 13:18   ` Andreas Pflug
2013-02-20 13:30     ` Jacek Konieczny
2013-02-20 15:41       ` Andreas Pflug

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