[PATCH v2] kdumpctl: Print warning in case the raw device is formatted and contains filesystem.
by Kenneth Dsouza
From: Kenneth D'souza <kdsouza(a)redhat.com>
Changes since v1: Added warning instead of error.
Currently the kdumpctl script doesn't check if the raw device is
formatted which might destroy existing data at the time of dump
capture.
This patch addresses this issue, by ensuring kdumpctl prints
a warning in case it finds the raw device to be formatted.
Signed-off-by: Kenneth D'souza <kdsouza(a)redhat.com>
---
kdumpctl | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kdumpctl b/kdumpctl
index 6a01c13..201586c 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -779,6 +779,11 @@ save_raw()
echo "raw partition $raw_target not found"
return 1
}
+ check_fs=$(lsblk --nodeps -npo FSTYPE $raw_target)
+ if [[ $(echo $check_fs | wc -w) -ne 0 ]]; then
+ echo "Warning: Detected '$check_fs' signature on $raw_target, data loss is expected."
+ return 0
+ fi
kdump_dir=`grep ^path $KDUMP_CONFIG_FILE | cut -d' ' -f2-`
if [ -z "${kdump_dir}" ]; then
coredir="/var/crash/`date +"%Y-%m-%d-%H:%M"`"
--
2.14.3
5 years, 1 month
[PATCH v2 0/3] fadump: cleanup network configuration
by Hari Bathini
Currently, while building the initrd with dump capture support, if a
network-based dump target is specified, network is configured in the
initial ramdisk which includes an interface name change if necessary.
When fadump is configured, the initrd used for booting production
kernel is rebuilt with dump capturing support. This initrd applies
the network configuration changes, intended for capturing a dump,
while booting the production kernel as well, potentially changing
the network interface name in production kernel. Avoid enforcing
kdump specific network parameters while boot production kernel to
tackle that problem. The first patch in this patch-set prefixes all
network related cmdline conf files with 'kdump' for graceful handling.
The second patch adds a dracut cmdline hook in the initrd to remove
network cmdline conf files while booting production kernel. The last
patch reverts an old commit that is no longer relevant with the
change in second patch.
---
Hari Bathini (3):
add kdump prefix to network cmdline config files
fadump: avoid renaming network interface name during regular boot
avoid network interface rename when unnecessary
dracut-kdump-boot.sh | 12 ++++++++++++
dracut-module-setup.sh | 13 +++++--------
kexec-tools.spec | 3 +++
3 files changed, 20 insertions(+), 8 deletions(-)
create mode 100644 dracut-kdump-boot.sh
5 years, 2 months
[PATCH 0/3] fadump: cleanup network configuration
by Hari Bathini
Currently, while building the initrd with dump capture support, if a
network-based dump target is specified, network is configured in the
initial ramdisk which includes an interface name change if necessary.
When fadump is configured, the initrd used for booting production
kernel is rebuilt with dump capturing support. This initrd applies
the network configuration changes, intended for capturing a dump,
while booting the production kernel as well, potentially changing
the network interface name in production kernel. Avoid enforcing
kdump specific network parameters while boot production kernel to
tackle that problem. The first patch in this patch-set prefixes all
network related cmdline conf files with 'kdump' for graceful handling.
The second patch adds a dracut cmdline hook in the initrd to remove
network cmdline conf files while booting production kernel. The last
patch ensures that the network interface name is renamed only when
it is kernel assigned.
---
Hari Bathini (3):
add kdump prefix to network cmdline config files
fadump: avoid renaming network interface name during regular boot
avoid network interface rename when unnecessary
dracut-kdump-boot.sh | 12 ++++++++++++
dracut-module-setup.sh | 13 +++++--------
kexec-tools.spec | 3 +++
3 files changed, 20 insertions(+), 8 deletions(-)
create mode 100644 dracut-kdump-boot.sh
--
5 years, 2 months
[PATCH] Add 'nfs4' to the list of deprecated kdump configuration options.
by Raghavendra Rao
Rather than calling out 'nfs4' as an invalid config option within
kdump.conf, it would be ideal to label it as "deprecated" as its no
longer used. This is because nfs shares are expected to be mounted
beforehand hence no special care needs to taken with respect to NFS
versions.
Only when opting for dracut_args, one can specify the NFS version
explicitly.
Signed-off-by: Raghavendra Rao <ragrao(a)redhat.com>
---
kdumpctl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl
index 6a01c13..b81df9a 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -229,7 +229,7 @@ check_config()
return 1;
}
;;
- net|options|link_delay|disk_timeout|debug_mem_level|blacklist)
+ net|nfs4|options|link_delay|disk_timeout|debug_mem_level|blacklist)
echo "Deprecated kdump config option: $config_opt. Refer to kdump.conf manpage for alternatives."
return 1
;;
--
1.8.3.1
5 years, 2 months