diff options
author | David Teigland <teigland@redhat.com> | 2015-06-08 13:55:01 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2015-06-23 17:08:53 -0500 |
commit | 92077ba3ef336fcfbc56c2f386092a02f45027a7 (patch) | |
tree | 110f58d357a96ff6a4145fea478d4fbbfc036a64 | |
parent | ab0b6e263f720c426802abcc58fd8f5d6f76a2a6 (diff) | |
download | lvm2-92077ba3ef336fcfbc56c2f386092a02f45027a7.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"); |