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
David Teigland 6ab2a22fcf lvremove: fix failed remove of all LVs in shared VG
commit a125a3bb50 "lv_remove: reduce commits for removed LVs"
changed "lvremove <vgname>" from removing one LV at a time,
to removing all LVs in one vg write/commit.  It also changed
the behavior if some of the LVs could not be removed, from
removing those LVs that could be removed, to removing nothing
if any LV could not be removed.  This caused a regression in
shared VGs using sanlock, in which the on-disk lease was
removed for any LV that could be removed, even if the command
decided to remove nothing.  This would leave LVs without a
valid ondisk lease, and "lock failed: error -221" would be
returned for any command attempting to lock the LV.

Fix this by not freeing the on-disk leases until after the
command has decided to go ahead and remove everything, and
has written the VG metadata.

Before the fix:

node1: lvchange -ay vg/lv1
node2: lvchange -ay vg/lv2

node1: lvs
  lv1  test -wi-a----- 4.00m
  lv2  test -wi------- 4.00m
node2: lvs
  lv1  test -wi------- 4.00m
  lv2  test -wi-a----- 4.00m

node1: lvremove -y vg/lv1 vg/lv2
  LV locked by other host: vg/lv2

(lvremove removed neither of the LVs, but it freed
the lock for lv1, which could have been removed
except for the proper locking failure on lv2.)

node1: lvs
  lv1  test -wi------- 4.00m
  lv2  test -wi------- 4.00m

node1: lvremove -y vg/lv1
LV vg/lv1 lock failed: error -221

(The lock for lv1 is gone, so nothing can be done with it.)
2024-10-16 13:18:14 -05:00
autoconf autoconf: update py-compile 2023-07-12 15:18:38 +02:00
base cleanup: typos in comments 2024-08-30 16:51:15 +02:00
conf make: generate 2024-09-30 15:00:03 +02:00
coverity cleanup: typos in comments 2024-08-30 16:51:15 +02:00
daemons lvmdbusd: Fix Python script 2024-10-02 11:34:22 +00:00
device_mapper cleanup: typos in libdm 2024-09-27 13:42:45 +02:00
doc pre-release 2024-10-02 14:21:09 +02:00
include configure.ac: define DEFAULT_PROC_DIR in one place 2024-04-15 13:38:44 +02:00
lib lvremove: fix failed remove of all LVs in shared VG 2024-10-16 13:18:14 -05:00
libdaemon cleanup: typos in comments 2024-08-30 16:51:15 +02:00
libdm cleanup: typos in libdm 2024-09-27 13:42:45 +02:00
man make: generate 2024-09-30 15:00:03 +02:00
nix lockd: Clean up spec 2015-07-04 14:36:57 +02:00
po makefiles: fix pofile generation 2021-03-02 22:54:40 +01:00
scripts scripts: Fix ConditionPathExists in unit files 2024-09-04 14:40:58 +02:00
spec [WIP] Disable dlm for RHEL10 2024-10-02 13:48:11 +02:00
test tests: also test swap devices in lvresize-fs.sh 2024-10-02 13:31:54 +02:00
tools lvremove: fix failed remove of all LVs in shared VG 2024-10-16 13:18:14 -05:00
udev cleanup: typos in comments 2024-08-30 16:51:15 +02:00
.gitignore gitignore: update 2024-08-13 11:17:57 +02:00
.gitlab-ci.yml pages: Use gitlab pages and ikiwiki for doc 2024-05-16 12:00:26 +02:00
acinclude.m4 acinclude.m4: add local copy of PKG_CHECK_VAR 2023-02-13 14:30:46 +01:00
aclocal.m4 configure: autoreconf 2024-08-30 16:51:15 +02:00
configure configure: autoreconf 2024-08-30 16:51:15 +02:00
configure.ac cleanup: typos in configure.ac 2024-08-30 16:51:15 +02:00
COPYING doc: change fsf address 2016-01-21 12:11:37 +01:00
COPYING.BSD Add BSD 2-Clause License 2018-07-27 17:09:46 +02:00
COPYING.LIB Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
ikiwiki.setup pages: Use gitlab pages and ikiwiki for doc 2024-05-16 12:00:26 +02:00
INSTALL quick review of docs 2008-11-04 17:49:22 +00:00
make.tmpl.in cleanup: typos in comments 2024-08-30 16:51:15 +02:00
Makefile.in makefiles: add libdm as deps for unit-test 2024-04-08 22:24:18 +02:00
README README: remove old branch names 2024-05-29 09:30:41 -05:00
TESTING doc: Update TESTING file 2024-05-16 11:32:43 +02:00
VERSION post-release 2024-10-02 14:21:43 +02:00
VERSION_DM post-release 2024-10-02 14:21:43 +02:00
WHATS_NEW post-release 2024-10-02 14:21:43 +02:00
WHATS_NEW_DM post-release 2024-10-02 14:21:43 +02: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://sourceware.org/pub/lvm2/
  https://github.com/lvmteam/lvm2/releases

The source code is stored in git:
  https://gitlab.com/lvmteam/lvm2
Clone:
  git clone git@gitlab.com:lvmteam/lvm2.git
Anonymous access:
  git clone https://gitlab.com/lvmteam/lvm2.git
Mirrored to:
* https://github.com/lvmteam/lvm2
  git clone https://github.com/lvmteam/lvm2.git
  git clone git@github.com:lvmteam/lvm2.git
* https://sourceware.org/git/?p=lvm2.git
  git clone https://sourceware.org/git/lvm2.git
  git clone git://sourceware.org/git/lvm2.git

Mailing list for general discussion related to LVM2:
  linux-lvm@lists.linux.dev
  Subscribe via email to: linux-lvm+subscribe@lists.linux.dev
  Archive https://lore.kernel.org/linux-lvm/
  Older archive https://listman.redhat.com/archives/linux-lvm/

Mailing lists for LVM2 development, patches and commits:
  lvm-devel@lists.linux.dev
  Subscribe via email to: lvm-devel+subscribe@lists.linux.dev
  Archive https://lore.kernel.org/lvm-devel/
  Older archive https://listman.redhat.com/archives/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

Website:
  https://sourceware.org/lvm2/

Report upstream bugs at:
  https://bugzilla.redhat.com/enter_bug.cgi?product=LVM%20and%20device-mapper
or open issues at:
  https://gitlab.com/groups/lvmteam/-/issues
  https://github.com/lvmteam/lvm2/issues

The source code repository used until 7th June 2012 is accessible using CVS:

  cvs -d :pserver:cvs@sourceware.org:/cvs/lvm2 login cvs
  cvs -d :pserver:cvs@sourceware.org:/cvs/lvm2 checkout LVM2

The password is cvs.