master - RAID: Allow remove/replace of sub-LVs composed of error segments.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=bd0ee420b597d38e37cfe738951cb1242f527638 Commit: bd0ee420b597d38e37cfe738951cb1242f527638 Parent: 845852d6b4b486075f3ed866890f79b278a990ce Author: Jonathan Brassow <[email protected]> AuthorDate: Wed Feb 20 14:58:56 2013 -0600 Committer: Jonathan Brassow <[email protected]> CommitterDate: Wed Feb 20 14:58:56 2013 -0600
RAID: Allow remove/replace of sub-LVs composed of error segments.
When a device fails, we may wish to replace those segments with an error segment. (Like when a 'vgreduce --removemissing' removes a failed device that happens to be a RAID image/meta.) We are then left with images that we will eventually want to remove or replace.
This patch allows us to pull out these virtual "error" sub-LVs. This allows a user to 'lvconvert -m -1 vg/lv' to extract the bad sub-LVs. Sub-LVs with error segments are considered for extraction before other possible devices so that good devices are not accidentally removed.
This patch also adds the ability to replace RAID images that contain error segments. The user will still be unable to run 'lvconvert --replace' because there is no way to address the 'error' segment (i.e. no PV that it is associated with). However, 'lvconvert --repair' can be used to replace the image's error segment with a new PV. This is also the most appropriate way to do it, since the LV will continue to be reported as 'partial'.
--- WHATS_NEW | 1 + lib/metadata/raid_manip.c | 73 +++++++++++++++++++++++++++++++++++---------- 2 files changed, 58 insertions(+), 16 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.99 - =================================== + Allow remove/replace of RAID sub-LVs that are composed of error targets. Make 'vgreduce --removemissing' able to handle RAID LVs with missing PVs. Rename lvm.conf setting 'mirror_region_size' to 'raid_region_size'. Fix pvs -o pv_free reporting for PVs with zero PE count.
lib/metadata/raid_manip.c +57 -16
107 lines not on this page · raw message