diff options
author | David Teigland <teigland@redhat.com> | 2015-06-08 13:55:01 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2015-06-08 13:55:01 -0500 |
commit | 319a2e9381ddaab242be0a7d5a689789885c3e2a (patch) | |
tree | d9797ea0713519ad26a46ae697c7b97d61ea9a4e | |
parent | ac5c87e4686fc1c617175ec8d4854232f81ae9a0 (diff) | |
download | lvm2-319a2e9381ddaab242be0a7d5a689789885c3e2a.tar.gz |
vgchange --lock-start: improve error when lvmlockd not running
-rw-r--r-- | lib/locking/lvmlockd.c | 7 |
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"); |