1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib/metadata
Dave Wysochanski fddc256a02 Check for duplicate paths (pvids) on the commandline of vgcreate.
A user specifying duplicate paths on the cmdline of vgcreate will
get a message similar to the following:
vgcreate vgtest2 /dev/loop3 /dev/loop5
  Found duplicate PV jk1lXsKzwyOKlXq6bhaFFKMQQ06oPgu8: using /dev/loop5 not /dev/loop3
  Found duplicate PV jk1lXsKzwyOKlXq6bhaFFKMQQ06oPgu8: using /dev/loop3 not /dev/loop5
  Internal error: Duplicate PV id jk1lXs-Kzwy-OKlX-q6bh-aFFK-MQQ0-6oPgu8 detected for /dev/loop3 in vgtest2.

This is caught by vg_validate(), but it would be good to find
this condition earlier in the vgcreate code.  add_pv_to_vg()
currently checks by pvname, but does not look for duplcate pvids.
This patch adds the check for duplicate pvids and results in new
error output as follows:
vgcreate vgtest2 /dev/loop3 /dev/loop5
  Found duplicate PV jk1lXsKzwyOKlXq6bhaFFKMQQ06oPgu8: using /dev/loop5 not /dev/loop3
  Found duplicate PV jk1lXsKzwyOKlXq6bhaFFKMQQ06oPgu8: using /dev/loop3 not /dev/loop5
  Physical volume '/dev/loop5 (jk1lXs-Kzwy-OKlX-q6bh-aFFK-MQQ0-6oPgu8)' listed more than once.
  Unable to add physical volume '/dev/loop5' to volume group 'vgtest2'.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-04-08 15:18:35 +00:00
..
lv_alloc.h Fix pvmove allocation to take existing parallel stripes into account. 2010-04-08 00:28:57 +00:00
lv_manip.c missing ?: 2010-04-08 00:56:26 +00:00
merge.c Fix pvmove allocation to take existing parallel stripes into account. 2010-04-08 00:28:57 +00:00
metadata-exported.h Fix pvmove allocation to take existing parallel stripes into account. 2010-04-08 00:28:57 +00:00
metadata.c Check for duplicate paths (pvids) on the commandline of vgcreate. 2010-04-08 15:18:35 +00:00
metadata.h Add add_pvl_to_vgs() - helper function to add a pv to a vg list. 2010-04-06 14:04:54 +00:00
mirror.c Fix pvmove allocation to take existing parallel stripes into account. 2010-04-08 00:28:57 +00:00
pv_alloc.h Fix all segments memory is allocated from vg private mempool. 2010-03-31 17:23:18 +00:00
pv_manip.c Fix all segments memory is allocated from vg private mempool. 2010-03-31 17:23:18 +00:00
pv_map.c Allow ALLOC_ANYWHERE to split contiguous areas. 2010-03-25 21:19:26 +00:00
pv_map.h Allow ALLOC_ANYWHERE to split contiguous areas. 2010-03-25 21:19:26 +00:00
segtype.c Handle metadata with unknown segment types more gracefully. 2009-10-16 17:41:49 +00:00
segtype.h Improve target type compatibility checking in _percent_run(). 2010-01-15 16:35:26 +00:00
snapshot_manip.c Refactor snapshot-merge deptree and device removal to support info-by-uuid 2010-02-17 22:59:46 +00:00