diff -Nru multipath-tools-0.5.0/debian/changelog multipath-tools-0.5.0/debian/changelog --- multipath-tools-0.5.0/debian/changelog 2016-02-09 15:27:18.000000000 -0500 +++ multipath-tools-0.5.0/debian/changelog 2016-02-11 17:56:56.000000000 -0500 @@ -1,3 +1,15 @@ +multipath-tools (0.5.0-7ubuntu14mpathlvm4) UNRELEASED; urgency=medium + + * Remove partition device nodes of individual paths (for LVM on multipath) (LP: #1540401) + - debian/multipath-tools.dm-mpath-lvm.udev: udev rule for that. + - debian/initramfs/hooks: copy the udev rule and partx to the initramfs. + - debian/initramfs/init-top: load the dm-multipath module for 'multipath -c'. + - debian/rules: install the udev rule (priority 56: after 55-scsi-sg3_id) + * debian/rules: don't ship 95-multipath.rules udev rules anymore; they are + not necessary with multipath-tools listening for udev events directly. + + -- Mauricio Faria de Oliveira Wed, 03 Feb 2016 20:45:02 -0200 + multipath-tools (0.5.0-7ubuntu14) xenial; urgency=medium * debian/patches/kpartx_more_loopback_fixes.patch: fix loopback mounted diff -Nru multipath-tools-0.5.0/debian/initramfs/hooks multipath-tools-0.5.0/debian/initramfs/hooks --- multipath-tools-0.5.0/debian/initramfs/hooks 2016-01-20 10:27:04.000000000 -0500 +++ multipath-tools-0.5.0/debian/initramfs/hooks 2016-02-11 17:24:53.000000000 -0500 @@ -35,7 +35,7 @@ add_udev_rules() { - for rules in 95-multipath.rules; do + for rules in 56-dm-mpath-lvm.rules 95-multipath.rules; do if [ -e /lib/udev/rules.d/$rules ]; then cp -p /lib/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/ fi @@ -47,6 +47,7 @@ for x in /lib/multipath/*; do copy_exec $x /lib/multipath/ done +copy_exec /usr/bin/partx add_udev_rules copy_exec /sbin/multipathd /sbin diff -Nru multipath-tools-0.5.0/debian/initramfs/init-top multipath-tools-0.5.0/debian/initramfs/init-top --- multipath-tools-0.5.0/debian/initramfs/init-top 2015-07-30 21:57:57.000000000 -0400 +++ multipath-tools-0.5.0/debian/initramfs/init-top 2016-02-11 15:20:02.000000000 -0500 @@ -28,6 +28,16 @@ VERBOSITY=0 HW_HANDLERS="" +verbose && log_begin_msg "Loading multipath modules" +for module in dm-multipath; do + if modprobe --syslog "$module"; then + verbose && log_success_msg "loaded module ${module}." + else + log_failure_msg "failed to load module ${module}." + fi +done +verbose && log_end_msg + verbose && log_begin_msg "Loading multipath hardware handlers" for module in ${HW_HANDLERS}; do if modprobe --syslog "$module"; then diff -Nru multipath-tools-0.5.0/debian/multipath-tools.dm-mpath-lvm.udev multipath-tools-0.5.0/debian/multipath-tools.dm-mpath-lvm.udev --- multipath-tools-0.5.0/debian/multipath-tools.dm-mpath-lvm.udev 1969-12-31 19:00:00.000000000 -0500 +++ multipath-tools-0.5.0/debian/multipath-tools.dm-mpath-lvm.udev 2016-02-11 17:24:53.000000000 -0500 @@ -0,0 +1,26 @@ +# An individual device may be part of a multipath device. +# In such case, remove its partition device nodes so for +# LVM to scan/lock/use only the multipath device. +# - Check it on 'add' uevent. +# - Check it on 'change' uevent (it may change). + +SUBSYSTEM!="block", \ + GOTO="end_mpath" + +ACTION=="remove", \ + GOTO="end_mpath" + +ENV{DEVTYPE}=="partition", \ + IMPORT{parent}="DM_MULTIPATH_DEVICE_PATH", \ + GOTO="end_mpath" + +PROGRAM=="/sbin/multipath -c $devnode", \ + ENV{DM_MULTIPATH_DEVICE_PATH}="1", \ + ENV{ID_FS_TYPE}="mpath_member", \ + RUN+="/usr/bin/partx -d --nr 1-1024 $devnode", \ + GOTO="end_mpath" + +# Not part of a multipath device. +ENV{DM_MULTIPATH_DEVICE_PATH}="" + +LABEL="end_mpath" diff -Nru multipath-tools-0.5.0/debian/rules multipath-tools-0.5.0/debian/rules --- multipath-tools-0.5.0/debian/rules 2016-01-20 12:26:04.000000000 -0500 +++ multipath-tools-0.5.0/debian/rules 2016-02-11 17:52:01.000000000 -0500 @@ -106,7 +106,7 @@ dh_installinit -pmultipath-tools dh_installinit -pmultipath-tools --name=multipath-tools-boot --no-start -- start 21 S . dh_installudev -pkpartx --priority=95 - dh_installudev -pmultipath-tools --name=multipath --priority=95 + dh_installudev -pmultipath-tools --name=dm-mpath-lvm --priority=56 dh_installdebconf -pmultipath-tools-boot dh_installman dh_makeshlibs --add-udeb=multipath-udeb