1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 11:55:55 +03:00

RAID: Don't allow syncaction changes on non-RAID LVs

Don't allow syncaction or other RAID-type messages on non-RAID
logical volumes.
This commit is contained in:
Jonathan Brassow 2013-09-19 22:33:01 -05:00
parent 25bed99681
commit 2c41c8b886

View File

@ -896,6 +896,12 @@ int lv_raid_message(const struct logical_volume *lv, const char *msg)
struct dev_manager *dm;
struct dm_status_raid *status;
if (!seg_is_raid(first_seg(lv))) {
log_error("%s/%s must be a RAID logical volume to"
" perform this action.", lv->vg->name, lv->name);
return 0;
}
if (!lv_is_active_locally(lv)) {
log_error("Unable to send message to an inactive logical volume.");
return 0;