Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2abaf87a9b36cff2…
Commit: 2abaf87a9b36cff2f32398a8dfb26609c0f56e14
Parent: 9742c5192e8871ebde12856170dae70ee861ef40
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Sep 16 13:46:17 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Sep 16 13:48:44 2013 +0200
tests: update vgcfgrestore test
Test vgcfgrestore when seqno of restored mda is smaller then current
metadata on device.
---
test/shell/vgcfgbackup-usage.sh | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/test/shell/vgcfgbackup-usage.sh b/test/shell/vgcfgbackup-usage.sh
index 7a1e530..b04ac86 100644
--- a/test/shell/vgcfgbackup-usage.sh
+++ b/test/shell/vgcfgbackup-usage.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2008 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2008-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
@@ -18,9 +18,12 @@ vg1=${PREFIX}vg00
vg2=${PREFIX}vg01
vgcreate $vg1 "$dev1"
vgcreate $vg2 "$dev2"
-vgcfgbackup -f $TESTDIR/bak-%s >out
+vgcfgbackup -f bak-%s >out
grep "Volume group \"$vg1\" successfully backed up." out
grep "Volume group \"$vg2\" successfully backed up." out
+# increase seqno
+lvcreate -l1 $vg1
+vgcfgrestore -f bak-$vg1 $vg1
vgremove -ff $vg1 $vg2
# vgcfgbackup correctly stores metadata with missing PVs
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9742c5192e8871eb…
Commit: 9742c5192e8871ebde12856170dae70ee861ef40
Parent: fbb732bd8eb5308eeb1dc7cc6d747552844018ac
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Mon Sep 16 11:47:09 2013 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Mon Sep 16 11:47:09 2013 +0200
systemd: run lvm2-activation-net.service after lvm2-activation.service
The lvm2-activation-net.service was ordered only with respect to iscsi
and fcoe service before. In addition to that, we also need ordering
with respect to lvm2-activation.service to prevent parallel vgchange -aay
runs which may cause some problems during activation.
See also https://bugs.gentoo.org/show_bug.cgi?id=480066.
With this patch, the ordering is firmly set to:
lvm2-activation-early.service -> lvm2-activation.service -> lvm2-activation-net.service
Thanks to Alexander Tsoy for the original patch (modified a bit here):
https://www.redhat.com/archives/lvm-devel/2013-September/msg00049.html
---
WHATS_NEW | 1 +
.../lvm2_activation_generator_systemd_red_hat.c | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index a46b0b4..1c4925b 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.101 -
===================================
+ Run lvm2-activation-net after lvm2-activation service to prevent parallel run.
Add man page entries for lvmdump's -u and -l options.
Fix lvm2app segfault while using lvm_list_pvs_free fn if there are no PVs.
Improve of clvmd singlenode locking simulation.
diff --git a/scripts/lvm2_activation_generator_systemd_red_hat.c b/scripts/lvm2_activation_generator_systemd_red_hat.c
index 7e93d7d..f2e2e49 100644
--- a/scripts/lvm2_activation_generator_systemd_red_hat.c
+++ b/scripts/lvm2_activation_generator_systemd_red_hat.c
@@ -134,16 +134,16 @@ static int generate_unit(const char *dir, int unit)
"DefaultDependencies=no\n", f);
if (unit == UNIT_NET) {
- fputs("After=iscsi.service fcoe.service\n"
- "Before=remote-fs.target shutdown.target\n\n"
- "[Service]\n"
- "ExecStartPre=/usr/bin/udevadm settle\n", f);
+ fprintf(f, "After=%s iscsi.service fcoe.service\n"
+ "Before=remote-fs.target shutdown.target\n\n"
+ "[Service]\n"
+ "ExecStartPre=/usr/bin/udevadm settle\n", unit_names[UNIT_MAIN]);
} else {
if (unit == UNIT_EARLY) {
fputs("After=systemd-udev-settle.service\n"
"Before=cryptsetup.target\n", f);
} else
- fputs("After=lvm2-activation-early.service cryptsetup.target\n", f);
+ fprintf(f, "After= %s cryptsetup.target\n", unit_names[UNIT_EARLY]);
fputs("Before=local-fs.target shutdown.target\n"
"Wants=systemd-udev-settle.service\n\n"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1d068682404c7af3…
Commit: 1d068682404c7af35c0b40586a6e5479443fc851
Parent: e2268aeb92779580d3da4c5c400a1c353f955571
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Thu Sep 12 13:23:53 2013 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Thu Sep 12 13:23:53 2013 -0500
TEST: Unaccounted possible output causing failure
lvchange-raid.sh checks to ensure that the 'p'artial flag takes
precedence over the 'w'ritemostly flag by disabling and reenabling
a device in the array. Most of the time this works fine, but
sometimes the kernel can notice the device failure before it is
reenabled. In that case, the attr flag will not return to 'w', but
to 'r'efresh. This is because 'r'efresh also takes precedence over
the 'w'ritemostly flag. So, we also do a quick check for 'r' and
not just 'w'.
---
test/shell/lvchange-raid.sh | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/test/shell/lvchange-raid.sh b/test/shell/lvchange-raid.sh
index f1b8d72..91c8e8d 100644
--- a/test/shell/lvchange-raid.sh
+++ b/test/shell/lvchange-raid.sh
@@ -105,7 +105,15 @@ run_writemostly_check() {
# Partial flag supercedes writemostly flag
aux disable_dev $d0
lvs -a --noheadings -o lv_attr $vg/${lv}_rimage_0 | grep '.*p.$'
+
+ # It is possible for the kernel to detect the failed device before
+ # we re-enable it. If so, the field will be set to 'r'efresh since
+ # that also takes precedence over 'w'ritemostly. If this has happened,
+ # we refresh the LV and then check for 'w'.
aux enable_dev $d0
+ if lvs -a --noheadings -o lv_attr $vg/${lv}_rimage_0 | grep '.*r.$'; then
+ lvchange --refresh $vg/$lv
+ fi
lvs -a --noheadings -o lv_attr $vg/${lv}_rimage_0 | grep '.*w.$'
# Catch Bad writebehind values