Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1c4fe47308e3638b…
Commit: 1c4fe47308e3638b95f042a1efc942c5ce8e4fdc
Parent: b2da0f0a5b5b99c10c2ea531b63a3d9466eb1832
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu May 22 09:56:44 2014 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu May 22 10:00:19 2014 +0200
lvm_init: don't use name mangling for LVM
LVM has restricter character set that is allowed for VG-LV names
and the dm names constructed do not contain any blacklisted characters
that would require name mangling.
Also, when any other device-mapper device is scanned that could
possibly contain such blacklisted characters, we reference the
device by its major:minor instead of dm name (e.g. _device_is_usable fn).
---
WHATS_NEW | 1 +
liblvm/lvm_base.c | 7 +++++++
tools/lvmcmdline.c | 7 +++++++
3 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 61753d6..491dece 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.107 -
==================================
+ 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.
Use proper umask for systemd units generated by lvm2-activation-generator.
Check for failing mirror_remove_missing() function.
diff --git a/liblvm/lvm_base.c b/liblvm/lvm_base.c
index 2a373ba..47ad241 100644
--- a/liblvm/lvm_base.c
+++ b/liblvm/lvm_base.c
@@ -35,6 +35,13 @@ static lvm_t _lvm_init(const char *system_dir)
if (!udev_init_library_context())
stack;
+ /*
+ * It's not necessary to use name mangling for LVM:
+ * - the character set used for VG-LV names is subset of udev character set
+ * - when we check other devices (e.g. _device_is_usable fn), we use major:minor, not dm names
+ */
+ dm_set_name_mangling_mode(DM_STRING_MANGLING_NONE);
+
/* create context */
/* FIXME: split create_toolcontext */
/* FIXME: make all globals configurable */
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 96e478f..66f691e 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -1527,6 +1527,13 @@ struct cmd_context *init_lvm(void)
if (!udev_init_library_context())
stack;
+ /*
+ * It's not necessary to use name mangling for LVM:
+ * - the character set used for LV names is subset of udev character set
+ * - when we check other devices (e.g. _device_is_usable fn), we use major:minor, not dm names
+ */
+ dm_set_name_mangling_mode(DM_STRING_MANGLING_NONE);
+
if (!(cmd = create_toolcontext(0, NULL, 1, 0))) {
udev_fin_library_context();
return_NULL;
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b2da0f0a5b5b99c1…
Commit: b2da0f0a5b5b99c10c2ea531b63a3d9466eb1832
Parent: 37b4dc777590ed0e6771833dce4c0727dfc72465
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed May 21 23:13:59 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed May 21 23:14:42 2014 +0200
tests: raid and dmeventd
---
test/shell/lvconvert-repair-raid-dmeventd.sh | 28 ++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/test/shell/lvconvert-repair-raid-dmeventd.sh b/test/shell/lvconvert-repair-raid-dmeventd.sh
new file mode 100644
index 0000000..a825aa2
--- /dev/null
+++ b/test/shell/lvconvert-repair-raid-dmeventd.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+# Copyright (C) 2014 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
+
+which mkfs.ext3 || skip
+
+aux prepare_dmeventd
+aux prepare_vg 5
+
+lvcreate -aey --type raid1 -m 3 --ignoremonitoring -L 1 -n 4way $vg
+lvchange --monitor y $vg/4way
+lvs -a -o all,lv_modules $vg
+lvdisplay --maps $vg
+aux disable_dev "$dev2" "$dev4"
+mkfs.ext3 "$DM_DEV_DIR/$vg/4way"
+sleep 10 # FIXME: need a "poll" utility, akin to "check"
+aux enable_dev "$dev2" "$dev4"
+
+vgremove -ff $vg
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=092659644a6da359…
Commit: 092659644a6da359272b852d6be058a5fc26bff4
Parent: e78092fa3a4cba95ccc8820fb2b2c617e2b0f618
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed May 21 15:51:28 2014 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed May 21 15:51:28 2014 +0200
man: missing space between option name and value name
---
man/lvchange.8.in | 2 +-
man/lvcreate.8.in | 2 +-
man/lvm.8.in | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/man/lvchange.8.in b/man/lvchange.8.in
index 56a35af..09f54e6 100644
--- a/man/lvchange.8.in
+++ b/man/lvchange.8.in
@@ -125,7 +125,7 @@ and copied to the others, so this can take a considerable amount of
time - and during this time you are without a complete redundant copy
of your data.
.TP
-.B \-\-metadataprofile \fIProfileName
+.B \-\-metadataprofile " " \fIProfileName
Uses and attaches ProfileName configuration profile to the logical
volume metadata. Whenever the logical volume is processed next time,
the profile is automatically applied. If the volume group has another
diff --git a/man/lvcreate.8.in b/man/lvcreate.8.in
index 78cef80..ee50587 100644
--- a/man/lvcreate.8.in
+++ b/man/lvcreate.8.in
@@ -284,7 +284,7 @@ will create a persistent log that is itself mirrored.
When the legacy "mirror" segment type is used, the optional argument
\fB\-\-corelog\fP is equivalent to \fB\-\-mirrorlog\fP \fIcore\fP.
.TP
-.BR \-\-metadataprofile \fIProfileName
+.BR \-\-metadataprofile " " \fIProfileName
Uses and attaches the ProfileName configuration profile to the logical
volume metadata. Whenever the logical volume is processed next time,
the profile is automatically applied. If the volume group has another
diff --git a/man/lvm.8.in b/man/lvm.8.in
index c753561..9df3cde 100644
--- a/man/lvm.8.in
+++ b/man/lvm.8.in
@@ -281,12 +281,12 @@ an allocation request but \fInormal\fP doesn't use them,
\fIanywhere\fP will - even if that reduces performance by
placing two stripes on the same Physical Volume.
.TP
-.IR \fB\-\-commandprofile \fIProfileName
+.IR \fB\-\-commandprofile " " \fIProfileName
Selects the command configuration profile to use when processing an LVM command.
See also \fBlvm.conf\fP(5) for more information about \fBcommand profile config\fP and
the way it fits with other LVM configuration methods.
.TP
-.IR \fB\-\-metadataprofile \fIProfileName
+.IR \fB\-\-metadataprofile " " \fIProfileName
Selects the metadata configuration profile to use when processing an LVM command.
When using metadata profile during Volume Group or Logical Volume creation,
the metadata profile name is saved in metadata. When such Volume Group or Logical
@@ -295,7 +295,7 @@ and the use of \-\-metadataprofile option is not necessary. See also
\fBlvm.conf\fP(5) for more information about \fBmetadata profile config\fP and the
way it fits with other LVM configuration methods.
.TP
-.IR \fB\-\-profile \fIProfileName
+.IR \fB\-\-profile " " \fIProfileName
A short form of \fB\-\-metadataprofile\fP for \fBvgcreate\fP, \fBlvcreate\fP,
\fBvgchange\fP and \fBlvchange\fP command and a short form of \fB\-\-commandprofile\fP
for any other command (with the exception of \fBdumpconfig\fP command where the