From d2524315e6e9ed6796555d8cafbaf56470260b11 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 3 Dec 2015 18:15:02 +0100 Subject: [PATCH] vgextend: reinstantiate archiving Since commit f5d06efbab4c7c77298b18b95c23111575a8db1a we lost archiving. Restore it now with process_each_vg. --- WHATS_NEW | 1 + tools/vgextend.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/WHATS_NEW b/WHATS_NEW index 49d1dd68e..4b337082e 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.137 - ===================================== + Restore archiving before changing metadata in vgextend (2.02.117). Dropped internal usage of log_suppress(2). Cleaned logging code for buffer size usage. Added internal id_read_format_try() function to check and read valid UUID. diff --git a/tools/vgextend.c b/tools/vgextend.c index a747113d2..761df7521 100644 --- a/tools/vgextend.c +++ b/tools/vgextend.c @@ -52,6 +52,9 @@ static int _vgextend_restoremissing(struct cmd_context *cmd __attribute__((unuse int fixed = 0; int i; + if (!archive(vg)) + return_0; + for (i = 0; i < vp->pv_count; i++) if (_restore_pv(vg, vp->pv_names[i])) fixed++; @@ -88,6 +91,9 @@ static int _vgextend_single(struct cmd_context *cmd, const char *vg_name, return ECMD_FAILED; } + if (!archive(vg)) + return_ECMD_FAILED; + if (!lock_vol(cmd, VG_ORPHANS, LCK_VG_WRITE, NULL)) { log_error("Can't get lock for orphan PVs"); return ECMD_FAILED;