diff options
author | Marian Csontos <mcsontos@redhat.com> | 2018-02-14 12:46:08 +0100 |
---|---|---|
committer | Marian Csontos <mcsontos@redhat.com> | 2018-02-14 12:53:51 +0100 |
commit | 604b4bef610b1984e85d818a7d7e243e30abea32 (patch) | |
tree | 44f99bb2af34ee63ed1c3279598fa0d89ebec421 | |
parent | 9e6313074a239c4ca47e41c21a9c26287b785b2d (diff) | |
download | lvm2-dev-mcsontos-mirrored-log.tar.gz |
mirror: Add deprecation warning for mirrored logdev-mcsontos-mirrored-log
-rw-r--r-- | lib/metadata/mirror.c | 4 | ||||
-rw-r--r-- | tools/lvconvert.c | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c index 38c3df679..71d3457bc 100644 --- a/lib/metadata/mirror.c +++ b/lib/metadata/mirror.c @@ -1945,6 +1945,10 @@ int add_mirror_log(struct cmd_context *cmd, struct logical_volume *lv, return 1; } + if (log_count > 1) { + log_warn("Log type \"mirrored\" is DEPRECATED and will be removed in the future. Use RAID1 LV or disk log instead."); + } + if (!(parallel_areas = build_parallel_areas_from_lv(lv, 0, 0))) return_0; diff --git a/tools/lvconvert.c b/tools/lvconvert.c index fee0a4ef8..e18ec236f 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -1216,6 +1216,11 @@ static int _lvconvert_mirrors(struct cmd_context *cmd, (old_log_count == new_log_count)) return 1; + if ((old_log_count != new_log_count) && + (new_log_count == MIRROR_LOG_MIRRORED)) { + log_warn("Log type \"mirrored\" is DEPRECATED and will be removed in the future. Use RAID1 LV or disk log instead."); + } + if (!_lvconvert_mirrors_aux(cmd, lv, lp, NULL, new_mimage_count, new_log_count, lp->pvh)) return_0; |