1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

pvmove: clean exit on failed pvmove restart

At present, before the pvmove command can be used to restart pvmove
polling, the LVs concerned need to be activated e.g. with lvchange -ay.
This commit is contained in:
Alasdair G Kergon 2013-09-23 19:46:28 +01:00
parent 229e0752f1
commit bbcc120e5a
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.103 - Version 2.02.103 -
====================================== ======================================
Exit cleanly with message when pvmove cannot restart because LV is inactive.
Version 2.02.102 - 23rd September 2013 Version 2.02.102 - 23rd September 2013
====================================== ======================================

View File

@ -201,7 +201,12 @@ static int _poll_vg(struct cmd_context *cmd, const char *vgname,
continue; continue;
/* FIXME Need to do the activation from _set_up_pvmove here /* FIXME Need to do the activation from _set_up_pvmove here
* if it's not running and we're not aborting */ * if it's not running and we're not aborting. */
if (!lv_is_active(lv)) {
log_print_unless_silent("%s: Skipping inactive LV. Try lvchange or vgchange.", name);
continue;
}
if (_check_lv_status(cmd, vg, lv, name, parms, &finished) && if (_check_lv_status(cmd, vg, lv, name, parms, &finished) &&
!finished) !finished)
parms->outstanding_count++; parms->outstanding_count++;