Allow the user to not specify a size when creating snapshot. For shared snapshot, the size is not required. If the user creates other volume than a shared snapshot, zero size will be rejected in lv_create_single. Signed-off-by: Mikulas Patocka --- tools/lvcreate.c | 4 ++++ 1 file changed, 4 insertions(+) Index: LVM2.2.02.84/tools/lvcreate.c =================================================================== --- LVM2.2.02.84.orig/tools/lvcreate.c 2011-05-05 02:11:49.000000000 +0200 +++ LVM2.2.02.84/tools/lvcreate.c 2011-05-05 02:11:59.000000000 +0200 @@ -195,6 +195,9 @@ static int _read_size_params(struct lvcr struct lvcreate_cmdline_params *lcp, struct cmd_context *cmd) { + if (!arg_count(cmd, extents_ARG) && !arg_count(cmd, size_ARG)) + goto skip_size_arg; + if (arg_count(cmd, extents_ARG) + arg_count(cmd, size_ARG) != 1) { log_error("Please specify either size or extents (not both)"); return 0; @@ -219,6 +222,7 @@ static int _read_size_params(struct lvcr lcp->percent = PERCENT_NONE; } +skip_size_arg: /* Size returned in kilobyte units; held in sectors */ if (arg_count(cmd, virtualsize_ARG)) { if (arg_sign_value(cmd, virtualsize_ARG, 0) == SIGN_MINUS) {