mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +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:
parent
b662f3c8dd
commit
ebac2ed5be
@ -111,6 +111,10 @@ static int __archive(struct volume_group *vg)
|
|||||||
|
|
||||||
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))
|
if (vg_is_archived(vg))
|
||||||
return 1; /* VG has been already archived */
|
return 1; /* VG has been already archived */
|
||||||
|
|
||||||
@ -251,6 +255,10 @@ int backup_locally(struct volume_group *vg)
|
|||||||
|
|
||||||
int backup(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 (vg_is_clustered(vg))
|
||||||
if (!remote_backup_metadata(vg))
|
if (!remote_backup_metadata(vg))
|
||||||
stack;
|
stack;
|
||||||
|
Loading…
Reference in New Issue
Block a user