1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
LVM2 mirror repository https://sourceware.org/lvm2/
Go to file
Peter Rajnoha 52999133a3 pv: check for the PV_EXT_USED flag and deny pvcreate/pvchange/pvremove/vgcreate on such PV (unless forced)
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'.
2016-02-15 12:44:46 +01:00
autoconf autoconf: Update config.guess/sub to 2014-01-01. 2014-01-21 22:00:15 +00:00
conf conf: add metadata/check_pv_device_sizes 2016-01-22 14:16:00 +01:00
coverity doc: change fsf address 2016-01-21 12:11:37 +01:00
daemons lvmlockd: don't adopt locks from unused lm 2016-01-28 09:42:45 -06:00
doc doc: change fsf address 2016-01-21 12:11:37 +01:00
include doc: change fsf address 2016-01-21 12:11:37 +01:00
lib pv: check for the PV_EXT_USED flag and deny pvcreate/pvchange/pvremove/vgcreate on such PV (unless forced) 2016-02-15 12:44:46 +01:00
libdaemon doc: change fsf address 2016-01-21 12:11:37 +01:00
libdm dm: alloc always 8byte aligned 2016-02-11 18:35:05 +01:00
liblvm doc: change fsf address 2016-01-21 12:11:37 +01:00
man man: pvresize: remove old comment about inability to resize PV with more mdas 2016-02-12 16:29:47 +01:00
nix lockd: Clean up spec 2015-07-04 14:36:57 +02:00
old-tests doc: change fsf address 2016-01-21 12:11:37 +01:00
po doc: change fsf address 2016-01-21 12:11:37 +01:00
python doc: change fsf address 2016-01-21 12:11:37 +01:00
report-generators doc: change fsf address 2016-01-21 12:11:37 +01:00
reports [REPORT-GENERATORS] cut down stylsheet.css to what we actually use 2010-07-21 10:00:38 +00:00
scripts vgimportclone: fix VG name variable reference in error message after failed PV uuid change 2016-01-21 14:47:48 +01:00
spec doc: change fsf address 2016-01-21 12:11:37 +01:00
test man: pvresize: remove old comment about inability to resize PV with more mdas 2016-02-12 16:29:47 +01:00
tools pv: check for the PV_EXT_USED flag and deny pvcreate/pvchange/pvremove/vgcreate on such PV (unless forced) 2016-02-15 12:44:46 +01:00
udev doc: change fsf address 2016-01-21 12:11:37 +01:00
unit-tests doc: change fsf address 2016-01-21 12:11:37 +01:00
.gitignore gitignore: Update for in-place build. 2015-07-27 13:18:35 +01:00
acinclude.m4 configure: detect st_ctim 2015-03-18 13:42:24 +01:00
aclocal.m4 doc: change fsf address 2016-01-21 12:11:37 +01:00
configure configure: fix configure to set proper use_blkid_wiping if autodetected as disabled 2016-01-21 10:01:34 +01:00
configure.in doc: change fsf address 2016-01-21 12:11:37 +01:00
COPYING doc: change fsf address 2016-01-21 12:11:37 +01:00
COPYING.LIB Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
INSTALL quick review of docs 2008-11-04 17:49:22 +00:00
make.tmpl.in doc: change fsf address 2016-01-21 12:11:37 +01:00
Makefile.in doc: change fsf address 2016-01-21 12:11:37 +01:00
README README: fix link to lvm-devel mailing list 2015-03-31 15:44:00 +02:00
VERSION post-release 2016-02-15 10:48:55 +00:00
VERSION_DM post-release 2016-02-15 10:48:55 +00:00
WHATS_NEW post-release 2016-02-15 10:48:55 +00:00
WHATS_NEW_DM post-release 2016-02-15 10:48:55 +00:00

This tree contains the LVM2 and device-mapper tools and libraries.

For more information about LVM2 read the changelog in the WHATS_NEW file.
Installation instructions are in INSTALL.

There is no warranty - see COPYING and COPYING.LIB.

Tarballs are available from:
  ftp://sources.redhat.com/pub/lvm2/

The source code is stored in git:
  http://git.fedorahosted.org/git/lvm2.git
  git clone git://git.fedorahosted.org/git/lvm2.git

Mailing list for general discussion related to LVM2:
  linux-lvm@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/linux-lvm

Mailing lists for LVM2 development, patches and commits:
  lvm-devel@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/lvm-devel

  lvm2-commits@lists.fedorahosted.org (Read-only archive of commits)
  Subscribe from https://fedorahosted.org/mailman/listinfo/lvm2-commits

Mailing list for device-mapper development, including kernel patches
and multipath-tools:
  dm-devel@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/dm-devel

The source code repository used until 7th June 2012 is accessible here:
  http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/?cvsroot=lvm2.