Skip to contentSkip to conversation

Several SUSE bugfixes

PATCH In review Thomas Renninger 6 participants 21 messages Jun 26, 2015 – Nov 13, 2015 11 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Based on version 043.
Would be great to see these mainline.

Harald, you removed udev rules for dmraid.
I expect adding all the kompat/partx udev rules may be a better approach. But you better discuss this with Hannes and/or Neil.

Thanks a lot,

Thomas

A message that is not in the archive (sent off-list or not yet received): 1435330557-17685-1-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org

#2 lore raw

PATCH 1/8 /etc/multipath.conf is not mandatory

From: Hannes Reinecke <[email protected]>

If rootfs is on multipath, but platform does not have an /etc/multipath.conf file which is not urgently needed, they system will not boot, due to:

multipathd is not started and rootfs and swap are not found:
systemctl status multipathd.service
* multipathd.service - Device-Mapper Multipath Device Controller
Loaded: loaded (/usr/lib/systemd/system/multipathd.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Condition: start condition failed at Thu 2015-05-07 11:49:11 CEST; 7min ago
ConditionPathExists=/etc/multipath.conf was not met
and exit to dracut shell.

---
 modules.d/90multipath/multipathd.service | 1 -
 1 file changed, 1 deletion(-)
modules.d/90multipath/multipathd.service +0 -1
index b64b02c..f7bc65f 100644
@@ -6,7 +6,6 @@ Conflicts=shutdown.target
 ConditionKernelCommandLine=!nompath
 ConditionKernelCommandLine=!rd.multipath=0
 ConditionKernelCommandLine=!rd_NO_MULTIPATH
-ConditionPathExists=/etc/multipath.conf
 
 [Service]
 Type=simple
Signature · 1 line
2.1.4

A message that is not in the archive (sent off-list or not yet received): 1435330557-17685-2-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org

#4 lore raw

Re: [PATCH 1/8] /etc/multipath.conf is not mandatory

Quoted 25 lines · Thomas Renninger

From: Hannes Reinecke <[email protected]>

If rootfs is on multipath, but platform does not have an /etc/multipath.conf file which is not urgently needed, they system will not boot, due to:

multipathd is not started and rootfs and swap are not found:
systemctl status multipathd.service
* multipathd.service - Device-Mapper Multipath Device Controller
Loaded: loaded (/usr/lib/systemd/system/multipathd.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Condition: start condition failed at Thu 2015-05-07 11:49:11 CEST; 7min ago
ConditionPathExists=/etc/multipath.conf was not met
and exit to dracut shell.

---
 modules.d/90multipath/multipathd.service | 1 -
 1 file changed, 1 deletion(-)
modules.d/90multipath/multipathd.service +0 -0
index b64b02c..f7bc65f 100644

modules.d/90multipath/multipathd.service Conflicts=shutdown.target · line 11

Quoted 7 lines
modules.d/90multipath/multipathd.service +0 -1
@@ -6,7 +6,6 @@ Conflicts=shutdown.target
 ConditionKernelCommandLine=!nompath
 ConditionKernelCommandLine=!rd.multipath=0
 ConditionKernelCommandLine=!rd_NO_MULTIPATH
-ConditionPathExists=/etc/multipath.conf
 
 [Service]
 Type=simple

CC'ing Benjmain Marzinski as the Fedora maintainer of device-mapper-multipath.

I don't understand how multipath is used without a configuration?

Anyway, I see the service file in Fedora is quiet different from yours and yours is also different from upstream.

So we have:

*Upstream* -
<http://git.opensvc.com/gitweb.cgi?p=multipath-tools/.git;a=blob_plain;f=multipathd/multipathd.service;h=b5b755bbacd08cd9f612206ce73dce965dbc8b2a;hb=HEAD>

[Unit]
Description=Device-Mapper Multipath Device Controller Before=iscsi.service iscsid.service lvm2-activation-early.service Before=local-fs-pre.target
After=multipathd.socket
DefaultDependencies=no
Wants=local-fs-pre.target multipathd.socket Conflicts=shutdown.target

[Service]
Type=notify
NotifyAccess=main
LimitCORE=infinity
ExecStartPre=/sbin/modprobe dm-multipath
ExecStart=/sbin/multipathd -d -s
ExecReload=/sbin/multipathd reconfigure

[…]

*Fedora device-mapper-multipath-0.4.9-76*

[Unit]
Description=Device-Mapper Multipath Device Controller Before=iscsi.service iscsid.service lvm2-activation-early.service
-Before=local-fs-pre.target
-After=multipathd.socket
+After=syslog.target +ConditionPathExists=/etc/multipath.conf +ConditionKernelCommandLine=!nompath
DefaultDependencies=no
-Wants=local-fs-pre.target multipathd.socket
Conflicts=shutdown.target

[Service]
-Type=notify
-NotifyAccess=main
-LimitCORE=infinity
+Type=forking +PIDFile=/var/run/multipathd/multipathd.pid
ExecStartPre=/sbin/modprobe dm-multipath
-ExecStart=/sbin/multipathd -d -s +ExecStartPre=-/sbin/multipath -A +ExecStart=/sbin/multipathd
ExecReload=/sbin/multipathd reconfigure
+#ExecStop=/path/to/scrip delete-me if not necessary

*openSUSE multipath-tools-0.5.0-20.1*

[Unit]
Description=Device-Mapper Multipath Device Controller Before=iscsi.service iscsid.service lvm2-activation-early.service
-Before=local-fs-pre.target
-After=multipathd.socket
+Before=local-fs-pre.target systemd-udev-trigger.service +After=multipathd.socket systemd-udevd.service
DefaultDependencies=no
Wants=local-fs-pre.target multipathd.socket Conflicts=shutdown.target
@@ -11,6 +11,10 @@
Type=notify
NotifyAccess=main
LimitCORE=infinity
-ExecStartPre=/sbin/modprobe dm-multipath +ExecStartPre=/sbin/modprobe -a scsi_dh_alua scsi_dh_emc scsi_dh_rdac dm-multipath
ExecStart=/sbin/multipathd -d -s
ExecReload=/sbin/multipathd reconfigure

I think it's impossible to make this independent in dracut from the shipped package. You guys definetly should either ship the initramfs version in the package, so the dracut module can copy that, or better use the same unit file across distributions.

#5 lore raw

PATCH 2/8 Fix nfs parsing when IPv4 address is used in /etc/fstab

In reply to a message not in the archive

and remove an unneeded subprocess.

---
 modules.d/95nfs/module-setup.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
modules.d/95nfs/module-setup.sh +2 -2
index 8eb542c..3f30285 100755
@@ -51,9 +51,9 @@ cmdline() {
 
     ### ip= ###
     if [[ $nfs_device = [0-9]*\.[0-9]*\.[0-9]*.[0-9]* ]] || [[ $nfs_device = \[.*\] ]]; then
-        nfs_address="$nfs_device"
+        nfs_address="${nfs_device%%:*}"
     else
-        lookup=$(host $(echo ${nfs_device%%:*})| head -n1)
+        lookup=$(host "${nfs_device%%:*}"| head -n1)
         nfs_address=${lookup##* }
     fi
     ifname=$(ip -o route get to $nfs_address | sed -n 's/.*dev \([^ ]*\).*/\1/p')
Signature · 1 line
2.1.4
#6 lore raw

PATCH 3/8 Reset IFS variable

In reply to a message not in the archive

From: Hannes Reinecke <[email protected]>

Setting and unsetting the IFS variable is tricky. To be on the safe side we should always reset the IFS variable to its original value after parsing.

---
 modules.d/95fcoe/parse-fcoe.sh | 2 ++
 1 file changed, 2 insertions(+)
modules.d/95fcoe/parse-fcoe.sh +2 -0
index b66fa3e..a214007 100755
@@ -26,8 +26,10 @@ initqueue --onetime modprobe -b -q bnx2fc
 udevadm settle --timeout=30
 
 parse_fcoe_opts() {
+    local OLDIFS="$IFS"
     local IFS=:
     set $fcoe
+    IFS="$OLDIFS"
 
     case $# in
         2)
Signature · 1 line
2.1.4
#7 lore raw

PATCH 4/8 mkinitrd-suse.sh: Bail out with exit 1 if initrd cannot be generated

In reply to a message not in the archive
---
 mkinitrd-suse.sh | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
mkinitrd-suse.sh +16 -1
index af42cbe..c2b314f 100755
@@ -280,7 +280,8 @@ done
 
 [[ $targets && $kernels ]] || default_kernel_images
 if [[ ! $targets || ! $kernels ]];then
-    error "No kernel found in $boot_dir"
+    error "No kernel found in $boot_dir or bad modules dir in /lib/modules"
+    exit 1
 fi
 
 # We can have several targets/kernels, transform the list to an array
@@ -301,6 +302,8 @@ fi
 [[ $domu_module_list ]] || domu_module_list="${DOMU_INITRD_MODULES}"
 shopt -s extglob
 
+failed=""
+
 for ((i=0 ; $i<${#targets[@]} ; i++)); do
 
     if [[ $img_vers ]];then
@@ -329,14 +332,18 @@ for ((i=0 ; $i<${#targets[@]} ; i++)); do
         # expansion magics
         if [ -n "${modules_all}" ];then
             $dracut_cmd $dracut_args --force-drivers "${modules_all}" "$target" "$kernel" &>/dev/null
+            [ $? -ne 0 ] && failed="$failed $target"
         else
             $dracut_cmd $dracut_args "$target" "$kernel" &>/dev/null
+            [ $? -ne 0 ] && failed="$failed $target"
         fi
     else
         if [ -n "${modules_all}" ];then
             $dracut_cmd $dracut_args --force-drivers "${modules_all}" "$target" "$kernel"
+            [ $? -ne 0 ] && failed="$failed $target"
         else
             $dracut_cmd $dracut_args "$target" "$kernel"
+            [ $? -ne 0 ] && failed="$failed $target"
         fi
     fi
 done
@@ -345,4 +352,12 @@ if [ "$skip_update_bootloader" ] ; then
     echo 2>&1 "Did not refresh the bootloader. You might need to refresh it manually."
 else
     update-bootloader --refresh
+    [ $? -ne 0 ] && echo "Updating bootloader failed" && exit 1
+fi
+
+if [ "$failed" != "" ]; then
+    echo "Generating $failed targets failed"
+    exit 1
 fi
+
+exit 0
Signature · 1 line
2.1.4
#8 lore raw

PATCH 5/8 Use the uncompressed kernel file on arm and aarch to detect kernel version

In reply to a message not in the archive

This is due to file cannot read out the kernel version on these.

Many thanks to Alexander Graf finding this in old SUSE mkinitrd code. Converted by Thomas Renninger.

https://bugzilla.suse.com/show_bug.cgi?id=908454

---
 mkinitrd-suse.sh | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)
mkinitrd-suse.sh +29 -1
index c2b314f..0f2b3c4 100755
@@ -145,6 +145,33 @@ is_xen_kernel() {
     return
 }
 
+# kernel_image_gz_from_image() and kernel_version_from_image() are helpers
+# for arm* kernels which produce zImage files which cannot be read from
+# get_kernel_version -> get rid of this workaround if possible
+kernel_image_gz_from_image() {
+    local arch=$(uname -i)
+    local r=${1}.gz
+
+    # uImage kernels can't be extracted directly. Use the vmlinux.gz instead
+    r=${r//uImage/vmlinux}
+
+    # on ARM a zImage can't be extracted directly. Other platforms define it
+    # as a gzipped vmlinux file, but not ARM. So only on ARM, use vmlinux.gz.
+    if [[ $arch =~ arm ]] || [[ $arch =~ aarch ]]; then
+        r=${r//zImage/vmlinux}
+    fi
+
+    echo $r
+}
+
+kernel_version_from_image() {
+    local kernel_image="$1" kernel_image_gz=$(kernel_image_gz_from_image "$1")
+
+    if get_kernel_version "$kernel_image" 2>/dev/null; then
+        return
+    fi
+    get_kernel_version "$kernel_image_gz" 2>/dev/null
+}
 
 # Taken over from SUSE mkinitrd
 default_kernel_images() {
@@ -183,7 +210,8 @@ default_kernel_images() {
 
         [ -L "$boot_dir/$kernel_image" ] && continue
         [ "${kernel_image%%.gz}" != "$kernel_image" ] && continue
-        kernel_version=$(/usr/bin/get_kernel_version \
+
+        kernel_version=$(kernel_version_from_image \
                          $boot_dir/$kernel_image 2> /dev/null)
         initrd_image=$(echo $kernel_image | sed -e "s|${regex}|initrd|")
         if [ "$kernel_image" != "$initrd_image" -a \
Signature · 1 line
2.1.4
#9 lore raw

PATCH 6/8 Install /etc/sysconfig/console to see specific fonts

In reply to a message not in the archive

From: Werner Fink <[email protected]>

---
 modules.d/10i18n/module-setup.sh | 4 ++++
 1 file changed, 4 insertions(+)
modules.d/10i18n/module-setup.sh +4 -0
index 9439875..398d02b 100755
@@ -219,6 +219,10 @@ install() {
             print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> ${initdir}${VCONFIG_CONF}
         fi
 
+        if dracut_module_included "systemd" && [[ -f /etc/sysconfig/console ]]; then
+            inst_simple /etc/sysconfig/console
+        fi
+
         return 0
     }
 
Signature · 1 line
2.1.4

A message that is not in the archive (sent off-list or not yet received): 1435330557-17685-7-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org

#11 lore raw

Re: [PATCH 6/8] Install /etc/sysconfig/console to see specific fonts

В Fri, 26 Jun 2015 16:55:55 +0200
Thomas Renninger <[email protected]> пишет:

Quoted 12 lines

From: Werner Fink <[email protected]>

---
 modules.d/10i18n/module-setup.sh | 4 ++++
 1 file changed, 4 insertions(+)
modules.d/10i18n/module-setup.sh +0 -0
index 9439875..398d02b 100755

modules.d/10i18n/module-setup.sh install() { · line 228

Quoted 10 lines
modules.d/10i18n/module-setup.sh +4 -0
@@ -219,6 +219,10 @@ install() {
             print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> ${initdir}${VCONFIG_CONF}
         fi
 
+        if dracut_module_included "systemd" && [[ -f /etc/sysconfig/console ]]; then
+            inst_simple /etc/sysconfig/console
+        fi
+
         return 0
     }
 

Upstream systemd does not even look at this file. Could you explain what problem is fixed here and why presence of this file fixes it?

#12 lore raw

PATCH 7/8 ensure pre-mount (and resume) run before root fsck

In reply to a message not in the archive

From: Andrei Borzenkov <[email protected]>

References:
https://bugzilla.suse.com/show_bug.cgi?id=906592

---
 modules.d/98dracut-systemd/rootfs-generator.sh | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
modules.d/98dracut-systemd/rootfs-generator.sh +18 -0
index 5910ce7..7eb0b1a 100755
@@ -65,6 +65,23 @@ generator_mount_rootfs()
     fi
 }
 
+generator_fsck_after_pre_mount()
+{
+    local _name
+
+    [ -z "$1" ] && return 0
+
+    _name=$(dev_unit_name "$1")
+    [ -d /run/systemd/generator/systemd-fsck@${_name}.service.d ] || mkdir -p /run/systemd/generator/systemd-fsck@${_name}.service.d
+    if ! [ -f /run/systemd/generator/systemd-fsck@${_name}.service.d/after-pre-mount.conf ]; then
+        {
+            echo "[Unit]"
+            echo "After=dracut-pre-mount.service"
+        } > /run/systemd/generator/systemd-fsck@${_name}.service.d/after-pre-mount.conf
+    fi
+
+}
+
 root=$(getarg root=)
 case "$root" in
     block:LABEL=*|LABEL=*)
@@ -95,6 +112,7 @@ GENERATOR_DIR="$1"
 
 if [ "${root%%:*}" = "block" ]; then
    generator_wait_for_dev "${root#block:}" "$RDRETRY"
+   generator_fsck_after_pre_mount "${root#block:}"
    strstr "$(cat /proc/cmdline)" 'root=' || generator_mount_rootfs "${root#block:}" "$(getarg rootfstype=)" "$(getarg rootflags=)"
 fi
 
Signature · 1 line
2.1.4

A message that is not in the archive (sent off-list or not yet received): 1435330557-17685-8-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org

#14 lore raw

Re: [PATCH 7/8] ensure pre-mount (and resume) run before root fsck

В Fri, 26 Jun 2015 16:55:56 +0200
Thomas Renninger <[email protected]> пишет:

Quoted 47 lines

From: Andrei Borzenkov <[email protected]>

References:
https://bugzilla.suse.com/show_bug.cgi?id=906592

---
 modules.d/98dracut-systemd/rootfs-generator.sh | 18

++++++++++++++++++ 1 file changed, 18 insertions(+)

(quoted diff) +0 -0

b/modules.d/98dracut-systemd/rootfs-generator.sh index 5910ce7..7eb0b1a 100755 --- a/modules.d/98dracut-systemd/rootfs-generator.sh +++ b/modules.d/98dracut-systemd/rootfs-generator.sh @@ -65,6 +65,23 @@ generator_mount_rootfs() fi
}

modules.d/98dracut-systemd/rootfs-generator.sh +8 -0
+generator_fsck_after_pre_mount()
+{
+    local _name
+
+    [ -z "$1" ] && return 0
+
+    _name=$(dev_unit_name "$1")
+    [ -d /run/systemd/generator/systemd-fsck@${_name}.service.d ] ||

mkdir -p /run/systemd/generator/systemd-fsck@${_name}.service.d
+ if !
[ -f /run/systemd/generator/systemd-fsck@${_name}.service.d/after-pre-mount.conf ]; then

modules.d/98dracut-systemd/rootfs-generator.sh +4 -0
+        {
+            echo "[Unit]"
+            echo "After=dracut-pre-mount.service"
+        }
Quoted 1 line

/run/systemd/generator/systemd-fsck@${_name}.service.d/after-pre-mount.conf

modules.d/98dracut-systemd/rootfs-generator.sh +5 -0
+    fi
+
+}
+
 root=$(getarg root=)
 case "$root" in
     block:LABEL=*|LABEL=*)
@@ -95,6 +112,7 @@ GENERATOR_DIR="$1"
 
 if [ "${root%%:*}" = "block" ]; then
    generator_wait_for_dev "${root#block:}" "$RDRETRY"
+   generator_fsck_after_pre_mount "${root#block:}"
    strstr "$(cat /proc/cmdline)" 'root=' || generator_mount_rootfs
Quoted 2 lines

"${root#block:}" "$(getarg rootfstype=)" "$(getarg rootflags=)" fi

Hmmm.. How about systemd >=220? See the following change:
http://cgit.freedesktop.org/systemd/systemd/commit/?id=4dda4e637e4c17a14db6cd265f36f5e8a5050367

Shouldn't we also add "Before=systemd-fsck-root.service" to dracut-pre-mount.service?

Signature · 1 line
Alexander Tsoy

A message that is not in the archive (sent off-list or not yet received): 20150630024933.3c41d601-gl4+DzqHFJJb4Dhfy2/[email protected]

#16 lore raw

Re: [PATCH 7/8] ensure pre-mount (and resume) run before root fsck

Quoted 56 lines · Alexander Tsoy

В Fri, 26 Jun 2015 16:55:56 +0200
Thomas Renninger <[email protected]> пишет:

Quoted 47 lines

From: Andrei Borzenkov <[email protected]>

References:
https://bugzilla.suse.com/show_bug.cgi?id=906592

---
 modules.d/98dracut-systemd/rootfs-generator.sh | 18

++++++++++++++++++ 1 file changed, 18 insertions(+)

(quoted diff) +0 -0

b/modules.d/98dracut-systemd/rootfs-generator.sh index 5910ce7..7eb0b1a 100755 --- a/modules.d/98dracut-systemd/rootfs-generator.sh +++ b/modules.d/98dracut-systemd/rootfs-generator.sh @@ -65,6 +65,23 @@ generator_mount_rootfs() fi
}

modules.d/98dracut-systemd/rootfs-generator.sh +8 -0
+generator_fsck_after_pre_mount()
+{
+    local _name
+
+    [ -z "$1" ] && return 0
+
+    _name=$(dev_unit_name "$1")
+    [ -d /run/systemd/generator/systemd-fsck@${_name}.service.d ] ||

mkdir -p /run/systemd/generator/systemd-fsck@${_name}.service.d
+ if !
[ -f /run/systemd/generator/systemd-fsck@${_name}.service.d/after-pre-mount.conf ]; then

modules.d/98dracut-systemd/rootfs-generator.sh +4 -0
+        {
+            echo "[Unit]"
+            echo "After=dracut-pre-mount.service"
+        }
Quoted 1 line

/run/systemd/generator/systemd-fsck@${_name}.service.d/after-pre-mount.conf

modules.d/98dracut-systemd/rootfs-generator.sh +5 -0
+    fi
+
+}
+
 root=$(getarg root=)
 case "$root" in
     block:LABEL=*|LABEL=*)
@@ -95,6 +112,7 @@ GENERATOR_DIR="$1"
 
 if [ "${root%%:*}" = "block" ]; then
    generator_wait_for_dev "${root#block:}" "$RDRETRY"
+   generator_fsck_after_pre_mount "${root#block:}"
    strstr "$(cat /proc/cmdline)" 'root=' || generator_mount_rootfs
Quoted 2 lines

"${root#block:}" "$(getarg rootfstype=)" "$(getarg rootflags=)" fi

Hmmm.. How about systemd >=220? See the following change:
http://cgit.freedesktop.org/systemd/systemd/commit/?id=4dda4e637e4c17a14db6cd265f36f5e8a5050367

Quoted 3 lines

Shouldn't we also add "Before=systemd-fsck-root.service" to dracut-pre-mount.service?

Good point.. yes

#17 lore raw

PATCH 8/8 Use udev rules to create dmraid /dev/mapper/ devices

In reply to a message not in the archive

From: Hannes Reinecke <hare-IBi9RG/[email protected]>

https://bugzilla.opensuse.org/show_bug.cgi?id=905746

---
 modules.d/90dmraid/dmraid.sh       | 2 --
 modules.d/90dmraid/module-setup.sh | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)
modules.d/90dmraid/dmraid.sh +0 -2
index 3dcff38..cc4390f 100755
@@ -26,8 +26,6 @@ if [ -n "$DM_RAIDS" ] || getargbool 0 rd.auto; then
                 if [ "${s##$r}" != "$s" ]; then
                     info "Activating $s"
                     dmraid -ay -i -p --rm_partitions "$s" 2>&1 | vinfo
-                    [ -e "/dev/mapper/$s" ] && kpartx -a "/dev/mapper/$s" 2>&1 | vinfo
-                    udevsettle
                 fi
             done
         done
modules.d/90dmraid/module-setup.sh +2 -0
index e8de5f5..b77bbcf 100755
@@ -74,6 +74,8 @@ install() {
 
     inst "$moddir/dmraid.sh" /sbin/dmraid_scan
 
+    inst_rules 64-md-raid.rules 66-kpartx.rules 67-kpartx-compat.rules
+
     inst_libdir_file "libdmraid-events*.so*"
 
     inst_rules "$moddir/61-dmraid-imsm.rules"
Signature · 1 line
2.1.4

A message that is not in the archive (sent off-list or not yet received): 1435330557-17685-9-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org

#19 lore raw

Re: [PATCH 8/8] Use udev rules to create dmraid /dev/mapper/ devices

В Fri, 26 Jun 2015 16:55:57 +0200
Thomas Renninger <[email protected]> пишет:

Quoted 27 lines

From: Hannes Reinecke <hare-IBi9RG/[email protected]>

https://bugzilla.opensuse.org/show_bug.cgi?id=905746

---
 modules.d/90dmraid/dmraid.sh       | 2 --
 modules.d/90dmraid/module-setup.sh | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)
modules.d/90dmraid/dmraid.sh +0 -2
index 3dcff38..cc4390f 100755
@@ -26,8 +26,6 @@ if [ -n "$DM_RAIDS" ] || getargbool 0 rd.auto; then
                 if [ "${s##$r}" != "$s" ]; then
                     info "Activating $s"
                     dmraid -ay -i -p --rm_partitions "$s" 2>&1 | vinfo
-                    [ -e "/dev/mapper/$s" ] && kpartx -a "/dev/mapper/$s" 2>&1 | vinfo
-                    udevsettle
                 fi
             done
         done
modules.d/90dmraid/module-setup.sh +0 -0
index e8de5f5..b77bbcf 100755

modules.d/90dmraid/module-setup.sh install() { · line 78

Quoted 5 lines
modules.d/90dmraid/module-setup.sh +2 -0
@@ -74,6 +74,8 @@ install() {
 
     inst "$moddir/dmraid.sh" /sbin/dmraid_scan
 
+    inst_rules 64-md-raid.rules 66-kpartx.rules 67-kpartx-compat.rules
+

Why 64-md-raid.rules is here?

Quoted 3 lines
modules.d/90dmraid/module-setup.sh +0 -0
     inst_libdir_file "libdmraid-events*.so*"
 
     inst_rules "$moddir/61-dmraid-imsm.rules"

A message that is not in the archive (sent off-list or not yet received): [email protected]

#21 lore raw

Re: [PATCH 8/8] Use udev rules to create dmraid /dev/mapper/ devices

Quoted 8 lines · Andrei Borzenkov

Ð’ Fri, 26 Jun 2015 16:55:57 +0200

Quoted 6 lines
(quoted diff) +0 -0

b/modules.d/90dmraid/module-setup.sh index e8de5f5..b77bbcf 100755

modules.d/90dmraid/module-setup.sh +0 -0
@@ -74,6 +74,8 @@ install() {
 
Quoted 6 lines

modules.d/90dmraid/module-setup.sh install() { · line 78

Quoted 4 lines
modules.d/90dmraid/module-setup.sh +2 -0
     inst "$moddir/dmraid.sh" /sbin/dmraid_scan
 
+    inst_rules 64-md-raid.rules 66-kpartx.rules 67-kpartx-compat.rules
+

Why 64-md-raid.rules is here?

Probably the same reason why it slipped in once:
I mixed up md and dm and thought it is a dmraid rule which should get in again if kpartx rules are used.

Thanks for finding this, the rule is already added at the right place:
modules.d/90mdraid/module-setup.sh
and should not show up here again.

I repost this one.

Thomas

#22 lore raw

PATCH 1/1 Use udev rules to create dmraid /dev/mapper/ devices

In reply to a message not in the archive

From: Hannes Reinecke <hare-IBi9RG/[email protected]>

https://bugzilla.opensuse.org/show_bug.cgi?id=905746

Version 2: Remove 64-md-raid.rules

---
 modules.d/90dmraid/dmraid.sh       | 2 --
 modules.d/90dmraid/module-setup.sh | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)
modules.d/90dmraid/dmraid.sh +0 -2
index 3dcff38..cc4390f 100755
@@ -26,8 +26,6 @@ if [ -n "$DM_RAIDS" ] || getargbool 0 rd.auto; then
                 if [ "${s##$r}" != "$s" ]; then
                     info "Activating $s"
                     dmraid -ay -i -p --rm_partitions "$s" 2>&1 | vinfo
-                    [ -e "/dev/mapper/$s" ] && kpartx -a "/dev/mapper/$s" 2>&1 | vinfo
-                    udevsettle
                 fi
             done
         done
modules.d/90dmraid/module-setup.sh +2 -0
index e8de5f5..797a58e 100755
@@ -74,6 +74,8 @@ install() {
 
     inst "$moddir/dmraid.sh" /sbin/dmraid_scan
 
+    inst_rules 66-kpartx.rules 67-kpartx-compat.rules
+
     inst_libdir_file "libdmraid-events*.so*"
 
     inst_rules "$moddir/61-dmraid-imsm.rules"
Signature · 1 line
2.1.4

A message that is not in the archive (sent off-list or not yet received): 1435599415-10187-1-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org

#25 lore raw

Re: [PATCH] Use udev rules to create dmraid /dev/mapper/ devices

In reply to a message not in the archive
Quoted 31 lines · Thomas Renninger

From: Hannes Reinecke <hare-IBi9RG/[email protected]>

https://bugzilla.opensuse.org/show_bug.cgi?id=905746

Version 2: Remove 64-md-raid.rules

---
 modules.d/90dmraid/dmraid.sh       | 2 --
 modules.d/90dmraid/module-setup.sh | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)
modules.d/90dmraid/dmraid.sh +0 -2
index 3dcff38..cc4390f 100755
@@ -26,8 +26,6 @@ if [ -n "$DM_RAIDS" ] || getargbool 0 rd.auto; then
                 if [ "${s##$r}" != "$s" ]; then
                     info "Activating $s"
                     dmraid -ay -i -p --rm_partitions "$s" 2>&1 | vinfo
-                    [ -e "/dev/mapper/$s" ] && kpartx -a "/dev/mapper/$s" 2>&1 | vinfo
-                    udevsettle
                 fi
             done
         done
modules.d/90dmraid/module-setup.sh +0 -0
index e8de5f5..797a58e 100755

modules.d/90dmraid/module-setup.sh install() { · line 81

Quoted 8 lines
modules.d/90dmraid/module-setup.sh +2 -0
@@ -74,6 +74,8 @@ install() {
 
     inst "$moddir/dmraid.sh" /sbin/dmraid_scan
 
+    inst_rules 66-kpartx.rules 67-kpartx-compat.rules
+
     inst_libdir_file "libdmraid-events*.so*"
 
     inst_rules "$moddir/61-dmraid-imsm.rules"

Fedora does not have 66-kpartx.rules nor 67-kpartx-compat.rules ...

Heinz, do we need the kpartx part still?

I reverted to kpartx, because "dmraid" adds a "p" as a seperator by default for the partitions and this breaks existing installations.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#27 lore raw

Re: [PATCH] Use udev rules to create dmraid /dev/mapper/ devices

Quoted 43 lines · Harald Hoyer
Quoted 31 lines · Thomas Renninger

From: Hannes Reinecke <hare-IBi9RG/[email protected]>

https://bugzilla.opensuse.org/show_bug.cgi?id=905746

Version 2: Remove 64-md-raid.rules

---
 modules.d/90dmraid/dmraid.sh       | 2 --
 modules.d/90dmraid/module-setup.sh | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)
modules.d/90dmraid/dmraid.sh +0 -2
index 3dcff38..cc4390f 100755
@@ -26,8 +26,6 @@ if [ -n "$DM_RAIDS" ] || getargbool 0 rd.auto; then
                 if [ "${s##$r}" != "$s" ]; then
                     info "Activating $s"
                     dmraid -ay -i -p --rm_partitions "$s" 2>&1 | vinfo
-                    [ -e "/dev/mapper/$s" ] && kpartx -a "/dev/mapper/$s" 2>&1 | vinfo
-                    udevsettle
                 fi
             done
         done
modules.d/90dmraid/module-setup.sh +0 -0
index e8de5f5..797a58e 100755

modules.d/90dmraid/module-setup.sh install() { · line 81

Quoted 8 lines
modules.d/90dmraid/module-setup.sh +2 -0
@@ -74,6 +74,8 @@ install() {
 
     inst "$moddir/dmraid.sh" /sbin/dmraid_scan
 
+    inst_rules 66-kpartx.rules 67-kpartx-compat.rules
+
     inst_libdir_file "libdmraid-events*.so*"
 
     inst_rules "$moddir/61-dmraid-imsm.rules"

Fedora does not have 66-kpartx.rules nor 67-kpartx-compat.rules ...

Quoted 5 lines

Heinz, do we need the kpartx part still?

I reverted to kpartx, because "dmraid" adds a "p" as a seperator by default for the partitions and this breaks existing installations.

I would recommend splitting the kpartx call into a separate udev rule; otherwise you'll run into timing issues with udev.

Cheers,

Hannes

Signature · 5 lines
Dr. Hannes Reinecke		               zSeries & Storage
hare-IBi9RG/[email protected]			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

A message that is not in the archive (sent off-list or not yet received): 559BBE0F.1070903-IBi9RG/[email protected]

#29 lore raw

Re: [PATCH] Use udev rules to create dmraid /dev/mapper/ devices

Quoted 50 lines · Hannes Reinecke
Quoted 43 lines · Harald Hoyer
Quoted 31 lines · Thomas Renninger

From: Hannes Reinecke <hare-IBi9RG/[email protected]>

https://bugzilla.opensuse.org/show_bug.cgi?id=905746

Version 2: Remove 64-md-raid.rules

---
 modules.d/90dmraid/dmraid.sh       | 2 --
 modules.d/90dmraid/module-setup.sh | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)
modules.d/90dmraid/dmraid.sh +0 -2
index 3dcff38..cc4390f 100755
@@ -26,8 +26,6 @@ if [ -n "$DM_RAIDS" ] || getargbool 0 rd.auto; then
                 if [ "${s##$r}" != "$s" ]; then
                     info "Activating $s"
                     dmraid -ay -i -p --rm_partitions "$s" 2>&1 | vinfo
-                    [ -e "/dev/mapper/$s" ] && kpartx -a "/dev/mapper/$s" 2>&1 | vinfo
-                    udevsettle
                 fi
             done
         done
modules.d/90dmraid/module-setup.sh +0 -0
index e8de5f5..797a58e 100755

modules.d/90dmraid/module-setup.sh install() { · line 81

Quoted 8 lines
modules.d/90dmraid/module-setup.sh +2 -0
@@ -74,6 +74,8 @@ install() {
 
     inst "$moddir/dmraid.sh" /sbin/dmraid_scan
 
+    inst_rules 66-kpartx.rules 67-kpartx-compat.rules
+
     inst_libdir_file "libdmraid-events*.so*"
 
     inst_rules "$moddir/61-dmraid-imsm.rules"

Fedora does not have 66-kpartx.rules nor 67-kpartx-compat.rules ...

Quoted 5 lines

Heinz, do we need the kpartx part still?

I reverted to kpartx, because "dmraid" adds a "p" as a seperator by default for the partitions and this breaks existing installations.

Quoted 7 lines

I would recommend splitting the kpartx call into a separate udev rule; otherwise you'll run into timing issues with udev.

Cheers,

Hannes

Care to share your 66-kpartx.rules 67-kpartx-compat.rules or make them upstream? Shouldn't we agree on one naming scheme?

A message that is not in the archive (sent off-list or not yet received): [email protected]

#31 lore raw

Re: [PATCH] Use udev rules to create dmraid /dev/mapper/ devices

Quoted 54 lines · Harald Hoyer
Quoted 53 lines · Hannes Reinecke
Quoted 43 lines · Harald Hoyer
Quoted 31 lines · Thomas Renninger

From: Hannes Reinecke <hare-IBi9RG/[email protected]>

https://bugzilla.opensuse.org/show_bug.cgi?id=905746

Version 2: Remove 64-md-raid.rules

---
 modules.d/90dmraid/dmraid.sh       | 2 --
 modules.d/90dmraid/module-setup.sh | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)
modules.d/90dmraid/dmraid.sh +0 -2
index 3dcff38..cc4390f 100755
@@ -26,8 +26,6 @@ if [ -n "$DM_RAIDS" ] || getargbool 0 rd.auto; then
                 if [ "${s##$r}" != "$s" ]; then
                     info "Activating $s"
                     dmraid -ay -i -p --rm_partitions "$s" 2>&1 | vinfo
-                    [ -e "/dev/mapper/$s" ] && kpartx -a "/dev/mapper/$s" 2>&1 | vinfo
-                    udevsettle
                 fi
             done
         done
modules.d/90dmraid/module-setup.sh +0 -0
index e8de5f5..797a58e 100755

modules.d/90dmraid/module-setup.sh install() { · line 81

Quoted 8 lines
modules.d/90dmraid/module-setup.sh +2 -0
@@ -74,6 +74,8 @@ install() {
 
     inst "$moddir/dmraid.sh" /sbin/dmraid_scan
 
+    inst_rules 66-kpartx.rules 67-kpartx-compat.rules
+
     inst_libdir_file "libdmraid-events*.so*"
 
     inst_rules "$moddir/61-dmraid-imsm.rules"

Fedora does not have 66-kpartx.rules nor 67-kpartx-compat.rules ...

Quoted 5 lines

Heinz, do we need the kpartx part still?

I reverted to kpartx, because "dmraid" adds a "p" as a seperator by default for the partitions and this breaks existing installations.

I would recommend splitting the kpartx call into a separate udev rule; otherwise you'll run into timing issues with udev.

Quoted 8 lines
Quoted 4 lines

Cheers,

Hannes

Care to share your 66-kpartx.rules 67-kpartx-compat.rules or make them upstream? Shouldn't we agree on one naming scheme?

Sure, I'd love to.

Although the 67-kpartx-compat.rules is pretty much SUSE specific, as we've messed up the device-mapper device naming
(older SUSE versions would be creating device-mapper names with underscores, but the links would be using normal dashes). So it's not relevant to the general audience, but yeah I'd like to have them both included.

Will be sending patches to multipath-tools covering that.

Cheers,

Hannes

Signature · 5 lines
Dr. Hannes Reinecke		               zSeries & Storage
hare-IBi9RG/[email protected]			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)