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:
parent
2ba9fb4019
commit
deea86c7f4
6
lib/cache/lvmetad.c
vendored
6
lib/cache/lvmetad.c
vendored
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user