Skip to contentSkip to conversation

master - raid0: Add raid0_meta segment type.

PATCH Alasdair Kergon 1 participant 1 message Jul 1, 2016 MD RAID

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d8c2677ab92c3c3bd35ccab0d486ebce8db4fbb4
Commit:        d8c2677ab92c3c3bd35ccab0d486ebce8db4fbb4
Parent:        1df98222242d89c5c88d1122427ba5ae233e435a
Author:        Alasdair G Kergon <[email protected]>
AuthorDate:    Fri Jul 1 22:20:54 2016 +0100
Committer:     Alasdair G Kergon <[email protected]>
CommitterDate: Fri Jul 1 22:20:54 2016 +0100

raid0: Add raid0_meta segment type.

---
 WHATS_NEW                      |    1 +
 lib/metadata/lv_manip.c        |   28 ++-
 lib/metadata/raid_manip.c      |  461 +++++++++++++++++++++++++++++++---------
 lib/metadata/segtype.c         |    4 +
 lib/metadata/segtype.h         |    6 +-
 lib/metadata/takeover_matrix.h |    4 +-
 lib/raid/raid.c                |   31 ++--
 libdm/libdm-deptree.c          |   16 ++-
 tools/lvconvert.c              |   24 ++-
 tools/lvcreate.c               |   14 +-
 10 files changed, 444 insertions(+), 145 deletions(-)
WHATS_NEW +1 -0
index 4d71ea8..e35ca82 100644
@@ -1,5 +1,6 @@
 Version 2.02.159 - 
 =================================
+  Add raid0_meta segment type that provides metadata space for raid conversions.
   Fix created link for a used pool for vgmknode.
   Introduce and use is_power_of_2 macro.
   Support conversions between striped and raid0 segment types.
