In case of only network target, we can clearly and safely
remove more unnecessary modules to reduce initramfs size,
and to enhance stability.
Signed-off-by: Xunlei Pang <xlpang(a)redhat.com>
---
mkdumprd | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/mkdumprd b/mkdumprd
index d108811..28f4fd7 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -386,13 +386,14 @@ is_dm()
omit_dracut_modules()
{
local target majmin
- local crypt_exists dm_exists
+ local crypt_exists dm_exists network_only
# Skip fadump case
is_fadump_capable && return
crypt_exists=0
dm_exists=0
+ network_only=1
for target in $(get_kdump_targets); do
if [ -b "$target" ]; then
@@ -403,6 +404,9 @@ omit_dracut_modules()
# Check "dm"
check_block_and_slaves is_dm $majmin && dm_exists=1
fi
+
+ # Check nfs/ssh dumping
+ [[ "$target" != "nfs" && "$target" !=
"ssh" ]] && network_only=0
done
# Omit "crypt", BZ1451717
@@ -415,6 +419,12 @@ omit_dracut_modules()
# "dm_exists=0" implies "crypt_exists=0"
add_dracut_arg "--omit" "lvm dm multipath dmraid"
fi
+
+ # Further omit more modules in case of nfs/ssh dumping
+ if [ "$network_only" == "1" ]; then
+ # "network_only=1" implies "dm_exists=0"
+ add_dracut_arg "--omit" "iscsi fcoe fcoe-uefi"
+ fi
}
if ! check_resettable; then
--
1.8.3.1