\[bu]
Required options depend on the raid level.
+.B lvconvert \-\-type mirror
+VG/RaidLV
+.br
+\[bu]
+Convert RaidLV to type mirror.
+
.B lvconvert \-\-type striped
VG/RaidLV
.br
return _lvconvert_raid(lv, lp);
}
+/*
+ * Convert a raid* LV to a mirror LV.
+ * lvconvert --type mirror LV
+ */
+static int _convert_raid_mirror(struct cmd_context *cmd, struct logical_volume *lv,
+ struct lvconvert_params *lp)
+{
+ return _lvconvert_raid(lv, lp);
+}
+
/*
* Convert a raid* LV to a striped LV.
* lvconvert --type striped LV
if (!strcmp(lp->type_str, SEG_TYPE_NAME_CACHE_POOL) || arg_is_set(cmd, cachepool_ARG))
return _convert_raid_cache_pool(cmd, lv, lp);
- if (segtype_is_raid(lp->segtype) || segtype_is_mirror(lp->segtype))
+ if (segtype_is_raid(lp->segtype))
return _convert_raid_raid(cmd, lv, lp);
+ if (segtype_is_mirror(lp->segtype))
+ return _convert_raid_mirror(cmd, lv, lp);
+
if (!strcmp(lp->type_str, SEG_TYPE_NAME_STRIPED))
return _convert_raid_striped(cmd, lv, lp);