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:
parent
25bed99681
commit
2c41c8b886
@ -896,6 +896,12 @@ int lv_raid_message(const struct logical_volume *lv, const char *msg)
|
|||||||
struct dev_manager *dm;
|
struct dev_manager *dm;
|
||||||
struct dm_status_raid *status;
|
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)) {
|
if (!lv_is_active_locally(lv)) {
|
||||||
log_error("Unable to send message to an inactive logical volume.");
|
log_error("Unable to send message to an inactive logical volume.");
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user