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