Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=60443d6a5d17c9f3…
Commit: 60443d6a5d17c9f3ba935263a5e14a8548aab509
Parent: f58a7f305bae83e678e0e46ba99c18d9ec580f81
Author: Petr Rockai <prockai(a)redhat.com>
AuthorDate: Sun Jun 8 20:16:13 2014 +0200
Committer: Petr Rockai <prockai(a)redhat.com>
CommitterDate: Sun Jun 8 21:10:47 2014 +0200
test: Fix the vgck test after vg_write change.
---
test/shell/vgck.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/shell/vgck.sh b/test/shell/vgck.sh
index 40af20a..b6858cb 100644
--- a/test/shell/vgck.sh
+++ b/test/shell/vgck.sh
@@ -18,11 +18,11 @@ dd if=/dev/urandom bs=512 seek=2 count=32 of="$dev2"
# TODO: aux lvmconf "global/locking_type = 4"
+vgscan 2>&1 | tee vgscan.out
+
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
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=eda4c3a41d7ca164…
Commit: eda4c3a41d7ca1642ee779af69cb862ba8332e66
Parent: dba6dec661c6a0193d9d713c6fd0b9b008c0f26a
Author: Petr Rockai <prockai(a)redhat.com>
AuthorDate: Mon May 26 14:37:45 2014 +0200
Committer: Petr Rockai <prockai(a)redhat.com>
CommitterDate: Sun Jun 8 21:10:47 2014 +0200
test: Make it possible to enable/disable devices silently.
---
test/lib/aux.sh | 40 ++++++++++++++++++++++++++++++++++++----
1 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 445bf26..3ececaf 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -406,19 +406,50 @@ delay_dev() {
disable_dev() {
local dev
+ local silent
+ local error
+ local notify
+
+ while test -n "$1"; do
+ if test "$1" = "--silent"; then
+ silent=1
+ shift
+ elif test "$1" = "--error"; then
+ error=1
+ shift
+ else
+ break
+ fi
+ done
udev_wait
for dev in "$@"; do
maj=$(($(stat -L --printf=0x%t "$dev")))
min=$(($(stat -L --printf=0x%T "$dev")))
echo "Disabling device $dev ($maj:$min)"
- dmsetup remove -f "$dev" 2>/dev/null || true
- notify_lvmetad --major "$maj" --minor "$min"
+ notify="$notify $maj:$min"
+ if test -n "$error"; then
+ echo 0 10000000 error | dmsetup load $dev
+ dmsetup resume $dev
+ else
+ dmsetup remove -f "$dev" 2>/dev/null || true
+ fi
+ done
+
+ test -n "$silent" || for num in $notify; do
+ notify_lvmetad --major $(echo $num | sed -e "s,:.*,,") \
+ --minor $(echo $num | sed -e "s,.*:,,")
done
}
enable_dev() {
local dev
+ local silent
+
+ if test "$1" = "--silent"; then
+ silent=1
+ shift
+ fi
rm -f debug.log
init_udev_transaction
@@ -431,7 +462,7 @@ enable_dev() {
done
finish_udev_transaction
- for dev in "$@"; do
+ test -n "$silent" || for dev in "$@"; do
notify_lvmetad "$dev"
done
}
@@ -450,6 +481,7 @@ error_dev() {
local type
local pvdev
local offset
+ local silent
read pos size type pvdev offset < $name.table
@@ -480,7 +512,7 @@ error_dev() {
# using device name (since device path does not exists yet with udev)
dmsetup resume "$name"
finish_udev_transaction
- notify_lvmetad "$dev"
+ test -n "$silent" || notify_lvmetad "$dev"
}
backup_dev() {
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c0f9c79ae8e1df16…
Commit: c0f9c79ae8e1df16d23f3eb608fb4bf5455ec841
Parent: 1f2aedb1903d1422b7093f6afbdd81d912c969b6
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Thu Jun 5 22:45:19 2014 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Thu Jun 5 22:45:19 2014 -0500
vgchange: With '--yes', don't prompt the user
If the user supplies a '--yes' argument, then don't bother them with
a question to confirm whether to change the cluster attribute (even
if clvmd isn't running).
---
tools/vgchange.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/vgchange.c b/tools/vgchange.c
index 478a8ca..958919c 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -317,7 +317,7 @@ static int _vgchange_clustered(struct cmd_context *cmd,
return 0;
}
- if (clustered) {
+ if (clustered && !arg_count(cmd, yes_ARG)) {
if (!dm_daemon_is_running(CLVMD_PIDFILE)) {
if (yes_no_prompt("LVM cluster daemon (clvmd) is not"
" running.\n"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1f2aedb1903d1422…
Commit: 1f2aedb1903d1422b7093f6afbdd81d912c969b6
Parent: 9399b74356f9d0c2fbbac824908b15d63c3935cd
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Thu Jun 5 22:29:16 2014 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Thu Jun 5 22:30:50 2014 -0500
WHATS_NEW: For commit 9399b743 (prompt for VG cluster attr change)
Minor change, but put a comment in WHATS_NEW anyway.
---
WHATS_NEW | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index a2b8af7..65cac33 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.107 -
==================================
+ Prompt when setting the VG cluster attr if the cluster is not setup.
Allow --yes to skip prompt in vgextend (worked only with -f).
Don't use name mangling for LVM - it never uses dm names with wrong char set.
Remove default.profile and add {command,metadata}_profile_template.profile.