summaryrefslogtreecommitdiffstats
path: root/tools/lvcreate.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2011-09-08 16:41:18 +0000
committerAlasdair Kergon <agk@redhat.com>2011-09-08 16:41:18 +0000
commitef78ebf35af44e0a6fc7f821d62f266b3fab2828 (patch)
treedbe23780a8ca9489f11826c7686e08558b7b0fd3 /tools/lvcreate.c
parent1abaaab1bc7b47b67a9ee35f11cc66e890fc60da (diff)
downloadlvm2-ef78ebf35af44e0a6fc7f821d62f266b3fab2828.tar.gz
lvm2-ef78ebf35af44e0a6fc7f821d62f266b3fab2828.tar.xz
lvm2-ef78ebf35af44e0a6fc7f821d62f266b3fab2828.zip
lvcreate/remove thin_pool and thin volumes (--driverloaded n only)
Diffstat (limited to 'tools/lvcreate.c')
-rw-r--r--tools/lvcreate.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/lvcreate.c b/tools/lvcreate.c
index dd2d9b43..84195baa 100644
--- a/tools/lvcreate.c
+++ b/tools/lvcreate.c
@@ -590,6 +590,11 @@ static int _lvcreate_params(struct lvcreate_params *lp,
lp->segtype = get_segtype_from_string(cmd, arg_str_value(cmd, type_ARG, segtype_str));
+ if (seg_unknown(lp)) {
+ log_error("Unable to create LV with unknown segment type %s.", arg_str_value(cmd, type_ARG, segtype_str));
+ return 0;
+ }
+
if (arg_count(cmd, snapshot_ARG) || seg_is_snapshot(lp) ||
(!seg_is_thin(lp) && arg_count(cmd, virtualsize_ARG)))
lp->snapshot = 1;