1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-11-04 12:23:49 +03:00

lvconvert: fix --repair after vgreduce

In case N images fail (N <= parity chunks) _and_
a "vgreduce --removemissing --force VG" was applied
a following repair of the RaidLV fails:

  Unable to remove N images:  Only 0 devices given.
  Failed to remove the specified images from tb/r.
  Failed to replace faulty devices in tb/r.

Fix as of this commit results in correct repair:

  Faulty devices in tb/r successfully replaced.
This commit is contained in:
Heinz Mauelshagen
2017-03-09 02:11:52 +01:00
parent 00b8c2bebc
commit 921b496fff

View File

@@ -6275,7 +6275,7 @@ try_again:
*/
if (!_raid_extract_images(lv, force,
raid_seg->area_count - match_count,
partial_segment_removed ?
(partial_segment_removed || !dm_list_size(remove_pvs)) ?
&lv->vg->pvs : remove_pvs, 0,
&old_lvs, &old_lvs)) {
log_error("Failed to remove the specified images from %s.",