1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

pvresize: Avoid archiving orphan VG metadata.

Block creations of archive and backup files for internal orphan VGs.

Bug introduced by 603b45e0ed ("pvresize: Do
not use pv_read (get the PV from orphan VG).")
This commit is contained in:
Alasdair G Kergon 2014-01-16 23:02:59 +00:00
parent b662f3c8dd
commit ebac2ed5be

View File

@ -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;