1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-25 21:57:45 +03:00

pvscan --cache: Also read metadata from LVM1 PVs (BZ 863401).

This commit is contained in:
Petr Rockai 2012-10-10 21:49:40 +02:00
parent 2ba9fb4019
commit deea86c7f4
2 changed files with 7 additions and 0 deletions

6
lib/cache/lvmetad.c vendored
View File

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

View File

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