master - pvscan --cache: Also read metadata from LVM1 PVs (BZ 863401).
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=deea86c7f49ea825608826e29b56a005e2c9e747 Commit: deea86c7f49ea825608826e29b56a005e2c9e747 Parent: 2ba9fb4019f737783606d886b96db59570850937 Author: Petr Rockai <[email protected]> AuthorDate: Wed Oct 10 21:49:40 2012 +0200 Committer: Petr Rockai <[email protected]> CommitterDate: Wed Oct 10 21:55:24 2012 +0200
pvscan --cache: Also read metadata from LVM1 PVs (BZ 863401).
--- lib/cache/lvmetad.c | 6 ++++++ test/shell/lvmetad-lvm1.sh | 1 + 2 files changed, 7 insertions(+), 0 deletions(-)
lib/cache/lvmetad.c +6 -0
@@ -823,6 +823,12 @@ int lvmetad_pvscan_single(struct cmd_context *cmd, struct device *dev, goto_bad;lvmcache_foreach_mda (info, _lvmetad_pvscan_single, &baton); + +/* LVM1 VGs have no MDAs. */ +if (!baton.vg &&lvmcache_fmt (info) ==get_format_by_name (cmd,"lvm1" )) + baton.vg = ((struct metadata_area *)dm_list_first (&baton.fid->metadata_areas_in_use))-> + ops->vg_read (baton.fid,lvmcache_vgname_from_info (info),NULL ,0 ); +if (!baton.vg)lvmcache_fmt (info)->ops->destroy_instance (baton.fid);
test/shell/lvmetad-lvm1.sh +1 -0
@@ -17,5 +17,6 @@ pvcreate --metadatatype 1 $dev1 vgscan --cache pvs | grep $dev1 vgcreate --metadatatype 1 $vg1 $dev1 +vgscan --cache vgs | grep $vg1 pvs | grep $dev1