master - pvmove: clean exit on failed pvmove restart
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b2535d0c971afc665a268cbe55b6d23262e21e2b Commit: b2535d0c971afc665a268cbe55b6d23262e21e2b Parent: 229e0752f1651463c21e65d8f9641ff9d1c26dfd Author: Alasdair G Kergon <[email protected]> AuthorDate: Mon Sep 23 19:53:18 2013 +0100 Committer: Alasdair G Kergon <[email protected]> CommitterDate: Mon Sep 23 19:53:18 2013 +0100
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.
--- WHATS_NEW | 1 + tools/polldaemon.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.103 - ====================================== + Exit cleanly with message when pvmove cannot restart because LV is inactive. Version 2.02.102 - 23rd September 2013 ======================================
tools/polldaemon.c +6 -1
@@ -201,7 +201,12 @@ static int _poll_vg(struct cmd_context *cmd, const char *vgname,continue ;/* 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) && !finished) parms->outstanding_count++;