mirror of
git://sourceware.org/git/lvm2.git
synced 2025-10-20 11:33:15 +03:00
lvconvert: fix (automatic) raid repair regression
The dm-raid target now rejects device rebuild requests during ongoing resynchronization thus causing 'lvconvert --repair ...' to fail with a kernel error message. This regresses with respect to failing automatic repair via the dmeventd RAID plugin in case raid_fault_policy="allocate" is configured in lvm.conf as well. Previously allowing such repair request required cancelling the resynchronization of any still accessible DataLVs, hence reasoning potential data loss. Patch allows the resynchronization of still accessible DataLVs to finish up by rejecting any 'lvconvert --repair ...'. It enhances the dmeventd RAID plugin to be able to automatically repair by postponing the repair after synchronization ended. More tests are added to lvconvert-rebuild-raid.sh to cover single and multiple DataLV failure cases for the different RAID levels. - resolves: rhbz1371717
This commit is contained in:
@@ -3658,7 +3658,7 @@ static int _lv_raid_rebuild_or_replace(struct logical_volume *lv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!mirror_in_sync() && !_raid_in_sync(lv)) {
|
||||
if (!_raid_in_sync(lv)) {
|
||||
log_error("Unable to replace devices in %s/%s while it is"
|
||||
" not in-sync.", lv->vg->name, lv->name);
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user