summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2014-09-17 16:41:58 +0100
committerAlasdair G Kergon <agk@redhat.com>2014-09-17 16:41:58 +0100
commitbdb05cc05e3a0eac72b0921cb5eb500891346e12 (patch)
tree633d9ea1d5a1d011c49ac75f063553bd8bcbe083
parentb4f5be76a3b8c9c89719e5d8699033a79c993b6f (diff)
downloadlvm2-bdb05cc05e3a0eac72b0921cb5eb500891346e12.tar.gz
lvconvert: Restrict use of cache LVs.
Refuse use of -m and -s with cache LVs until full support can be provided.
-rw-r--r--WHATS_NEW1
-rw-r--r--tools/lvconvert.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/WHATS_NEW b/WHATS_NEW
index 1f64d0d01..67c648238 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.112 -
=====================================
+ Ensure only supported volume types are used with cache segments.
Fix inablility to specify cachemode when 'lvconvert'ing to cache-pool.
Grab cluster lock for active LVs when setting clustered attribute.
Use va_copy to properly pass va_list through functions.
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 93a2be409..295a4e548 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -1725,6 +1725,12 @@ static int _lvconvert_mirrors(struct cmd_context *cmd,
return 0;
}
+ if (lv_is_cache_type(lv)) {
+ log_error("Mirrors are not yet supported on cache LVs %s.",
+ display_lvname(lv));
+ return 0;
+ }
+
/* Adjust mimage and/or log count */
if (!_lvconvert_mirrors_parse_params(cmd, lv, lp,
&old_mimage_count, &old_log_count,
@@ -2011,6 +2017,12 @@ static int _lvconvert_snapshot(struct cmd_context *cmd,
return 0;
}
+ if (lv_is_cache_type(lv)) {
+ log_error("Snapshots are not yet supported with cache type LVs %s.",
+ display_lvname(lv));
+ 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;