Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=300c8209a810f28799237…
Commit: 300c8209a810f287992376e8a0561fdf878d1520
Parent: f7ca470abe995210e8008084c0b4436292b2816b
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Thu Mar 30 10:10:23 2023 -0500
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Thu Mar 30 11:04:49 2023 -0500
lvmdbusd: Correct seg. fault on s390x ELN
syscall 186 is specific to x86 64bit. As this is different from arch
to arch and between same arch different arch size we will only grab
thread ID using built-in python support if it is supported.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2166931
---
daemons/lvmdbusd/utils.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/daemons/lvmdbusd/utils.py b/daemons/lvmdbusd/utils.py
index fdd7578c1..27b869c13 100644
--- a/daemons/lvmdbusd/utils.py
+++ b/daemons/lvmdbusd/utils.py
@@ -11,7 +11,6 @@ import xml.etree.ElementTree as Et
import sys
import inspect
import collections
-import ctypes
import errno
import fcntl
import os
@@ -305,8 +304,16 @@ class DebugMessages(object):
self.queue.clear()
+def _get_tid():
+ try:
+ # Only 3.8 and later have this
+ return threading.get_native_id()
+ except:
+ return -1
+
+
def _format_log_entry(msg):
- tid = ctypes.CDLL('libc.so.6').syscall(186)
+ tid = _get_tid()
if not cfg.systemd and STDOUT_TTY:
msg = "%s: %d:%d - %s" % \
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6204fda003804e2bad022…
Commit: 6204fda003804e2bad022347baab510cb845f315
Parent: 49dbeb9b4566df684164f40ca6ebdab3d6696836
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Tue Mar 21 13:33:14 2023 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Tue Mar 21 13:33:14 2023 +0100
make: generate
---
man/vgchange.8_pregen | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/man/vgchange.8_pregen b/man/vgchange.8_pregen
index 5ab59204d..4665e98c8 100644
--- a/man/vgchange.8_pregen
+++ b/man/vgchange.8_pregen
@@ -68,6 +68,8 @@ vgchange \(em Change volume group attributes
\fB-l\fP|\fB--logicalvolume\fP \fINumber\fP
.br
\fB--longhelp\fP
+.br
+ \fB--majoritypvs\fP
.br
\fB-p\fP|\fB--maxphysicalvolumes\fP \fINumber\fP
.br
@@ -348,6 +350,8 @@ Change the system ID of a VG.
.ad l
[ \fB-S\fP|\fB--select\fP \fIString\fP ]
.br
+[ \fB--majoritypvs\fP ]
+.br
[ COMMON_OPTIONS ]
.ad b
.RE
@@ -666,6 +670,12 @@ Sets the maximum number of LVs allowed in a VG.
Display long help text.
.
.HP
+\fB--majoritypvs\fP
+.br
+Change the VG system ID if the majority of PVs in the VG
+are present (one more than half).
+.
+.HP
\fB-p\fP|\fB--maxphysicalvolumes\fP \fINumber\fP
.br
Sets the maximum number of PVs that can belong to the VG.
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=49dbeb9b4566df684164f…
Commit: 49dbeb9b4566df684164f40ca6ebdab3d6696836
Parent: ddfe839dd1aa42e3d2a15a19eaf86c4b6fc65d19
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Mar 20 12:42:50 2023 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Mar 20 12:42:50 2023 -0500
tests: nomda-restoremissing
This test was broken by commit 69ea2e3f9
"vg_read: keep MISSING_PV when device with no mda reappears"
Change the test to match the new behavior.
---
test/shell/nomda-restoremissing.sh | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/test/shell/nomda-restoremissing.sh b/test/shell/nomda-restoremissing.sh
index fb3f93053..d9c544bc4 100644
--- a/test/shell/nomda-restoremissing.sh
+++ b/test/shell/nomda-restoremissing.sh
@@ -31,7 +31,18 @@ not vgck $vg 2>&1 | tee log
grep "missing 1 physical volume" log
not lvcreate -aey --type mirror -m 1 -l 1 -n mirror $vg # write operations fail
aux enable_dev "$dev1"
-lvcreate -aey --type mirror -m 1 -l 1 -n mirror $vg # no MDA => automatically restored
+# Old versions would automatically clear MISSING_PV on a PV that had no mda,
+# but this made no sense; the existence of an mda means nothing for the
+# validity of the data on the device. I suspect that at some point in the
+# past, the MISSING_PV flag was used to decide if metadata could be used
+# from the device, so the flag could be cleared on a PV with no mda.
+# These days lvm knows when to ignore outdated metadata.
+# MISSING_PV probably has little to no value for determining valid data either,
+# so it's likely that we'll begin to automatically clear MISSING_PV in the
+# future (but it will have nothing to do with having mdas.)
+not lvcreate -aey --type mirror -m 1 -l 1 -n mirror $vg
+vgextend --restoremissing $vg "$dev1"
+lvcreate -aey --type mirror -m 1 -l 1 -n mirror $vg
vgck $vg
vgremove -ff $vg