Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=0da72743ca46ae9f…
Commit: 0da72743ca46ae9f8185cd12d5c78b3c2b801872
Parent: 1a1d3a10ffde42665b824a5c72bd526cb962ec1d
Author: Petr Rockai <prockai(a)redhat.com>
AuthorDate: Tue Aug 13 23:25:49 2013 +0200
Committer: Petr Rockai <prockai(a)redhat.com>
CommitterDate: Tue Aug 13 23:25:49 2013 +0200
vgck: Fix #894136, notice on-disk corruption in spite of lvmetad.
---
test/shell/vgck.sh | 31 +++++++++++++++++++++++++++++++
tools/vgck.c | 1 +
2 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/test/shell/vgck.sh b/test/shell/vgck.sh
new file mode 100644
index 0000000..772233c
--- /dev/null
+++ b/test/shell/vgck.sh
@@ -0,0 +1,31 @@
+#!/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 3
+lvcreate -n blabla -L 1 $vg
+
+dd if=/dev/urandom bs=512 seek=2 count=32 of=$dev2
+
+# TODO: aux lvmconf "global/locking_type = 4"
+
+if test -e LOCAL_LVMETAD; then
+ vgscan 2>&1 | tee vgscan.out
+ not grep "Inconsistent metadata found for VG $vg" vgscan.out
+else
+ not vgscan 2>&1 | tee vgscan.out
+ grep "Inconsistent metadata found for VG $vg" vgscan.out
+fi
+
+dd if=/dev/urandom bs=512 seek=2 count=32 of=$dev2
+vgck $vg 2>&1 | tee vgck.out
+grep Incorrect vgck.out
diff --git a/tools/vgck.c b/tools/vgck.c
index eb0ecaf..4ad045a 100644
--- a/tools/vgck.c
+++ b/tools/vgck.c
@@ -37,6 +37,7 @@ static int vgck_single(struct cmd_context *cmd __attribute__((unused)),
int vgck(struct cmd_context *cmd, int argc, char **argv)
{
+ lvmetad_set_active(0);
return process_each_vg(cmd, argc, argv, 0, NULL,
&vgck_single);
}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1a1d3a10ffde4266…
Commit: 1a1d3a10ffde42665b824a5c72bd526cb962ec1d
Parent: fd7cac15bcc4fe2a6036b4408a8c53d003a6859f
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Aug 13 18:20:11 2013 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Aug 13 18:20:11 2013 +0100
vgchange: require confirmation with -c and no VGs
Too many people have been running 'vgchange -cy' by mistake
so add a confirmation prompt. Use --yes to bypass this.
---
WHATS_NEW | 1 +
tools/vgchange.c | 6 ++++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index b1f379b..49360b2 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.101 -
===================================
+ Require confirmation for vgchange -c when no VGs listed explicitly.
Also skip /var and /var/log by default in blkdeactivate when unmounting.
Add support for bind mounts in blkdeactivate.
Add blkdeactivate -v/--verbose for debug output from external tools used.
diff --git a/tools/vgchange.c b/tools/vgchange.c
index d41ef49..4087fab 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -623,6 +623,12 @@ int vgchange(struct cmd_context *cmd, int argc, char **argv)
return ECMD_PROCESSED;
}
+ if (arg_count(cmd, clustered_ARG) && !argc && !arg_count(cmd, yes_ARG) &&
+ (yes_no_prompt("Change clustered property of all volumes groups? [y/n]: ") == 'n')) {
+ log_error("No volume groups changed.");
+ return ECMD_FAILED;
+ }
+
if (!update || !update_partial_unsafe)
cmd->handles_missing_pvs = 1;
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=fd7cac15bcc4fe2a…
Commit: fd7cac15bcc4fe2a6036b4408a8c53d003a6859f
Parent: e166c00ac619a17970b2a71429e02038b1ebf2dc
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Aug 13 18:25:54 2013 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Aug 13 18:25:54 2013 +0200
WHATS_NEW: be more precise
---
WHATS_NEW | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 6cce602..b1f379b 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,6 +1,6 @@
Version 2.02.101 -
===================================
- Also skip /var and /var/log by default in blkdeactivate.
+ Also skip /var and /var/log by default in blkdeactivate when unmounting.
Add support for bind mounts in blkdeactivate.
Add blkdeactivate -v/--verbose for debug output from external tools used.
Add blkdeactivate -e/--errors for error messages from external tools used.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=268b370e245ee0d6…
Commit: 268b370e245ee0d6abaeeedff513c9678eeb7f54
Parent: a854398764968fe2847ba6cbfec7650a7ca04b37
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Aug 13 17:26:36 2013 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Aug 13 17:51:40 2013 +0200
blkdeactivate: add support for bind mounts
Recent version of util-linux/umount (v2.23+) provides
umount --all-targets that can unmount all the mount targets of
the same device (the bind mounts). Use this if available when
calling the umount blkdeactivate.
Otherwise, for older versions of util-linux, use findmnt
(that is also a part of the util-linux) to iterate over all
mount targets of the same device - this is the manual way.
---
WHATS_NEW | 1 +
scripts/blkdeactivate.sh.in | 30 +++++++++++++++++++++++++-----
2 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index dd90726..40e99e6 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.101 -
===================================
+ Add support for bind mounts in blkdeactivate.
Add blkdeactivate -v/--verbose for debug output from external tools used.
Add blkdeactivate -e/--errors for error messages from external tools used.
Suppress messages from external tools called in blkdeactivate by default.
diff --git a/scripts/blkdeactivate.sh.in b/scripts/blkdeactivate.sh.in
index 48f9fe3..b6d0117 100644
--- a/scripts/blkdeactivate.sh.in
+++ b/scripts/blkdeactivate.sh.in
@@ -36,7 +36,13 @@ UMOUNT="/bin/umount"
DMSETUP="@sbindir@/dmsetup"
LVM="@sbindir@/lvm"
-UMOUNT_OPTS=""
+if $UMOUNT --help | grep -- "--all-targets" >$DEV_DIR/null; then
+ UMOUNT_OPTS="--all-targets "
+else
+ UMOUNT_OPTS=""
+ FINDMNT="/bin/findmnt -r --noheadings -u -o TARGET"
+ FINDMNT_READ="read -r mnt"
+fi
DMSETUP_OPTS=""
LVM_OPTS=""
@@ -132,10 +138,8 @@ is_top_level_device() {
test -z "$files"
}
-device_umount () {
- test -z "$mnt" && return 0;
-
- test "$devtype" != "lvm" && test "${kname:0:3}" != "dm-" && return 0
+device_umount_one() {
+ test -z "$mnt" && return 0
if test -z "${SKIP_UMOUNT_LIST["$mnt"]}" -a "$DO_UMOUNT" -eq "1"; then
echo -n " [UMOUNT]: unmounting $name ($kname) mounted on $mnt... "
@@ -151,6 +155,22 @@ device_umount () {
fi
}
+device_umount() {
+ test "$devtype" != "lvm" && test "${kname:0:3}" != "dm-" && return 0
+
+ # FINDMNT is defined only if umount --all-targets is not available.
+ # In that case, read the list of multiple mount points of one device
+ # using FINDMNT and unmount it one by one manually.
+ if test -z "$FINDMNT"; then
+ device_umount_one
+ else
+ while $FINDMNT_READ; do
+ device_umount_one || return 1
+ done <<< "`$FINDMNT $DEV_DIR/$kname`"
+ fi
+
+}
+
deactivate_holders () {
local skip=1; $LSBLK_VARS
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=297907899c389fef…
Commit: 297907899c389fef074eeb56fd0d7b60d66dbb35
Parent: abc89422af75fa9e20d24285d1366e4631cb8748
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Aug 13 11:29:21 2013 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Aug 13 11:29:21 2013 +0100
release 2.02.100
84 files changed, 1540 insertions(+), 442 deletions(-)
Mostly bug fixes this time.
Also note:
md raid replaces dm mirroring as the default implementation.
Can call out to thin_repair to fix thin metadata.
Improved clvmd error detection/debugging information.
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 9 +++++----
WHATS_NEW_DM | 4 ++--
4 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/VERSION b/VERSION
index 1716ee6..c7d4f06 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.100(2)-git (2013-07-24)
+2.02.100(2)-git (2013-08-13)
diff --git a/VERSION_DM b/VERSION_DM
index 067a488..a11b7cd 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.79-git (2013-07-24)
+1.02.79-git (2013-08-13)
diff --git a/WHATS_NEW b/WHATS_NEW
index 68d4679..20331c3 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,17 +1,18 @@
-Version 2.02.100 -
-================================
+Version 2.02.100 - 13th August 2013
+===================================
Fix inability to remove a VG's cluster flag if it contains a mirror.
Suppress arg: prefix in log_sys_error macro when arg is empty string.
Fix bug making lvchange unable to change recovery rate for RAID.
Prohibit conversion of thin pool to external origin.
Workaround gcc v4.8 -O2 bug causing failures if config/checks=1 (32bit arch).
Verify clvmd message validity before processing and log error if incorrect.
- Fix issue preventing PV creation on mirror LVs
+ When creating PV on existing LV don't forbid reserved LV names on LVs below.
+ Split out device_is_suspended_or_blocking from device_is_usable.
When converting mirrors, default segtype should be the same unless specified.
Make "raid1" the default mirror segment type.
Fix clogd descriptor leak when daemonizing.
Fix clvmd descriptor leak on restart.
- Add pipe_open/close() to replace less secure popen() glibc call.
+ Add pipe_open/close() to use instead of less efficient/secure popen().
Fix metadata area offset/size overflow if it's >= 4g and while using lvmetad.
Inherit and apply any profile attached to a VG if creating new thin pool.
Add initial support thin pool lvconvert --repair.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 43eb4d8..0ef1755 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,5 @@
-Version 1.02.79 -
-================================
+Version 1.02.79 - 13th August 2013
+==================================
Create dmeventd timeout threads as "detached" so exit status is freed.
Add DM_ABORT_ON_INTERNAL_ERRORS env var support to abort on internal errors.