[lvm-devel] lvmlockd: adopt locks always failed
Eric Ren
zren at suse.com
Mon Aug 7 07:23:46 UTC 2017
Hi David!
I'm testing "dlm + lvmlockd". Everything goes well so far, until I try
the steps:
1. do everything to have a LV active on a shared VGs successfully;
2. kill lvmlockd on purpose;
3. restart lvmlockd with "--adopt 1".
Every time I get:
"""
Aug 07 13:09:14 tw1 lvmlockd[27299]: 1502082554 lvmlockd started
Aug 07 13:09:14 tw1 lvmlockd[27299]: 1502082554 adopt_locks failed,
reset host
"""
After some debugging, I narrow down it here:
1.
adopt_locks()
{
...
if (lm_support_dlm()) {
rv = lm_get_lockspaces_dlm(&ls_found); ====> OK.
if ((rv < 0) && (rv != -ECONNREFUSED))
goto fail;
}
if (lm_support_sanlock()) {
rv = lm_get_lockspaces_sanlock(&ls_found); ====>
rv gets -2
if ((rv < 0) && (rv != -ECONNREFUSED))
goto fail;
}
...
}
2.
sanlock_get_lockspaces()
{
...
rv = connect_socket(&fd);
if (rv < 0)
return rv; ===> it return -2, because
sanlock plugin is not running
...
}
The problem here seems we should not ask sanlock for left lockspaces
when it's not running?
Thanks in advance!
Eric
More information about the lvm-devel
mailing list