Blame SOURCES/lvm2-2_02_181-lvconvert-reject-conversions-of-LVs-under-snapshot.patch
|
|
0d8a0a |
tools/lvconvert.c | 6 ++++++
|
|
|
0d8a0a |
1 file changed, 6 insertions(+)
|
|
|
0d8a0a |
|
|
|
0d8a0a |
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
|
|
|
0d8a0a |
index 3ce228f..3fad02c 100644
|
|
|
0d8a0a |
--- a/tools/lvconvert.c
|
|
|
0d8a0a |
+++ b/tools/lvconvert.c
|
|
|
0d8a0a |
@@ -4256,6 +4256,12 @@ static int _lvconvert_to_pool_or_swap_metadata_single(struct cmd_context *cmd,
|
|
|
0d8a0a |
return 0;
|
|
|
0d8a0a |
};
|
|
|
0d8a0a |
|
|
|
0d8a0a |
+ if (lv_is_origin(lv)) {
|
|
|
0d8a0a |
+ log_error("Cannot convert logical volume %s under snapshot.",
|
|
|
0d8a0a |
+ display_lvname(lv));
|
|
|
0d8a0a |
+ return 0;
|
|
|
0d8a0a |
+ };
|
|
|
0d8a0a |
+
|
|
|
0d8a0a |
if (cmd->position_argc > 1) {
|
|
|
0d8a0a |
/* First pos arg is required LV, remaining are optional PVs. */
|
|
|
0d8a0a |
if (!(use_pvh = create_pv_list(cmd->mem, lv->vg, cmd->position_argc - 1, cmd->position_argv + 1, 0)))
|