Due to the following commit in dracut, which splits out hostonly modules commit 5ce7cc7337a4c769b223152c083914f2052aa348 Author: Harald Hoyer harald@redhat.com Date: Mon Jul 10 13:28:40 2017 +0200
add 90multipath-hostonly module
hardcoding the wwid of the drives in the initramfs causes problems when the drives are cloned to a system with the same hardware, but different disk wwid's
https://bugzilla.redhat.com/show_bug.cgi?id=1457311
So kdump should decide whether to include the hostonly module. The multipath-hostonly can help kdump to include only the needed mpath device, in order to use less memory by 2nd kernel.
---- The performance ----- before this patch [root@localhost ~]# time kdumpctl start Detected change(s) in the following file(s):
/etc/kdump.conf Rebuilding /boot/initramfs-4.13.9-300.fc27.x86_64kdump.img kexec: loaded kdump kernel Starting kdump: [OK]
real 0m12.485s user 0m10.096s sys 0m1.887s
after this patch
root@localhost ~]# time kdumpctl start Detected change(s) in the following file(s):
/etc/kdump.conf Rebuilding /boot/initramfs-4.13.9-300.fc27.x86_64kdump.img kexec: loaded kdump kernel Starting kdump: [OK]
real 0m15.839s user 0m13.015s sys 0m1.853s
Signed-off-by: Pingfan Liu piliu@redhat.com --- dracut-module-setup.sh | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 256d315..2c6de14 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -7,6 +7,13 @@ if ! [[ -d "${initdir}/tmp" ]]; then mkdir -p "${initdir}/tmp" fi
+is_mpath() { + local _dev=$1 + [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 + [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ mpath- ]] && return 0 + return 1 +} + check() { [[ $debug ]] && set -x #kdumpctl sets this explicitly @@ -28,6 +35,7 @@ depends() { _dep="$_dep network" fi
+ for_each_host_dev_and_slaves is_mpath && _dep="$_dep multipath-hostonly" echo $_dep return 0 }
On 11/23/17 at 10:17am, Pingfan Liu wrote:
Due to the following commit in dracut, which splits out hostonly modules commit 5ce7cc7337a4c769b223152c083914f2052aa348 Author: Harald Hoyer harald@redhat.com Date: Mon Jul 10 13:28:40 2017 +0200
add 90multipath-hostonly module hardcoding the wwid of the drives in the initramfs causes problems when the drives are cloned to a system with the same hardware, but different disk wwid's https://bugzilla.redhat.com/show_bug.cgi?id=1457311
So kdump should decide whether to include the hostonly module. The multipath-hostonly can help kdump to include only the needed mpath device, in order to use less memory by 2nd kernel.
---- The performance ----- before this patch [root@localhost ~]# time kdumpctl start Detected change(s) in the following file(s):
/etc/kdump.conf Rebuilding /boot/initramfs-4.13.9-300.fc27.x86_64kdump.img kexec: loaded kdump kernel Starting kdump: [OK]
real 0m12.485s user 0m10.096s sys 0m1.887s
after this patch
root@localhost ~]# time kdumpctl start Detected change(s) in the following file(s):
/etc/kdump.conf Rebuilding /boot/initramfs-4.13.9-300.fc27.x86_64kdump.img kexec: loaded kdump kernel Starting kdump: [OK]
real 0m15.839s user 0m13.015s sys 0m1.853s
I think you were testing in F27 instead of rawhide, in my rawhide without multpath, it is nearly same with the additional for_each loop. But since we have to add this or we will have regression, thus Acked-by: Dave Young dyoung@redhat.com
In the future it can be improved in dracut.
Signed-off-by: Pingfan Liu piliu@redhat.com
dracut-module-setup.sh | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 256d315..2c6de14 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -7,6 +7,13 @@ if ! [[ -d "${initdir}/tmp" ]]; then mkdir -p "${initdir}/tmp" fi
+is_mpath() {
- local _dev=$1
- [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1
- [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ mpath- ]] && return 0
- return 1
+}
check() { [[ $debug ]] && set -x #kdumpctl sets this explicitly @@ -28,6 +35,7 @@ depends() { _dep="$_dep network" fi
- for_each_host_dev_and_slaves is_mpath && _dep="$_dep multipath-hostonly" echo $_dep return 0
}
2.7.4 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org