All of lore.kernel.org
 help / color / mirror / Atom feed
* Question: lvmlockd adopts orphan locks
@ 2020-01-09  8:19 Leo Yan
  2020-01-13 17:15 ` David Teigland
  0 siblings, 1 reply; 2+ messages in thread
From: Leo Yan @ 2020-01-09  8:19 UTC (permalink / raw)
  To: lvm-devel

Hi all,

Since the commit 117160b27e51 ("Remove lvmetad") has been merged into
lvm2 git repository, lvmetad is removed.

As side effect, in lvmlockd the function get_lockd_vgs() returns -1.
Thus it's no chance for lvmlockd to adopt orphan locks after the
lvmlockd exits abnormal and relaunch.   If we connect with the sanlock
lock manager, its daemon keeps running on the host and renew all
locks, this would be safe for the in used LV on the host; but on the
other hand, lvmlockd cannot adopt the locks, thus we have no chance to
release related LVM locks anymore.

For this case, I understand we can release locks by directly use low
level sanlock commands, just wander if we have more smooth approach for
lvmlockd to adopt locks and release the locks gracefully after lvmlockd
failure?  Or do I miss anything?

Thanks,
Leo Yan




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

* Question: lvmlockd adopts orphan locks
  2020-01-09  8:19 Question: lvmlockd adopts orphan locks Leo Yan
@ 2020-01-13 17:15 ` David Teigland
  0 siblings, 0 replies; 2+ messages in thread
From: David Teigland @ 2020-01-13 17:15 UTC (permalink / raw)
  To: lvm-devel

On Thu, Jan 09, 2020 at 04:19:53PM +0800, Leo Yan wrote:
> Hi all,
> 
> Since the commit 117160b27e51 ("Remove lvmetad") has been merged into
> lvm2 git repository, lvmetad is removed.
> 
> As side effect, in lvmlockd the function get_lockd_vgs() returns -1.
> Thus it's no chance for lvmlockd to adopt orphan locks after the
> lvmlockd exits abnormal and relaunch.   If we connect with the sanlock
> lock manager, its daemon keeps running on the host and renew all
> locks, this would be safe for the in used LV on the host; but on the
> other hand, lvmlockd cannot adopt the locks, thus we have no chance to
> release related LVM locks anymore.
> 
> For this case, I understand we can release locks by directly use low
> level sanlock commands, just wander if we have more smooth approach for
> lvmlockd to adopt locks and release the locks gracefully after lvmlockd
> failure?  Or do I miss anything?

You are correct.  I have not yet replaced the lock-adoption code in
lvmlockd because it was not clear that anyone was using it.  I'm happy
to hear that it was useful for you, and sorry that it's been disabled.
I hope to have it replaced in the coming year, and would be happy to
help anyone interested in working on it.

Dave



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

end of thread, other threads:[~2020-01-13 17:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09  8:19 Question: lvmlockd adopts orphan locks Leo Yan
2020-01-13 17:15 ` David Teigland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.