master - raid: recognize transient failed raid leg
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2b18be87aa7cc1439e8b138690f79dd4eed73afc Commit: 2b18be87aa7cc1439e8b138690f79dd4eed73afc Parent: 535f7209d2c0fa996928f82b3668560ad489e742 Author: Zdenek Kabelac <[email protected]> AuthorDate: Fri Jun 23 22:50:19 2017 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Fri Jun 23 23:27:07 2017 +0200
raid: recognize transient failed raid leg
When raid leg rimage device is marked as 'D'ead by mdcore, lvm2 was not able to replace such device with allocate policy, as device has not appared as missing.
Add detection of transiently failing devices.
--- WHATS_NEW | 1 + lib/metadata/raid_manip.c | 2 ++ tools/lvconvert.c | 2 ++ 3 files changed, 5 insertions(+), 0 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.172 - =============================== + Lvconvert --repair handles failing raid legs (present but marked 'D'ead). Do not lvdisplay --maps unset settings of cache pool. Fix lvdisplay --maps for cache pool without policy settings. Support aborting of flushing cache LV.
lib/metadata/raid_manip.c +2 -0
@@ -6653,6 +6653,8 @@ static int _lv_raid_rebuild_or_replace(struct logical_volume *lv,if (lv_is_virtual (seg_lv (raid_seg, s)) ||lv_is_virtual (seg_metalv (raid_seg, s)) || +lv_is_partial (seg_lv (raid_seg, s)) || +lv_is_partial (seg_metalv (raid_seg, s)) ||lv_is_on_pvs (seg_lv (raid_seg, s), remove_pvs) ||lv_is_on_pvs (seg_metalv (raid_seg, s), remove_pvs)) { match_count++;
tools/lvconvert.c +2 -0
@@ -3319,6 +3319,8 @@ static int _lvconvert_repair_pvs_raid(struct cmd_context *cmd, struct logical_voreturn 0 ; } +lv_check_transient (lv);/* TODO check this in lib for all commands? */ +_lvconvert_repair_pvs_raid_ask (cmd, &do_it);if (do_it) {