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.60/tools/lvcreate.c =================================================================== --- LVM2.2.02.60.orig/tools/lvcreate.c 2010-02-10 22:42:35.000000000 +0100 +++ LVM2.2.02.60/tools/lvcreate.c 2010-02-10 22:42:47.000000000 +0100 @@ -181,6 +181,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; @@ -205,6 +208,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) {