mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
vgreduce: fix location of lvmlockd global lock
The lvmlockd global lock was missing the non-repair case, which caused the new orphan PV created by vgreduce to not be seen by other hosts.
This commit is contained in:
parent
899a4ca275
commit
029f51e1a8
@ -217,6 +217,11 @@ int vgreduce(struct cmd_context *cmd, int argc, char **argv)
|
||||
argv++;
|
||||
argc--;
|
||||
|
||||
/* Needed to change the set of orphan PVs. */
|
||||
if (!lockd_gl(cmd, "ex", 0))
|
||||
return_ECMD_FAILED;
|
||||
cmd->lockd_gl_disable = 1;
|
||||
|
||||
if (!(handle = init_processing_handle(cmd))) {
|
||||
log_error("Failed to initialize processing handle.");
|
||||
return ECMD_FAILED;
|
||||
@ -236,13 +241,6 @@ int vgreduce(struct cmd_context *cmd, int argc, char **argv)
|
||||
|
||||
vp.force = arg_count(cmd, force_ARG);
|
||||
|
||||
/* Needed to change the set of orphan PVs. */
|
||||
if (!lockd_gl(cmd, "ex", 0)) {
|
||||
ret = ECMD_FAILED;
|
||||
goto_out;
|
||||
}
|
||||
cmd->lockd_gl_disable = 1;
|
||||
|
||||
cmd->handles_missing_pvs = 1;
|
||||
|
||||
init_ignore_suspended_devices(1);
|
||||
|
Loading…
Reference in New Issue
Block a user