When creating a shared store, always use previx "-shared". If the user specifies a name on a command line, it will be used to create a snapshot in this shared store. Signed-off-by: Mikulas Patocka --- lib/metadata/lv_manip.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) Index: LVM2.2.02.54/lib/metadata/lv_manip.c =================================================================== --- LVM2.2.02.54.orig/lib/metadata/lv_manip.c 2009-10-29 17:38:51.000000000 +0100 +++ LVM2.2.02.54/lib/metadata/lv_manip.c 2009-10-29 17:44:39.000000000 +0100 @@ -27,6 +27,8 @@ #include "activate.h" #include "str_list.h" +#define SHARED_SUFFIX "-shared" + struct lv_names { const char *old; const char *new; @@ -2987,7 +2989,13 @@ int lv_create_single(struct volume_group if (!archive(vg)) return 0; - if (lp->lv_name) + if (lp->shared_store) { + char *name = dm_pool_alloc(cmd->mem, + strlen(lp->origin) + strlen(SHARED_SUFFIX) + 1); + strcpy(name, lp->origin); + strcat(name, SHARED_SUFFIX); + lv_name = name; + } else if (lp->lv_name) lv_name = lp->lv_name; else { if (!generate_lv_name(vg, "lvol%d", lv_name_buf, sizeof(lv_name_buf))) {