summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2014-01-16 23:02:59 +0000
committerAlasdair G Kergon <agk@redhat.com>2014-01-16 23:02:59 +0000
commitebac2ed5be9ba2bd4c606209f1a9396e32dafe88 (patch)
tree510206b05faa4b15c3b2ed986d22134a496d1bb3
parentb662f3c8dd52f489a8f5b5eeb69bc37ea40ff768 (diff)
downloadlvm2-ebac2ed5be9ba2bd4c606209f1a9396e32dafe88.tar.gz
pvresize: Avoid archiving orphan VG metadata.
Block creations of archive and backup files for internal orphan VGs. Bug introduced by 603b45e0ed1032875f587eda3391c47b6652303c ("pvresize: Do not use pv_read (get the PV from orphan VG).")
-rw-r--r--lib/format_text/archiver.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/format_text/archiver.c b/lib/format_text/archiver.c
index c1fe3f583..31d17efce 100644
--- a/lib/format_text/archiver.c
+++ b/lib/format_text/archiver.c
@@ -111,6 +111,10 @@ static int __archive(struct volume_group *vg)
int archive(struct volume_group *vg)
{
+ /* Don't archive orphan VGs. */
+ if (is_orphan_vg(vg->name))
+ return 1;
+
if (vg_is_archived(vg))
return 1; /* VG has been already archived */
@@ -251,6 +255,10 @@ int backup_locally(struct volume_group *vg)
int backup(struct volume_group *vg)
{
+ /* Don't back up orphan VGs. */
+ if (is_orphan_vg(vg->name))
+ return 1;
+
if (vg_is_clustered(vg))
if (!remote_backup_metadata(vg))
stack;