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

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.
This commit is contained in:
Zdenek Kabelac 2017-06-23 22:50:19 +02:00
parent 535f7209d2
commit 2b18be87aa
3 changed files with 5 additions and 0 deletions

View File

@ -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.

View File

@ -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++;

View File

@ -3319,6 +3319,8 @@ static int _lvconvert_repair_pvs_raid(struct cmd_context *cmd, struct logical_vo
return 0;
}
lv_check_transient(lv); /* TODO check this in lib for all commands? */
_lvconvert_repair_pvs_raid_ask(cmd, &do_it);
if (do_it) {