mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-09 01:18:39 +03:00
52999133a3
Make sure we won't use a PV that is already marked as used. Normally, VG metadata would stop us from doing that, but we can run into a situation where such metadata is missing because PVs with MDAs are missing and the PVs left are the ones with 0 MDAs. (/dev/sda in this example has 0 MDAs and it belongs to a VG, but other PVs with MDA are missing) $ pvs -o pv_name,pv_mda_count /dev/sda PV #PMda /dev/sda 0 $ pvcreate /dev/sda PV '/dev/sda' is marked as belonging to a VG but its metadata is missing. Can't initialize PV '/dev/sda' without -ff. $ pvchange -u /dev/sda PV '/dev/sda' is marked as belonging to a VG but its metadata is missing. Can't change PV '/dev/sda' without -ff. Physical volume /dev/sda not changed 0 physical volumes changed / 1 physical volume not changed $ pvremove /dev/sda PV '/dev/sda' is marked as belonging to a VG but its metadata is missing. (If you are certain you need pvremove, then confirm by using --force twice.) $ vgcreate vg /dev/sda Physical volume '/dev/sda' is marked as belonging to a VG but its metadata is missing. Unable to add physical volume '/dev/sda' to volume group 'vg'. |
||
---|---|---|
.. | ||
cache_manip.c | ||
lv_alloc.h | ||
lv_manip.c | ||
lv.c | ||
lv.h | ||
merge.c | ||
metadata-exported.h | ||
metadata.c | ||
metadata.h | ||
mirror.c | ||
pool_manip.c | ||
pv_alloc.h | ||
pv_manip.c | ||
pv_map.c | ||
pv_map.h | ||
pv.c | ||
pv.h | ||
raid_manip.c | ||
replicator_manip.c | ||
segtype.c | ||
segtype.h | ||
snapshot_manip.c | ||
thin_manip.c | ||
vg.c | ||
vg.h |