Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=cdd17eee377013a5…
Commit: cdd17eee377013a569e2aeed0cbe865749323def
Parent: 8804023825e9eb00df653a7c5116097d1ce49087
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Wed Jan 14 13:41:55 2015 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jan 14 13:41:55 2015 +0100
raid_manip: fix multi-segment misallocation on 'lvconvert --repair'
An 'lvconvert --repair $RAID_LV" to replace a failed leg of a multi-segment
RAID10/4/5/6 logical volume can lead to allocation of (parts of) the replacement
image component pair on the physical volume of another image component
(e.g. image 0 allocated on the same PV as image 1 silently impeding resilience).
Patch fixes this severe resilince issue by prohibiting allocation on PVs
already holding other legs of the RAID set. It allows to allocate free space
on any operational PV already holding parts of the image component pair.
---
WHATS_NEW | 1 +
lib/metadata/raid_manip.c | 25 +++++++++++++++++++++++++
2 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index e295e6c..bbb45c4 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.115 -
=====================================
+ Fix lvconvert --repair to honour resilience requirement for segmented RAID LV.
Filter out partitioned device-mapper devices as unsuitable for use as PVs.
Also notify lvmetad about filtered device if using pvscan --cache DevicePath.
Use LVM's own selection instead of awk expressions in clvmd startup scripts.
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 6f951f4..cb0366f 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -1545,6 +1545,28 @@ has_enough_space:
return 1;
}
+static int _avoid_pvs_of_lv(struct logical_volume *lv, void *data)
+{
+ struct dm_list *allocate_pvs = (struct dm_list *) data;
+ struct pv_list *pvl;
+
+ dm_list_iterate_items(pvl, allocate_pvs)
+ if (!(lv->status & PARTIAL_LV) &&
+ lv_is_on_pv(lv, pvl->pv))
+ pvl->pv->status &= ~ALLOCATABLE_PV;
+
+ return 1;
+ }
+
+/*
+ * Prevent any PVs holding other image components of @lv from being used for allocation,
+ * I.e. reset ALLOCATABLE_PV on respective PVs listed on @allocatable_pvs
+ */
+static void _avoid_pvs_with_other_images_of_lv(struct logical_volume *lv, struct dm_list *allocate_pvs)
+{
+ for_each_sub_lv(lv, _avoid_pvs_of_lv, allocate_pvs);
+}
+
/*
* lv_raid_replace
* @lv
@@ -1643,6 +1665,9 @@ int lv_raid_replace(struct logical_volume *lv,
}
}
+ /* Prevent any PVs holding image components from being used for allocation */
+ _avoid_pvs_with_other_images_of_lv(lv, allocate_pvs);
+
/*
* Allocate the new image components first
* - This makes it easy to avoid all currently used devs
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8804023825e9eb00…
Commit: 8804023825e9eb00df653a7c5116097d1ce49087
Parent: 99d895014d971395fe7a739838952e7405eb4dda
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Mon Jan 12 15:16:57 2015 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Mon Jan 12 15:16:57 2015 +0100
tests: pvscan --cache DevicePath does not fail if the device is just filtered
It's not an error if the device is filtered out and hence cleared from
lvmetad cache - "pvscan --cache DevPath" has now the same behaviour in
this case as "pvscan --cache major:minor" (which is more consistent).
Before, the tests expected failure return code for "pvscan --cache DevicePath"
if the device was filtered (which is a different situation if the device
is missing in the system completely!).
---
test/shell/lvmetad-pvscan-filter.sh | 4 +++-
test/shell/lvmetad-pvscan-md.sh | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/test/shell/lvmetad-pvscan-filter.sh b/test/shell/lvmetad-pvscan-filter.sh
index a3af1b2..05666df 100644
--- a/test/shell/lvmetad-pvscan-filter.sh
+++ b/test/shell/lvmetad-pvscan-filter.sh
@@ -18,8 +18,10 @@ aux prepare_pvs 2
maj=$(($(stat -L --printf=0x%t "$dev2")))
min=$(($(stat -L --printf=0x%T "$dev2")))
+# Filter out device, pvscan should trigger
+# clearing of the device from lvmetad cache.
aux hide_dev "$dev2"
-not pvscan --cache "$dev2" 2>&1 | grep "not found"
+pvscan --cache "$dev2" 2>&1 | grep "not found"
# pvscan with --major/--minor does not fail: lvmetad needs to
# be notified about device removal on REMOVE uevent, hence
# this should not fail so udev does not grab a "failed" state
diff --git a/test/shell/lvmetad-pvscan-md.sh b/test/shell/lvmetad-pvscan-md.sh
index 449369d..653d18a 100644
--- a/test/shell/lvmetad-pvscan-md.sh
+++ b/test/shell/lvmetad-pvscan-md.sh
@@ -69,8 +69,8 @@ pvcreate $lvmdev
pvscan --cache "$lvmdev"
# ensure that lvmetad can only see the toplevel MD device
-not pvscan --cache "$dev1" 2>&1 | grep "not found"
-not pvscan --cache "$dev2" 2>&1 | grep "not found"
+pvscan --cache "$dev1" 2>&1 | grep "not found"
+pvscan --cache "$dev2" 2>&1 | grep "not found"
pvs | grep $lvmdev
pvs | not grep "$dev1"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=99d895014d971395…
Commit: 99d895014d971395fe7a739838952e7405eb4dda
Parent: 8dbe76734049a225a34bbbab383418b62acdcce1
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Mon Jan 12 14:02:57 2015 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Mon Jan 12 14:10:44 2015 +0100
dev-type: filter out partitioned device-mapper devices as unsuitable for use as PVs
Normally, if there are partitions defined on top of device-mapper
device, there should be a device-mapper device created for each
partiton on top of the old one and once the underlying DM device
is used by another devices (partition mappings in this case),
it can't be used as a PV anymore.
However, sometimes, it may happen the partition mappings are
missing - either the partitioning tool is not creating them if
it does not contain full support for device-mapper devices or
the mappings were removed.
Better safe than sorry - check for partition header on DM devs
and filter them out as unsuitable for PVs in case the check is
positive. Whatever the user is doing, let's do our best to prevent
unwanted corruption (...by running pvcreate on top of such device
that would corrupt the partition header).
---
WHATS_NEW | 1 +
lib/device/dev-type.c | 3 +++
test/shell/test-partition.sh | 3 ++-
3 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 11611dd..e295e6c 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.115 -
=====================================
+ Filter out partitioned device-mapper devices as unsuitable for use as PVs.
Also notify lvmetad about filtered device if using pvscan --cache DevicePath.
Use LVM's own selection instead of awk expressions in clvmd startup scripts.
Do not filter out snapshot origin LVs as unusable devices for an LVM stack.
diff --git a/lib/device/dev-type.c b/lib/device/dev-type.c
index 001248d..a84f7e9 100644
--- a/lib/device/dev-type.c
+++ b/lib/device/dev-type.c
@@ -272,6 +272,9 @@ static int _is_partitionable(struct dev_types *dt, struct device *dev)
{
int parts = major_max_partitions(dt, MAJOR(dev->dev));
+ if (MAJOR(dev->dev) == dt->device_mapper_major)
+ return 1;
+
/* All MD devices are partitionable via blkext (as of 2.6.28) */
if (MAJOR(dev->dev) == dt->md_major)
return 1;
diff --git a/test/shell/test-partition.sh b/test/shell/test-partition.sh
index af04b4e..e79216e 100644
--- a/test/shell/test-partition.sh
+++ b/test/shell/test-partition.sh
@@ -28,4 +28,5 @@ pvs "$dev1"
# create small partition table
echo "1 2" | sfdisk "$dev1"
-pvs "$dev1"
+aux notify_lvmetad "$dev1"
+not pvs "$dev1"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8dbe76734049a225…
Commit: 8dbe76734049a225a34bbbab383418b62acdcce1
Parent: 1e4a4d48aeb1e56a8df19ba73425eb5f7632c9d2
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Mon Jan 12 13:50:11 2015 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Mon Jan 12 13:59:51 2015 +0100
pvscan: notify lvmetad about device that is gone and pvscan is run with device path instead of major:minor pair
If pvscan is run with device path instead of major:minor pair and this
device still exists in the system and the device is not visible anymore
(due to a filter that is applied), notify lvmetad properly about this.
This makes it more consistent with respect to existing pvscan with
major:minor which already notifies lvmetad about device that is gone
due to filters.
However, if the device is not in the system anymore, we're not able
to translate the original device path into major:minor pair which
lvmetad needs for its action (lvmetad_pv_gone fn). So in this case,
we still need to use major:minor pair only, not device path. But at
least make "pvscan --cache DevicePath" as near as possible to "pvscan
--cahce <major>:<minor>" functionality.
Also add a note to pvscan man page about this difference when using
pvscan --cache with DevicePath and major:minor pair.
---
WHATS_NEW | 1 +
man/pvscan.8.in | 8 ++++++--
tools/pvscan.c | 13 +++++++++++--
3 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 242c17d..11611dd 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.115 -
=====================================
+ Also notify lvmetad about filtered device if using pvscan --cache DevicePath.
Use LVM's own selection instead of awk expressions in clvmd startup scripts.
Do not filter out snapshot origin LVs as unusable devices for an LVM stack.
Fix incorrect rimage names when converting from mirror to raid1 LV (2.02.112).
diff --git a/man/pvscan.8.in b/man/pvscan.8.in
index c1187ac..f976b40 100644
--- a/man/pvscan.8.in
+++ b/man/pvscan.8.in
@@ -69,8 +69,12 @@ If lvmetad has not yet cached any metadata or the filters have recently been
changed, then all devices may be scanned, effectively ignoring the rest of
the command line. Otherwise, if all the devices referenced on the command line
contain metadata in the default lvm2 format, other devices are not accessed.
-If metadata written using the obsolete GFS pool format is encountered, this is
-ignored and so lvmetad should not be used.
+If metadata written using the obsolete GFS pool or lvm1 format is encountered,
+this is ignored and so lvmetad should not be used.
+To notify lvmetad about a device that is not present in the system anymore,
+\fB\-\-major\fP and \fB\-\-minor\fP pair of that device must be always supplied,
+not \fBDevicePath\fP as pvscan is not able to translate the \fBDevicePath\fP
+into major and minor pair which lvmetad requires.
.SH SEE ALSO
.BR lvm (8),
.BR lvmetad (8),
diff --git a/tools/pvscan.c b/tools/pvscan.c
index 3eaf0bb..4ab2ff7 100644
--- a/tools/pvscan.c
+++ b/tools/pvscan.c
@@ -239,8 +239,17 @@ static int _pvscan_lvmetad(struct cmd_context *cmd, int argc, char **argv)
if (pv_name[0] == '/') {
/* device path */
if (!(dev = dev_cache_get(pv_name, cmd->lvmetad_filter))) {
- log_error("Physical Volume %s not found.", pv_name);
- ret = ECMD_FAILED;
+ if ((dev = dev_cache_get(pv_name, NULL))) {
+ if (!_clear_dev_from_lvmetad_cache(dev->dev, MAJOR(dev->dev), MINOR(dev->dev), handler)) {
+ stack;
+ ret = ECMD_FAILED;
+ break;
+ }
+ } else {
+ log_error("Physical Volume %s not found.", pv_name);
+ ret = ECMD_FAILED;
+ break;
+ }
continue;
}
}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1e4a4d48aeb1e56a…
Commit: 1e4a4d48aeb1e56a8df19ba73425eb5f7632c9d2
Parent: 6a77b6f43c7c9a90210bb90be55c4060e612106d
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Jan 7 14:04:12 2015 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Jan 9 10:03:31 2015 -0600
toollib: process_each_pv should match by device
When processing PVs specified on the command line, the arg
name was being matched against pv_dev_name, which will not
always work:
- The PV specified on the command line could be an alias,
e.g. /dev/disk/by-id/...
- The PV specified on the command line could be any random
path to the device, e.g. /dev/../dev/sdb
To fix this, first resolve the named PV args to struct device's,
then iterate through the devices for processing.
---
tools/toollib.c | 96 +++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 72 insertions(+), 24 deletions(-)
diff --git a/tools/toollib.c b/tools/toollib.c
index 41e6f88..1b3883e 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -2074,6 +2074,31 @@ static int _get_arg_pvnames(struct cmd_context *cmd,
return ret_max;
}
+static int _get_arg_devices(struct cmd_context *cmd,
+ struct dm_list *arg_pvnames,
+ struct dm_list *arg_devices)
+{
+ struct dm_str_list *sl;
+ struct device_list *devl;
+ int ret_max = ECMD_PROCESSED;
+
+ dm_list_iterate_items(sl, arg_pvnames) {
+ if (!(devl = dm_pool_alloc(cmd->mem, sizeof(*devl)))) {
+ log_error("device_list alloc failed.");
+ return ECMD_FAILED;
+ }
+
+ if (!(devl->dev = dev_cache_get(sl->str, cmd->filter))) {
+ log_error("Failed to find physical volume \"%s\".", sl->str);
+ ret_max = ECMD_FAILED;
+ } else {
+ dm_list_add(arg_devices, &devl->list);
+ }
+ }
+
+ return ret_max;
+}
+
static int _get_all_devices(struct cmd_context *cmd, struct dm_list *all_devices)
{
struct dev_iter *iter;
@@ -2118,6 +2143,18 @@ static int _device_list_remove(struct dm_list *all_devices, struct device *dev)
return 0;
}
+static int _device_list_match(struct dm_list *devices, struct device *dev)
+{
+ struct device_list *devl;
+
+ dm_list_iterate_items(devl, devices) {
+ if (devl->dev == dev)
+ return 1;
+ }
+
+ return 0;
+}
+
static int _process_device_list(struct cmd_context *cmd, struct dm_list *all_devices,
void *handle, process_single_pv_fn_t process_single_pv)
{
@@ -2155,7 +2192,7 @@ static int _process_device_list(struct cmd_context *cmd, struct dm_list *all_dev
static int _process_pvs_in_vg(struct cmd_context *cmd,
struct volume_group *vg,
struct dm_list *all_devices,
- struct dm_list *arg_pvnames,
+ struct dm_list *arg_devices,
struct dm_list *arg_tags,
int process_all,
int skip,
@@ -2179,11 +2216,12 @@ static int _process_pvs_in_vg(struct cmd_context *cmd,
process_pv = process_all;
- /* Remove each pvname as it is processed. */
- if (!process_pv && !dm_list_empty(arg_pvnames) &&
- str_list_match_item(arg_pvnames, pv_name)) {
+ /* Remove each arg_devices entry as it is processed. */
+
+ if (!process_pv && !dm_list_empty(arg_devices) &&
+ _device_list_match(arg_devices, pv->dev)) {
process_pv = 1;
- str_list_del(arg_pvnames, pv_name);
+ _device_list_remove(arg_devices, pv->dev);
}
if (!process_pv && !dm_list_empty(arg_tags) &&
@@ -2222,10 +2260,9 @@ static int _process_pvs_in_vg(struct cmd_context *cmd,
}
/*
- * When processing only specific PV names, we can quit
- * once they've all been found.
+ * When processing only specific PVs, we can quit once they've all been found.
*/
- if (!process_all && dm_list_empty(arg_tags) && dm_list_empty(arg_pvnames))
+ if (!process_all && dm_list_empty(arg_tags) && dm_list_empty(arg_devices))
break;
}
@@ -2234,19 +2271,19 @@ static int _process_pvs_in_vg(struct cmd_context *cmd,
/*
* Iterate through all PVs in each listed VG. Process a PV if
- * the name or tag matches arg_pvnames or arg_tags. If both
- * arg_pvnames and arg_tags are empty, then process all PVs.
+ * its dev or tag matches arg_devices or arg_tags. If both
+ * arg_devices and arg_tags are empty, then process all PVs.
* No PV should be processed more than once.
*
- * Each PV is removed from arg_pvnames and all_devices when it is
- * processed. Any names remaining in arg_pvnames were not found, and
+ * Each PV is removed from arg_devices and all_devices when it is
+ * processed. Any names remaining in arg_devices were not found, and
* should produce an error. Any devices remaining in all_devices were
* not found and should be processed by process_all_devices().
*/
static int _process_pvs_in_vgs(struct cmd_context *cmd, uint32_t flags,
struct dm_list *all_vgnameids,
struct dm_list *all_devices,
- struct dm_list *arg_pvnames,
+ struct dm_list *arg_devices,
struct dm_list *arg_tags,
int process_all,
void *handle,
@@ -2254,7 +2291,6 @@ static int _process_pvs_in_vgs(struct cmd_context *cmd, uint32_t flags,
{
struct volume_group *vg;
struct vgnameid_list *vgnl;
- struct dm_str_list *sl;
const char *vg_name;
const char *vg_uuid;
int ret_max = ECMD_PROCESSED;
@@ -2282,7 +2318,7 @@ static int _process_pvs_in_vgs(struct cmd_context *cmd, uint32_t flags,
* vg->pvs entries from devices list.
*/
- ret = _process_pvs_in_vg(cmd, vg, all_devices, arg_pvnames, arg_tags,
+ ret = _process_pvs_in_vg(cmd, vg, all_devices, arg_devices, arg_tags,
process_all, skip, handle, process_single_pv);
if (ret != ECMD_PROCESSED)
stack;
@@ -2295,16 +2331,10 @@ static int _process_pvs_in_vgs(struct cmd_context *cmd, uint32_t flags,
unlock_and_release_vg(cmd, vg, vg->name);
/* Quit early when possible. */
- if (!process_all && dm_list_empty(arg_tags) && dm_list_empty(arg_pvnames))
+ if (!process_all && dm_list_empty(arg_tags) && dm_list_empty(arg_devices))
return ret_max;
}
- /* Return an error if a pvname arg was not found. */
- dm_list_iterate_items(sl, arg_pvnames) {
- log_error("Failed to find physical volume \"%s\".", sl->str);
- ret_max = ECMD_FAILED;
- }
-
return ret_max;
}
@@ -2317,8 +2347,10 @@ int process_each_pv(struct cmd_context *cmd,
{
struct dm_list arg_tags; /* str_list */
struct dm_list arg_pvnames; /* str_list */
+ struct dm_list arg_devices; /* device_list */
struct dm_list all_vgnameids; /* vgnameid_list */
struct dm_list all_devices; /* device_list */
+ struct device_list *devl;
int process_all_pvs;
int process_all_devices;
int ret_max = ECMD_PROCESSED;
@@ -2326,6 +2358,7 @@ int process_each_pv(struct cmd_context *cmd,
dm_list_init(&arg_tags);
dm_list_init(&arg_pvnames);
+ dm_list_init(&arg_devices);
dm_list_init(&all_vgnameids);
dm_list_init(&all_devices);
@@ -2333,9 +2366,14 @@ int process_each_pv(struct cmd_context *cmd,
* Create two lists from argv:
* arg_pvnames: pvs explicitly named in argv
* arg_tags: tags explicitly named in argv
+ *
+ * Then convert arg_pvnames, which are free-form, user-specified,
+ * names/paths into arg_devices which can be used to match below.
*/
- if ((ret = _get_arg_pvnames(cmd, argc, argv, &arg_pvnames, &arg_tags)) != ECMD_PROCESSED)
+ if ((ret = _get_arg_pvnames(cmd, argc, argv, &arg_pvnames, &arg_tags)) != ECMD_PROCESSED) {
+ stack;
return ret;
+ }
process_all_pvs = dm_list_empty(&arg_pvnames) && dm_list_empty(&arg_tags);
@@ -2343,6 +2381,11 @@ int process_each_pv(struct cmd_context *cmd,
(cmd->command->flags & ENABLE_ALL_DEVS) &&
arg_count(cmd, all_ARG);
+ if ((ret = _get_arg_devices(cmd, &arg_pvnames, &arg_devices) != ECMD_PROCESSED)) {
+ /* get_arg_devices reports the error for any PV names not found. */
+ ret_max = ECMD_FAILED;
+ }
+
/*
* If the caller wants to process all devices (not just PVs), then all PVs
* from all VGs are processed first, removing them from all_devices. Then
@@ -2359,13 +2402,18 @@ int process_each_pv(struct cmd_context *cmd,
}
ret = _process_pvs_in_vgs(cmd, flags, &all_vgnameids, &all_devices,
- &arg_pvnames, &arg_tags, process_all_pvs,
+ &arg_devices, &arg_tags, process_all_pvs,
handle, process_single_pv);
if (ret != ECMD_PROCESSED)
stack;
if (ret > ret_max)
ret_max = ret;
+ dm_list_iterate_items(devl, &arg_devices) {
+ log_error("Failed to find physical volume \"%s\".", dev_name(devl->dev));
+ ret_max = ECMD_FAILED;
+ }
+
if (!process_all_devices)
goto out;
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=fb7e2ff49368e547…
Commit: fb7e2ff49368e547d597baf263e8cb7cca8b63fb
Parent: db7351d3133e237db01361fed8efd6b0fac85c32
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Fri Jan 9 14:04:44 2015 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Jan 9 14:04:44 2015 +0100
metadata: add "Failed to write VG <vg_name>." on failed vg_write and revert previous patch
Better than previous patch which changed log_warn to log_error -
we can have multiple MDAs and if one of them fails to be written,
we can still continue with other MDAs if we're in a mode where
we can handle missing PVs - so keep the log_warn for single
failed MDA write as it was before.
However, add log_error with "Failed to write VG <vg_name>." in
case we're not handling missing PVs or no MDA was written at all
during VG write process. This also prevents an internal error in
which the vg_write fails and we're not issuing any other log_error
in vg_write caller or above, so we end up with:
"Internal error: Failed command did not use log_error".
---
lib/metadata/metadata.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 39bd325..465eb84 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -2795,7 +2795,7 @@ int vg_write(struct volume_group *vg)
}
if (!mda->ops->vg_write(vg->fid, vg, mda)) {
if (vg->cmd->handles_missing_pvs) {
- log_error("Failed to write an MDA of VG %s.", vg->name);
+ log_warn("WARNING: Failed to write an MDA of VG %s.", vg->name);
mda->status |= MDA_FAILED;
} else {
stack;
@@ -2807,6 +2807,7 @@ int vg_write(struct volume_group *vg)
}
if (revert || !wrote) {
+ log_error("Failed to write VG %s.", vg->name);
dm_list_uniterate(mdah, &vg->fid->metadata_areas_in_use, &mda->list) {
mda = dm_list_item(mdah, struct metadata_area);