diff options
author | Ondrej Kozina <okozina@redhat.com> | 2015-05-15 17:06:14 +0200 |
---|---|---|
committer | Ondrej Kozina <okozina@redhat.com> | 2015-05-15 20:33:21 +0200 |
commit | 04c77bd8863b071b9e376c76708af6cede596a45 (patch) | |
tree | 0df35fcab440f8826819b5e2edefe15599059e6b | |
parent | 67657f1ff938b2afd17ab0ce6476a561725a6781 (diff) | |
download | lvm2-04c77bd8863b071b9e376c76708af6cede596a45.tar.gz |
pvmove.c: relocate id components extraction
we don't want to fail properly set pvmove after metadata
update. failure to copy id components could end with dangling
mirror moving PV segments but no monitoring from lvmpolld or
classical polldaemon.
-rw-r--r-- | tools/pvmove.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/pvmove.c b/tools/pvmove.c index 202c87c47..94a5ffc42 100644 --- a/tools/pvmove.c +++ b/tools/pvmove.c @@ -686,13 +686,13 @@ static int _set_up_pvmove(struct cmd_context *cmd, const char *pv_name, /* init_pvmove(1); */ /* vg->status |= PVMOVE; */ + if (!_copy_id_components(cmd, lv_mirr, vg_name, lv_mirr_name, lvid)) + goto out; + if (flags & PVMOVE_FIRST_TIME) if (!_update_metadata(cmd, vg, lv_mirr, lvs_changed, exclusive)) goto_out; - if (!_copy_id_components(cmd, lv_mirr, vg_name, lv_mirr_name, lvid)) - goto out; - /* LVs are all in status LOCKED */ r = ECMD_PROCESSED; out: |