Version 2.02.82 -
===================================
Add -f (don't fork) option to clvmd and fix clvmd -d<num> description.
+ Fix possible clvmd DLM lockspace increasing reference count.
Version 2.02.81 - 17th January 2011
===================================
DEBUGLOG("CMAN initialisation complete\n");
/* Create a lockspace for LV & VG locks to live in */
- lockspace = dlm_create_lockspace(LOCKSPACE_NAME, 0600);
+ lockspace = dlm_open_lockspace(LOCKSPACE_NAME);
if (!lockspace) {
- if (errno == EEXIST) {
- lockspace = dlm_open_lockspace(LOCKSPACE_NAME);
- }
+ lockspace = dlm_create_lockspace(LOCKSPACE_NAME, 0600);
if (!lockspace) {
- syslog(LOG_ERR, "Unable to create lockspace for CLVM: %m");
+ syslog(LOG_ERR, "Unable to create DLM lockspace for CLVM: %m");
return -1;
}
- }
+ DEBUGLOG("Created DLM lockspace for CLVMD.\n");
+ } else
+ DEBUGLOG("Opened existing DLM lockspace for CLVMD.\n");
+
dlm_ls_pthread_init(lockspace);
DEBUGLOG("DLM initialisation complete\n");
return 0;
break;
case CLVMD_CMD_RESTART:
- restart_clvmd();
+ status = restart_clvmd();
break;
case CLVMD_CMD_GET_CLUSTERNAME:
dm_snprintf(debug_arg, 16, "-d%d", (int)clvmd_get_debug()) < 0)
goto_out;
argv[argc++] = debug_arg;
+ debug_arg = NULL;
}
+ /*
+ * FIXME: specify used cluster backend
+ * argv[argc++] = strdup("-Isinglenode");
+ */
+
/* Now add the exclusively-open LVs */
do {
hn = get_next_excl_lock(hn, &lv_name);
argv[argc++] = NULL;
/* Exec new clvmd */
+ DEBUGLOG("--- Restarting %s ---\n", CLVMD_PATH);
/* NOTE: This will fail when downgrading! */
execve(CLVMD_PATH, argv, NULL);
out:
free(argv);
free(debug_arg);
- return 0;
+ return EIO;
}
return cs_to_errno(err);
}
-
/* Create a lockspace for LV & VG locks to live in */
- lockspace = dlm_create_lockspace(LOCKSPACE_NAME, 0600);
+ lockspace = dlm_open_lockspace(LOCKSPACE_NAME);
if (!lockspace) {
- if (errno == EEXIST) {
- lockspace = dlm_open_lockspace(LOCKSPACE_NAME);
- }
+ lockspace = dlm_create_lockspace(LOCKSPACE_NAME, 0600);
if (!lockspace) {
- syslog(LOG_ERR, "Unable to create lockspace for CLVM: %m");
- quorum_finalize(quorum_handle);
+ syslog(LOG_ERR, "Unable to create DLM lockspace for CLVM: %m");
return -1;
}
- }
+ DEBUGLOG("Created DLM lockspace for CLVMD.\n");
+ } else
+ DEBUGLOG("Opened existing DLM lockspace for CLVMD.\n");
+
dlm_ls_pthread_init(lockspace);
DEBUGLOG("DLM initialisation complete\n");