1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: commit c0f9c79 to work also with for non-clustered configuration

This commit is contained in:
Peter Rajnoha 2014-06-06 10:17:26 +02:00
parent c0f9c79ae8
commit 291e55557e

View File

@ -304,6 +304,7 @@ static int _vgchange_clustered(struct cmd_context *cmd,
struct volume_group *vg)
{
int clustered = !strcmp(arg_str_value(cmd, clustered_ARG, "n"), "y");
int clvmd_daemon_running = 0;
if (clustered && (vg_is_clustered(vg))) {
log_error("Volume group \"%s\" is already clustered",
@ -318,7 +319,10 @@ static int _vgchange_clustered(struct cmd_context *cmd,
}
if (clustered && !arg_count(cmd, yes_ARG)) {
if (!dm_daemon_is_running(CLVMD_PIDFILE)) {
#ifdef CLVMD_PIDFILE
clvmd_daemon_running = dm_daemon_is_running(CLVMD_PIDFILE);
#endif
if (!clvmd_daemon_running) {
if (yes_no_prompt("LVM cluster daemon (clvmd) is not"
" running.\n"
"Make volume group \"%s\" clustered"