summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2015-06-08 13:55:01 -0500
committerDavid Teigland <teigland@redhat.com>2015-06-15 16:50:56 -0500
commitd1ec078030da3461a4c2ddb0b253ef470b03a58f (patch)
treee91ad3d3c204fa4f6a83b366d5474ed3d521c892
parentbba5035433963640003a2e3c67822894b5476ea7 (diff)
downloadlvm2-d1ec078030da3461a4c2ddb0b253ef470b03a58f.tar.gz
vgchange --lock-start: improve error when lvmlockd not running
-rw-r--r--lib/locking/lvmlockd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/locking/lvmlockd.c b/lib/locking/lvmlockd.c
index 85e002db5..fb5532eac 100644
--- a/lib/locking/lvmlockd.c
+++ b/lib/locking/lvmlockd.c
@@ -845,8 +845,6 @@ int lockd_start_vg(struct cmd_context *cmd, struct volume_group *vg)
if (!_use_lvmlockd)
return 1;
- if (!_lvmlockd_connected)
- return 0;
/* Skip starting the vg lockspace when the vg lock is skipped. */
@@ -856,6 +854,11 @@ int lockd_start_vg(struct cmd_context *cmd, struct volume_group *vg)
if (!is_lockd_type(vg->lock_type))
return 1;
+ if (!_lvmlockd_connected) {
+ log_error("VG %s start failed: lvmlockd not running", vg->name);
+ return 0;
+ }
+
log_debug("lockd_start_vg %s lock_type %s", vg->name,
vg->lock_type ? vg->lock_type : "empty");