lib/metadata/lv_manip.c +18 -10
index a706578..6f02b16 100644
@@ -115,6 +115,7 @@ enum {
 	LV_TYPE_SPARE,
 	LV_TYPE_VIRTUAL,
 	LV_TYPE_RAID0,
+	LV_TYPE_RAID0_META,
 	LV_TYPE_RAID1,
 	LV_TYPE_RAID10,
 	LV_TYPE_RAID4,
@@ -164,6 +165,7 @@ static const char *_lv_type_names[] = {
 	[LV_TYPE_SPARE] =				"spare",
 	[LV_TYPE_VIRTUAL] =				"virtual",
 	[LV_TYPE_RAID0] =				SEG_TYPE_NAME_RAID0,
+	[LV_TYPE_RAID0_META] =				SEG_TYPE_NAME_RAID0_META,
 	[LV_TYPE_RAID1] =				SEG_TYPE_NAME_RAID1,
 	[LV_TYPE_RAID10] =				SEG_TYPE_NAME_RAID10,
 	[LV_TYPE_RAID4] =				SEG_TYPE_NAME_RAID4,
@@ -929,6 +931,7 @@ struct lv_segment *alloc_lv_segment(const struct segment_type *segtype,
 	}
 
 	if (segtype_is_raid(segtype) &&
+	    !segtype_is_raid0(segtype) &&
 	    !(seg->meta_areas = dm_pool_zalloc(mem, areas_sz))) {
 		dm_pool_free(mem, seg); /* frees everything alloced since seg */
 		return_NULL;
@@ -3809,7 +3812,7 @@ static int _lv_extend_layered_lv(struct alloc_handle *ah,
 	if (seg_is_raid(seg)) {
 		stripes = 1;
 		stripe_size = 0;
-		if (seg_is_raid0(seg))
+		if (seg_is_any_raid0(seg))
 			area_multiple = seg->area_count;
 	}
 
@@ -3960,14 +3963,19 @@ int lv_extend(struct logical_volume *lv,
 	if (segtype_is_virtual(segtype))
 		return lv_add_virtual_segment(lv, 0u, extents, segtype);
 
-	if (!lv->le_count && segtype_is_pool(segtype)) {
-		/*
-		 * Pool allocations treat the metadata device like a mirror log.
-		 */
-		/* FIXME Support striped metadata pool */
-		log_count = 1;
-	} else if (segtype_is_raid(segtype) && !segtype_is_raid0(segtype) && !lv->le_count)
-		log_count = mirrors * stripes;
+	if (!lv->le_count) {
+		if (segtype_is_pool(segtype))
+			/*
+			 * Pool allocations treat the metadata device like a mirror log.
+			 */
+			/* FIXME Support striped metadata pool */
+			log_count = 1;
+		else if (segtype_is_raid0_meta(segtype))
+			/* Extend raid0 metadata LVs too */
+			log_count = stripes;
+		else if (segtype_is_raid(segtype) && !segtype_is_raid0(segtype))
+			log_count = mirrors * stripes;
+	}
 	/* FIXME log_count should be 1 for mirrors */
 
 	if (!(ah = allocate_extents(lv->vg, lv, segtype, stripes, mirrors,
@@ -4961,7 +4969,7 @@ static int _lvresize_adjust_extents(struct logical_volume *lv,
 						seg_size /= seg_mirrors;
 					lp->extents = logical_extents_used + seg_size;
 					break;
-				}
+			}
 			} else if (new_extents <= logical_extents_used + seg_logical_extents) {
 				seg_size = new_extents - logical_extents_used;
 				lp->extents = new_extents;
lib/metadata/raid_manip.c +357 -104

851 lines not on this page · raw message

lib/metadata/segtype.c +4 -0
index 8d8b28c..2b060da 100644
@@ -22,6 +22,10 @@ struct segment_type *get_segtype_from_string(struct cmd_context *cmd,
 {
 	struct segment_type *segtype;
 
+	/* FIXME Register this properly within striped.c */
+	if (!strcmp(str, SEG_TYPE_NAME_LINEAR))
+		str = SEG_TYPE_NAME_STRIPED;
+
 	dm_list_iterate_items(segtype, &cmd->segtypes)
 		if (!strcmp(segtype->name, str))
 			return segtype;
lib/metadata/segtype.h +5 -1
index b43f228..2afb02a 100644
@@ -48,6 +48,7 @@ struct dev_manager;
 #define SEG_CAN_ERROR_WHEN_FULL	0x0000000000020000ULL
 
 #define SEG_RAID0		0x0000000000040000ULL
+#define SEG_RAID0_META		0x0000000000080000ULL
 #define SEG_RAID1		0x0000000000100000ULL
 #define SEG_RAID10		0x0000000000200000ULL
 #define SEG_RAID4		0x0000000000400000ULL
@@ -82,6 +83,7 @@ struct dev_manager;
 #define SEG_TYPE_NAME_ZERO		"zero"
 #define SEG_TYPE_NAME_RAID		"raid"
 #define SEG_TYPE_NAME_RAID0		"raid0"
+#define SEG_TYPE_NAME_RAID0_META	"raid0_meta"
 #define SEG_TYPE_NAME_RAID1		"raid1"
 #define SEG_TYPE_NAME_RAID10		"raid10"
 #define SEG_TYPE_NAME_RAID4		"raid4"
@@ -102,7 +104,8 @@ struct dev_manager;
 #define segtype_is_mirror(segtype)	((segtype)->flags & SEG_MIRROR ? 1 : 0)
 #define segtype_is_pool(segtype)	((segtype)->flags & (SEG_CACHE_POOL | SEG_THIN_POOL)  ? 1 : 0)
 #define segtype_is_raid0(segtype)	((segtype)->flags & SEG_RAID0 ? 1 : 0)
-#define segtype_is_any_raid0(segtype)	((segtype)->flags & SEG_RAID0 ? 1 : 0)
+#define segtype_is_raid0_meta(segtype)	((segtype)->flags & SEG_RAID0_META ? 1 : 0)
+#define segtype_is_any_raid0(segtype)	((segtype)->flags & (SEG_RAID0 | SEG_RAID0_META) ? 1 : 0)
 #define segtype_is_raid(segtype)	((segtype)->flags & SEG_RAID ? 1 : 0)
 #define segtype_is_raid1(segtype)	((segtype)->flags & SEG_RAID1 ? 1 : 0)
 #define segtype_is_raid4(segtype)	((segtype)->flags & SEG_RAID4 ? 1 : 0)
@@ -135,6 +138,7 @@ struct dev_manager;
 #define seg_is_mirrored(seg)	segtype_is_mirrored((seg)->segtype)
 #define seg_is_pool(seg)	segtype_is_pool((seg)->segtype)
 #define seg_is_raid0(seg)	segtype_is_raid0((seg)->segtype)
+#define seg_is_raid0_meta(seg)	segtype_is_raid0_meta((seg)->segtype)
 #define seg_is_any_raid0(seg)	segtype_is_any_raid0((seg)->segtype)
 #define seg_is_raid(seg)	segtype_is_raid((seg)->segtype)
 #define seg_is_raid1(seg)	segtype_is_raid1((seg)->segtype)
lib/metadata/takeover_matrix.h +2 -2
index 25a8197..0736643 100644
@@ -84,7 +84,7 @@ static uint64_t _segtype_index[] = {
 	1, /* striped */
 	SEG_MIRROR,
 	SEG_RAID0,
-	// SEG_RAID0_META,
+	SEG_RAID0_META,
 	SEG_RAID1,
 	SEG_RAID4 | SEG_RAID5_LS | SEG_RAID5_LA | SEG_RAID5_LS | SEG_RAID5_RS | SEG_RAID5_RA | SEG_RAID5_N,
 	SEG_RAID6_LS_6 | SEG_RAID6_LA_6 | SEG_RAID6_RS_6 | SEG_RAID6_RA_6 | SEG_RAID6_NC | SEG_RAID6_NR | SEG_RAID6_ZR | SEG_RAID6_N_6,
@@ -108,7 +108,7 @@ static takeover_fn_t _takeover_fns[][11] = {
         /* striped    */ { X      ,  N      ,  X      ,  str_r0,  str_r0m,  lin_r1,  str_r45,  str_r6,  str_r10,  str_r01, X },
         /* mirror     */ { X      ,  X      ,  N      ,  mir_r0,  mir_r0m,  mir_r1,  mir_r45,  X     ,  mir_r10,  X      , X },
         /* raid0      */ { r0__lin,  r0__str,  r0__mir,  N     ,  r0__r0m,  r0__r1,  r0__r45,  r0__r6,  r0__r10,  X      , X },
-        /* raid0_meta */ // { r0m_lin,  r0m_str,  r0m_mir,  r0m_r0,  N      ,  r0m_r1,  r0m_r45,  r0m_r6,  r0m_r10,  X      , X },
+        /* raid0_meta */ { r0m_lin,  r0m_str,  r0m_mir,  r0m_r0,  N      ,  r0m_r1,  r0m_r45,  r0m_r6,  r0m_r10,  X      , X },
         /* raid1      */ { r1__lin,  r1__str,  r1__mir,  r1__r0,  r1__r0m,  r1__r1,  r1__r45,  X     ,  r1__r10,  X      , X },
         /* raid4/5    */ { r45_lin,  r45_str,  r45_mir,  r45_r0,  r45_r0m,  r45_r1,  r45_r54,  r45_r6,  X      ,  X      , X },
         /* raid6      */ { X      ,  r6__str,  X      ,  r6__r0,  r6__r0m,  X     ,  r6__r45,  X     ,  X      ,  X      , X },
lib/raid/raid.c +16 -15
index e299e17..ef5794f 100644
@@ -153,7 +153,7 @@ static int _raid_text_import(struct lv_segment *seg,
 		}
 	}
 
-	if (!dm_config_get_list(sn, seg_is_any_raid0(seg) ? "raid0_lvs" : "raids", &cv)) {
+	if (!dm_config_get_list(sn, seg_is_raid0(seg) ? "raid0_lvs" : "raids", &cv)) {
 		log_error("Couldn't find RAID array for "
 			  "segment %s of logical volume %s.",
 			  dm_config_parent_name(sn), seg->lv->name);
@@ -179,7 +179,7 @@ static int _raid_text_export_raid0(const struct lv_segment *seg, struct formatte
 	if (seg->stripe_size)
 		outf(f, "stripe_size = %" PRIu32, seg->stripe_size);
 
-	return out_areas(f, seg, "raid0_lv");
+	return out_areas(f, seg, seg_is_raid0(seg) ? "raid0_lv" : "raid");
 }
 
 static int _raid_text_export_raid(const struct lv_segment *seg, struct formatter *f)
@@ -469,19 +469,20 @@ static const struct raid_type {
 	unsigned parity;
 	uint64_t extra_flags;
 } _raid_types[] = {
-	{ SEG_TYPE_NAME_RAID0,    0, SEG_RAID0 | SEG_AREAS_STRIPED },
-	{ SEG_TYPE_NAME_RAID1,    0, SEG_RAID1 | SEG_AREAS_MIRRORED },
-	{ SEG_TYPE_NAME_RAID10,   0, SEG_RAID10 | SEG_AREAS_MIRRORED },
-	{ SEG_TYPE_NAME_RAID4,    1, SEG_RAID4 },
-	{ SEG_TYPE_NAME_RAID5,    1, SEG_RAID5 },
-	{ SEG_TYPE_NAME_RAID5_LA, 1, SEG_RAID5_LA },
-	{ SEG_TYPE_NAME_RAID5_LS, 1, SEG_RAID5_LS },
-	{ SEG_TYPE_NAME_RAID5_RA, 1, SEG_RAID5_RA },
-	{ SEG_TYPE_NAME_RAID5_RS, 1, SEG_RAID5_RS },
-	{ SEG_TYPE_NAME_RAID6,    2, SEG_RAID6 },
-	{ SEG_TYPE_NAME_RAID6_NC, 2, SEG_RAID6_NC },
-	{ SEG_TYPE_NAME_RAID6_NR, 2, SEG_RAID6_NR },
-	{ SEG_TYPE_NAME_RAID6_ZR, 2, SEG_RAID6_ZR }
+	{ SEG_TYPE_NAME_RAID0,      0, SEG_RAID0 | SEG_AREAS_STRIPED },
+	{ SEG_TYPE_NAME_RAID0_META, 0, SEG_RAID0_META | SEG_AREAS_STRIPED },
+	{ SEG_TYPE_NAME_RAID1,      0, SEG_RAID1 | SEG_AREAS_MIRRORED },
+	{ SEG_TYPE_NAME_RAID10,     0, SEG_RAID10 | SEG_AREAS_MIRRORED },
+	{ SEG_TYPE_NAME_RAID4,      1, SEG_RAID4 },
+	{ SEG_TYPE_NAME_RAID5,      1, SEG_RAID5 },
+	{ SEG_TYPE_NAME_RAID5_LA,   1, SEG_RAID5_LA },
+	{ SEG_TYPE_NAME_RAID5_LS,   1, SEG_RAID5_LS },
+	{ SEG_TYPE_NAME_RAID5_RA,   1, SEG_RAID5_RA },
+	{ SEG_TYPE_NAME_RAID5_RS,   1, SEG_RAID5_RS },
+	{ SEG_TYPE_NAME_RAID6,      2, SEG_RAID6 },
+	{ SEG_TYPE_NAME_RAID6_NC,   2, SEG_RAID6_NC },
+	{ SEG_TYPE_NAME_RAID6_NR,   2, SEG_RAID6_NR },
+	{ SEG_TYPE_NAME_RAID6_ZR,   2, SEG_RAID6_ZR }
 };
 
 static struct segment_type *_init_raid_segtype(struct cmd_context *cmd,
libdm/libdm-deptree.c +13 -3
index dd5ee9e..d74bb9c 100644
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2015 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2005-2016 Red Hat, Inc. All rights reserved.
  *
  * This file is part of the device-mapper userspace tools.
  *
@@ -43,6 +43,7 @@ enum {
 	SEG_THIN_POOL,
 	SEG_THIN,
 	SEG_RAID0,
+	SEG_RAID0_META,
 	SEG_RAID1,
 	SEG_RAID10,
 	SEG_RAID4,
@@ -76,6 +77,7 @@ static const struct {
 	{ SEG_THIN_POOL, "thin-pool"},
 	{ SEG_THIN, "thin"},
 	{ SEG_RAID0, "raid0"},
+	{ SEG_RAID0_META, "raid0_meta"},
 	{ SEG_RAID1, "raid1"},
 	{ SEG_RAID10, "raid10"},
 	{ SEG_RAID4, "raid4"},
@@ -2134,6 +2136,7 @@ static int _emit_areas_line(struct dm_task *dmt __attribute__((unused)),
 			}
 			break;
 		case SEG_RAID0:
+		case SEG_RAID0_META:
 		case SEG_RAID1:
 		case SEG_RAID10:
 		case SEG_RAID4:
@@ -2353,6 +2356,7 @@ static int _raid_emit_segment_line(struct dm_task *dmt, uint32_t major,
 	uint32_t i;
 	int param_count = 1; /* mandatory 'chunk size'/'stripe size' arg */
 	int pos = 0;
+	unsigned type = seg->type;
 
 	if ((seg->flags & DM_NOSYNC) || (seg->flags & DM_FORCESYNC))
 		param_count++;
@@ -2366,10 +2370,14 @@ static int _raid_emit_segment_line(struct dm_task *dmt, uint32_t major,
 	param_count += _get_params_count(seg->rebuilds);
 	param_count += _get_params_count(seg->writemostly);
 
-	if ((seg->type == SEG_RAID1) && seg->stripe_size)
+	if ((type == SEG_RAID1) && seg->stripe_size)
 		log_error("WARNING: Ignoring RAID1 stripe size");
 
-	EMIT_PARAMS(pos, "%s %d %u", _dm_segtypes[seg->type].target,
+	/* Kernel only expects "raid0", not "raid0_meta" */
+	if (type == SEG_RAID0_META)
+		type = SEG_RAID0;
+
+	EMIT_PARAMS(pos, "%s %d %u", _dm_segtypes[type].target,
 		    param_count, seg->stripe_size);
 
 	if (seg->flags & DM_NOSYNC)
@@ -2576,6 +2584,7 @@ static int _emit_segment_line(struct dm_task *dmt, uint32_t major,
 			    seg->iv_offset : *seg_start);
 		break;
 	case SEG_RAID0:
+	case SEG_RAID0_META:
 	case SEG_RAID1:
 	case SEG_RAID10:
 	case SEG_RAID4:
@@ -3853,6 +3862,7 @@ int dm_tree_node_add_null_area(struct dm_tree_node *node, uint64_t offset)
 
 	switch (seg->type) {
 	case SEG_RAID0:
+	case SEG_RAID0_META:
 	case SEG_RAID1:
 	case SEG_RAID4:
 	case SEG_RAID5_LA:
tools/lvconvert.c +17 -7
index a6f2704..9ce6ef5 100644
@@ -285,7 +285,7 @@ static int _check_conversion_type(struct cmd_context *cmd, const char *type_str)
 	}
 
 	/* FIXME: Check thin-pool and thin more thoroughly! */
-	if (!strcmp(type_str, "snapshot") ||
+	if (!strcmp(type_str, "snapshot") || !strcmp(type_str, "linear") ||
 	    !strcmp(type_str, "striped") ||
 	    !strncmp(type_str, "raid", 4) ||
 	    !strcmp(type_str, "cache-pool") || !strcmp(type_str, "cache") ||
@@ -304,7 +304,7 @@ static int _snapshot_type_requested(struct cmd_context *cmd, const char *type_st
 
 static int _raid0_type_requested(struct cmd_context *cmd, const char *type_str)
 {
-	return (!strcmp(type_str, "raid0"));
+	return (!strcmp(type_str, "raid0") || !strcmp(type_str, "raid0_meta"));
 }
 
 /* mirror/raid* (1,10,4,5,6 and their variants) reshape */
@@ -316,7 +316,12 @@ static int _mirror_or_raid_type_requested(struct cmd_context *cmd, const char *t
 
 static int _striped_type_requested(struct cmd_context *cmd, const char *type_str)
 {
-	return (!strcmp(type_str, "striped"));
+	return (!strcmp(type_str, SEG_TYPE_NAME_STRIPED) || !strcmp(type_str, SEG_TYPE_NAME_LINEAR));
+}
+
+static int _linear_type_requested(const char *type_str)
+{
+	return (!strcmp(type_str, SEG_TYPE_NAME_LINEAR));
 }
 
 static int _read_pool_params(struct cmd_context *cmd, int *pargc, char ***pargv,
@@ -584,7 +589,7 @@ static int _read_params(struct cmd_context *cmd, int argc, char **argv,
 	     lp->repair || arg_is_set(cmd, thinpool_ARG) || _raid0_type_requested(cmd, lp->type_str) ||
 	     _striped_type_requested(cmd, lp->type_str))) {
 		log_error("--snapshot/--type snapshot or --merge argument "
-			  "cannot be mixed with --mirrors/--type mirror/--type raid*/--stripes/--type striped, "
+			  "cannot be mixed with --mirrors/--type mirror/--type raid*/--stripes/--type striped/--type linear, "
 			  "--mirrorlog, --repair or --thinpool.");
 		return 0;
 	}
@@ -593,7 +598,7 @@ static int _read_params(struct cmd_context *cmd, int argc, char **argv,
 	    !(_mirror_or_raid_type_requested(cmd, lp->type_str) || _striped_type_requested(cmd, lp->type_str) ||
 	      _raid0_type_requested(cmd, lp->type_str) || lp->repair || arg_is_set(cmd, thinpool_ARG))) {
 		log_error("--stripes or --stripesize argument is only valid "
-			  "with --mirrors/--type mirror/--type raid*/--type striped, --repair and --thinpool");
+			  "with --mirrors/--type mirror/--type raid*/--type striped/--type linear, --repair and --thinpool");
 		return 0;
 	}
 
@@ -769,8 +774,8 @@ static int _read_params(struct cmd_context *cmd, int argc, char **argv,
 			if (!(lp->segtype = get_segtype_from_string(cmd, arg_str_value(cmd, type_ARG, find_config_tree_str(cmd, global_mirror_segtype_default_CFG, NULL)))))
 				return_0;
 		} 
-	} else if (_raid0_type_requested(cmd, lp->type_str) || _striped_type_requested(cmd, lp->type_str)) { /* striped or raid0 */
-		if (arg_from_list_is_set(cmd, "cannot be used with --type raid0 or --type striped",
+	} else if (_raid0_type_requested(cmd, lp->type_str) || _striped_type_requested(cmd, lp->type_str)) { /* striped or linear or raid0 */
+		if (arg_from_list_is_set(cmd, "cannot be used with --type raid0 or --type striped or --type linear",
 					 chunksize_ARG, corelog_ARG, mirrors_ARG, mirrorlog_ARG, regionsize_ARG, zero_ARG,
 					 -1))
 			return_0;
@@ -778,6 +783,11 @@ static int _read_params(struct cmd_context *cmd, int argc, char **argv,
 		if (!get_stripe_params(cmd, &lp->stripes, &lp->stripe_size))
 			return_0;
 
+		/* FIXME Shouldn't need to override get_stripe_params which defaults to 1 stripe (i.e. linear)! */
+		/* The default keeps existing number of stripes, handled inside the library code */
+		if (!arg_is_set(cmd, stripes_long_ARG) && !_linear_type_requested(lp->type_str))
+			lp->stripes = 0;
+
 		if (!(lp->segtype = get_segtype_from_string(cmd, lp->type_str)))
 			return_0;
 	} /* else segtype will default to current type */
tools/lvcreate.c +11 -3
index 8db68c1..0dd9b1e 100644
@@ -547,6 +547,13 @@ static int _read_mirror_and_raid_params(struct cmd_context *cmd,
 		/* Default to 2 mirrored areas if '--type mirror|raid1|raid10' */
 		lp->mirrors = seg_is_mirrored(lp) ? 2 : 1;
 
+	if (lp->stripes < 2 && segtype_is_any_raid0(lp->segtype))
+		if (arg_count(cmd, stripes_ARG)) {
+			/* User supplied the bad argument */
+			log_error("Segment type %s requires 2 or more stripes.", lp->segtype->name);
+			return 0;
+		}
+
 	lp->nosync = arg_is_set(cmd, nosync_ARG);
 
 	if (!(lp->region_size = arg_uint_value(cmd, regionsize_ARG, 0)) &&
@@ -1238,12 +1245,13 @@ static int _check_raid_parameters(struct volume_group *vg,
 				  lp->segtype->name);
 			return 0;
 		}
-	} else if (segtype_is_raid10(lp->segtype)) {
+	} else if (segtype_is_any_raid0(lp->segtype) ||
+		   segtype_is_raid10(lp->segtype)) {
 		if (!arg_is_set(cmd, stripes_ARG))
 			lp->stripes = devs / lp->mirrors;
 		if (lp->stripes < 2) {
-			log_error("Unable to create RAID10 LV,"
-				  " insufficient number of devices.");
+			log_error("Unable to create RAID(1)0 LV: "
+				  "insufficient number of devices.");
 			return 0;
 		}
 	}