From fb0cee9a66db6141ed331c8058d2c5c2c3a30cc1 Mon Sep 17 00:00:00 2001 From: Jonathan Brassow Date: Wed, 21 Nov 2012 18:39:26 -0600 Subject: [PATCH] RAID: Do not allow --splitmirrors on RAID10 logical volumes. RAID10 does not have the ability to split off images for independent use. So, 'lvconvert --splitmirrors' will not work and must be disallowed. --- WHATS_NEW | 1 + lib/metadata/raid_manip.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index e96703c02..a0504fcea 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.99 - =================================== + Do not allow --splitmirrors on RAID10 logical volumes. Skip mlocking [vectors] on arm architecture. Support allocation of pool metadata with lvconvert command. Move common functionality for thin lvcreate and lvconvert to toollib. diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c index b9f75ffda..8be0abe55 100644 --- a/lib/metadata/raid_manip.c +++ b/lib/metadata/raid_manip.c @@ -1152,7 +1152,8 @@ int lv_raid_split(struct logical_volume *lv, const char *split_name, return 0; } - if (!seg_is_mirrored(first_seg(lv))) { + if (!seg_is_mirrored(first_seg(lv)) || + !strcmp(first_seg(lv)->segtype->name, "raid10")) { log_error("Unable to split logical volume of segment type, %s", first_seg(lv)->segtype->ops->name(first_seg(lv))); return 0; -- 2.43.5