mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvmetad: Mark PVs visible to lvmetad but not to us as MISSING.
This commit is contained in:
parent
6ac4cba276
commit
00ed6759c8
6
lib/cache/lvmetad.c
vendored
6
lib/cache/lvmetad.c
vendored
@ -387,14 +387,18 @@ struct volume_group *lvmetad_vg_lookup(struct cmd_context *cmd, const char *vgna
|
||||
if ((info = lvmcache_info_from_pvid((const char *)&pvl->pv->id, 0))) {
|
||||
pvl->pv->label_sector = lvmcache_get_label(info)->sector;
|
||||
pvl->pv->dev = lvmcache_device(info);
|
||||
if (!pvl->pv->dev)
|
||||
pvl->pv->status |= MISSING_PV;
|
||||
if (!lvmcache_fid_add_mdas_pv(info, fid)) {
|
||||
vg = NULL;
|
||||
goto_out; /* FIXME error path */
|
||||
}
|
||||
} /* else probably missing */
|
||||
} else
|
||||
pvl->pv->status |= MISSING_PV; /* probably missing */
|
||||
}
|
||||
|
||||
lvmcache_update_vg(vg, 0);
|
||||
vg_mark_partial_lvs(vg, 1);
|
||||
}
|
||||
|
||||
out:
|
||||
|
19
test/shell/lvcreate-missing.sh
Normal file
19
test/shell/lvcreate-missing.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing to use,
|
||||
# modify, copy, or redistribute it subject to the terms and conditions
|
||||
# of the GNU General Public License v.2.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/test
|
||||
|
||||
aux prepare_vg 2
|
||||
init_udev_transaction
|
||||
dmsetup remove -f "$dev1" || true
|
||||
finish_udev_transaction
|
||||
|
||||
not lvcreate -n "foo" $vg -l 1
|
Loading…
Reference in New Issue
Block a user