From 0ad95b77d0f3eb38bc678bf15ecb899e109287cc Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 23 Nov 2016 17:11:26 +0100 Subject: [PATCH] mirror: preserve MIRRORED status for temporara image When lvconvert adds a new leg - it's doing it free 'temporary' image layer - however this temporary 'internal' mirror is also MIRRORED LV. But the status bit was not properly transfered through layer. --- WHATS_NEW | 1 + lib/metadata/mirror.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index b7a5e822b..40a9ef4d4 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.168 - ==================================== + Preserve mirrored status for temporary layered mirrors. Use transient raid check before repairing raid volume. Implement transient status check for raid volumes. Only log msg as debug if lvm2-lvmdbusd unit missing for D-Bus notification. diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c index da7be6c30..feb78a551 100644 --- a/lib/metadata/mirror.c +++ b/lib/metadata/mirror.c @@ -1883,7 +1883,9 @@ static int _form_mirror(struct cmd_context *cmd, struct alloc_handle *ah, return_0; if (!lv_add_mirror_lvs(lv, img_lvs, mirrors, - MIRROR_IMAGE | (lv->status & LOCKED), + /* Pass through MIRRORED & LOCKED status flag + * TODO: Any other would be needed ?? */ + MIRROR_IMAGE | (lv->status & (MIRRORED | LOCKED)), region_size)) { log_error("Aborting. Failed to add mirror segment. " "Remove new LV and retry.");