Skip to contentSkip to conversation

lvconvert: mirrors and snapshots do not work with cache

PATCH New David Teigland 1 participant 1 message Sep 2, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lvconvert: mirrors and snapshots do not work with cache

Refuse these:
lvconvert -m1 <cache_type_lv>
lvconvert -s <lv> <cache_type_lv>

tools/lvconvert.c +10 -0
index 1e106cf3abf8..819c3aea6627 100644
@@ -1823,6 +1823,11 @@ static int _lvconvert_mirrors(struct cmd_context *cmd,
 		return 0;
 	}
 
+	if (lv_is_cache_type(lv)) {
+		log_error("Mirrors of cache LVs are not yet supported");
+		return 0;
+	}
+
 	/* Adjust mimage and/or log count */
 	if (!_lvconvert_mirrors_parse_params(cmd, lv, lp,
 					     &old_mimage_count, &old_log_count,
@@ -2109,6 +2114,11 @@ static int _lvconvert_snapshot(struct cmd_context *cmd,
 		return 0;
 	}
 
+	if (lv_is_cache_type(lv)) {
+		log_error("Cache types are not yet supported with snapshots.");
+		return 0;
+	}
+
 	if (!(org = find_lv(lv->vg, lp->origin_lv_name))) {
 		log_error("Couldn't find origin volume %s.", lp->origin_lv_name);
 		return 0;
Signature · 1 line
1.8.3.1