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

RAID: Disallow addition of RAID images while array is not in-sync

We cannot add images to a RAID array while it is not in-sync.  The
kernel will simply reject the table, saying:
	'rebuild' specified while array is not in-sync
Now we check to ensure the LV is in-sync before attempting image
additions.
This commit is contained in:
Jonathan Brassow 2012-09-10 17:15:20 -05:00
parent b49b98d50c
commit cdb0339319

View File

@ -663,6 +663,10 @@ static int _raid_add_images(struct logical_volume *lv,
log_error("Unable to add RAID images to %s of segment type %s",
lv->name, seg->segtype->ops->name(seg));
return 0;
} else if (!_raid_in_sync(lv)) {
log_error("Unable to add RAID images until %s is in-sync",
lv->name);
return 0;
}
if (!_alloc_image_components(lv, pvs, count, &meta_lvs, &data_lvs)) {