If pvmove crashed and metadata contains pvmove LV
but without miorrored segments, pvmove --abort
will not repair the situation (and finish wth success!).
Fix it by allowing metadata update if aborting
(thus removing pvmove LV) even if no moved LVs detected.
(Tested on real metadata provided by an lvm user:-)
Version 2.02.74 -
==================================
+ Fix pvmove --abort to remove even for empty pvmove LV.
Add configure --with-default-data-alignment.
Update heuristic used for default and detected data alignment.
Add "devices/default_data_alignment" to lvm.conf.
lv = lvl->lv;
if (!(lv->status & parms->lv_type))
continue;
- if (!(name = parms->poll_fns->get_copy_name_from_lv(lv)))
+ name = parms->poll_fns->get_copy_name_from_lv(lv);
+ if (!name && !parms->aborting)
continue;
+
/* FIXME Need to do the activation from _set_up_pvmove here
* if it's not running and we're not aborting */
if (_check_lv_status(cmd, vg, lv, name, parms, &finished) &&
{
int r = 1;
- if (!_detach_pvmove_mirror(cmd, lv_mirr)) {
+ if (!dm_list_empty(lvs_changed) &&
+ !_detach_pvmove_mirror(cmd, lv_mirr)) {
log_error("ABORTING: Removal of temporary mirror failed");
return 0;
}