From 7a5a5cb06fbdbe338f7481780803aa7c3777c326 Mon Sep 17 00:00:00 2001 From: Jonathan Earl Brassow Date: Wed, 22 Feb 2012 16:03:55 +0000 Subject: [PATCH] Add some messages that indicate completion of RAID device replacement. There were no messages printed upon completiion of RAID device replacement. This could cause confusion/concern during automated recovery, because the user sees the failure messages but no other messages indicating correction. --- tools/lvconvert.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/lvconvert.c b/tools/lvconvert.c index 5b1ea231a..043613f4c 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -1531,7 +1531,15 @@ static int lvconvert_raid(struct logical_volume *lv, struct lvconvert_params *lp if (!(failed_pvs = _failed_pv_list(lv->vg))) return_0; - return lv_raid_replace(lv, failed_pvs, lp->pvh); + if (!lv_raid_replace(lv, failed_pvs, lp->pvh)) { + log_error("Failed to replace faulty devices in" + " %s/%s.", lv->vg->name, lv->name); + return 0; + } + + log_print("Faulty devices in %s/%s successfully" + " replaced.", lv->vg->name, lv->name); + return 1; } /* "warn" if policy not set to replace */ -- 2.43.5