Hi all, All calls to dlm_release_lockspace in clvmd-corosync.c use force=0. This may cause the problem when the node is the "lock master" of lockspace, the lockspace won't be release then, and there'll be no any error information from libdlm. Issues' found and analysied by Lars Marowsky-Bree and David Teigland. The patch tries to call dlm_release_lockspace with force = 1 in all cases. Please consider it for inclusion. Thanks.
Index: clvmd/clvmd-corosync.c =================================================================== --- clvmd.orig/clvmd-corosync.c 2009-03-10 16:47:15.000000000 +0800 +++ clvmd/clvmd-corosync.c 2009-04-01 10:10:37.000000000 +0800 @@ -334,7 +334,7 @@ if (err != CS_OK) { cpg_finalize(cpg_handle); quorum_finalize(quorum_handle); - dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 0); + dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 1); syslog(LOG_ERR, "Cannot join clvmd process group"); DEBUGLOG("Cannot join clvmd process group: %d\n", err); return cs_to_errno(err); @@ -345,7 +345,7 @@ if (err != CS_OK) { cpg_finalize(cpg_handle); quorum_finalize(quorum_handle); - dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 0); + dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 1); syslog(LOG_ERR, "Cannot get local node id\n"); return cs_to_errno(err); } @@ -361,7 +361,11 @@ DEBUGLOG("cluster_closedown\n"); unlock_all(); - dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 0); + /* The first node is the lock master. + Unless call dlm_release_lockspace with force=1, the node + master can't release the lockspace, and no error will + be returned by dlm_release_lockspace in this case. */ + dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 1); cpg_finalize(cpg_handle); quorum_finalize(quorum_handle); }
_______________________________________________ linux-lvm mailing list linux-lvm@redhat.com https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/