1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 01:55:10 +03:00

pvmove: fix activation order

For proper locking we need to gain lock first for mirror which
needs to be deactivated later to be working in cluster.
This commit is contained in:
Zdenek Kabelac 2016-12-11 14:26:17 +01:00
parent 67f9e6b175
commit 3903f915f8
2 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.169 - Version 2.02.169 -
===================================== =====================================
Fix pvmove leaving -pvmove0 error device in clustered VG.
Avoid adding extra '_' at end of raid extracted images or metadata. Avoid adding extra '_' at end of raid extracted images or metadata.
Optimize another _rmeta clearing code. Optimize another _rmeta clearing code.
Fix deactivation of raid orphan devices for clustered VG. Fix deactivation of raid orphan devices for clustered VG.

View File

@ -157,17 +157,17 @@ int pvmove_finish(struct cmd_context *cmd, struct volume_group *vg,
return 0; return 0;
} }
/* Unsuspend LVs */
if (!resume_lvs(cmd, lvs_changed))
stack;
/* Release mirror LV. (No pending I/O because it's been suspended.) */ /* Release mirror LV. (No pending I/O because it's been suspended.) */
if (!resume_lv(cmd, lv_mirr)) { if (!activate_lv_excl_local(cmd, lv_mirr)) {
log_error("Unable to reactivate logical volume \"%s\"", log_error("Unable to reactivate logical volume \"%s\"",
lv_mirr->name); lv_mirr->name);
r = 0; r = 0;
} }
/* Unsuspend LVs */
if (!resume_lvs(cmd, lvs_changed))
stack;
/* Deactivate mirror LV */ /* Deactivate mirror LV */
if (!deactivate_lv(cmd, lv_mirr)) { if (!deactivate_lv(cmd, lv_mirr)) {
log_error("ABORTING: Unable to deactivate temporary logical " log_error("ABORTING: Unable to deactivate temporary logical "