mrc0mmand / rpms / lvm2

Forked from rpms/lvm2 2 years ago
Clone

Blame SOURCES/lvm2-2_02_181-lvconvert-improve-text-about-splitmirrors.patch

0d8a0a
 lib/metadata/raid_manip.c |  4 ++--
0d8a0a
 tools/args.h              | 14 +++++++++-----
0d8a0a
 tools/command-lines.in    |  2 +-
0d8a0a
 3 files changed, 12 insertions(+), 8 deletions(-)
0d8a0a
0d8a0a
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
0d8a0a
index 8f78e1a..705a7f9 100644
0d8a0a
--- a/lib/metadata/raid_manip.c
0d8a0a
+++ b/lib/metadata/raid_manip.c
0d8a0a
@@ -3563,7 +3563,7 @@ int lv_raid_merge(struct logical_volume *image_lv)
0d8a0a
 	struct volume_group *vg = image_lv->vg;
0d8a0a
 
0d8a0a
 	if (image_lv->status & LVM_WRITE) {
0d8a0a
-		log_error("%s is not read-only - refusing to merge.",
0d8a0a
+		log_error("%s cannot be merged because --trackchanges was not used.",
0d8a0a
 			  display_lvname(image_lv));
0d8a0a
 		return 0;
0d8a0a
 	}
0d8a0a
@@ -3572,7 +3572,7 @@ int lv_raid_merge(struct logical_volume *image_lv)
0d8a0a
 		return_0;
0d8a0a
 
0d8a0a
 	if (!(p = strstr(lv_name, "_rimage_"))) {
0d8a0a
-		log_error("Unable to merge non-mirror image %s.",
0d8a0a
+		log_error("Unable to merge non-raid image %s.",
0d8a0a
 			  display_lvname(image_lv));
0d8a0a
 		return 0;
0d8a0a
 	}
0d8a0a
diff --git a/tools/args.h b/tools/args.h
0d8a0a
index b80b8da..abe193c 100644
0d8a0a
--- a/tools/args.h
0d8a0a
+++ b/tools/args.h
0d8a0a
@@ -611,7 +611,9 @@ arg(splitcache_ARG, '\0', "splitcache", 0, 0, 0,
0d8a0a
 arg(splitmirrors_ARG, '\0', "splitmirrors", number_VAL, 0, 0,
0d8a0a
     "Splits the specified number of images from a raid1 or mirror LV\n"
0d8a0a
     "and uses them to create a new LV. If --trackchanges is also specified,\n"
0d8a0a
-    "changes to the raid1 LV are tracked while the split LV remains detached.\n")
0d8a0a
+    "changes to the raid1 LV are tracked while the split LV remains detached.\n"
0d8a0a
+    "If --name is specified, then the images are permanently split from the\n"
0d8a0a
+    "original LV and changes are not tracked.\n")
0d8a0a
 
0d8a0a
 arg(splitsnapshot_ARG, '\0', "splitsnapshot", 0, 0, 0,
0d8a0a
     "Separates a COW snapshot from its origin LV. The LV that is split off\n"
0d8a0a
@@ -691,10 +693,12 @@ arg(thinpool_ARG, '\0', "thinpool", lv_VAL, 0, 0,
0d8a0a
 arg(trackchanges_ARG, '\0', "trackchanges", 0, 0, 0,
0d8a0a
     "Can be used with --splitmirrors on a raid1 LV. This causes\n"
0d8a0a
     "changes to the original raid1 LV to be tracked while the split images\n"
0d8a0a
-    "remain detached. This allows the read-only detached image(s) to be\n"
0d8a0a
-    "merged efficiently back into the raid1 LV later. Only the regions with\n"
0d8a0a
-    "changed data are resynchronized during merge. (This option only applies\n"
0d8a0a
-    "when using the raid1 LV type.)\n")
0d8a0a
+    "remain detached. This is a temporary state that allows the read-only\n"
0d8a0a
+    "detached image to be merged efficiently back into the raid1 LV later.\n"
0d8a0a
+    "Only the regions with changed data are resynchronized during merge.\n"
0d8a0a
+    "While a raid1 LV is tracking changes, operations on it are limited to\n"
0d8a0a
+    "merging the split image (see --mergemirrors) or permanently splitting\n"
0d8a0a
+    "the image (see --splitmirrors with --name.\n")
0d8a0a
 
0d8a0a
 /* TODO: hide this? */
0d8a0a
 arg(trustcache_ARG, '\0', "trustcache", 0, 0, 0,
0d8a0a
diff --git a/tools/command-lines.in b/tools/command-lines.in
0d8a0a
index b7aefa3..a8c06ba 100644
0d8a0a
--- a/tools/command-lines.in
0d8a0a
+++ b/tools/command-lines.in
0d8a0a
@@ -399,7 +399,7 @@ lvconvert --splitmirrors Number --trackchanges LV_raid1_cache
0d8a0a
 OO: OO_LVCONVERT
0d8a0a
 OP: PV ...
0d8a0a
 ID: lvconvert_split_mirror_images
0d8a0a
-DESC: Split images from a raid1 LV and track changes to origin.
0d8a0a
+DESC: Split images from a raid1 LV and track changes to origin for later merge.
0d8a0a
 RULE: all not lv_is_locked lv_is_pvmove
0d8a0a
 
0d8a0a
 lvconvert --mergemirrors LV_linear_raid|VG|Tag ...