[Ovirt-devel] [PATCH node] kdump support
Alan Pevec
apevec at redhat.com
Thu Jun 25 21:49:29 UTC 2009
- when /data is created, configure kdump to use /data/core/
- prepare a symlink to the kernel image, so that kdump initscript
can find it
Signed-off-by: Alan Pevec <apevec at redhat.com>
---
scripts/ovirt-early | 13 +++++++++++++
scripts/ovirt-functions | 8 ++++++++
2 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/scripts/ovirt-early b/scripts/ovirt-early
index ac54e4b..1732f9c 100755
--- a/scripts/ovirt-early
+++ b/scripts/ovirt-early
@@ -395,6 +395,19 @@ start() {
start_log
fi
+ # link to the kernel image for kdump
+ mount_live
+ if [ -e /live/*linux/vmlinuz0 ]; then
+ ln -s /live/*linux/vmlinuz0 /boot-kdump/vmlinuz-$(uname -r)
+ else
+ mount_boot
+ if [ -e /boot/vmlinuz0 ]; then
+ ln -s /boot/vmlinuz0 /boot-kdump/vmlinuz-$(uname -r)
+ else
+ log "Cannot find kernel for kdump"
+ fi
+ fi
+
if [ "$standalone" = 1 ]; then
# In standalone mode, fix libvirt to not use gssapi
sed -c -i -e s/^keytab/#keytab/ \
diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions
index e938256..e6218cc 100755
--- a/scripts/ovirt-functions
+++ b/scripts/ovirt-functions
@@ -394,6 +394,14 @@ mount_data() {
mount /var/log/core
restorecon -rv /var/log/core
+ # configure kdump
+ cat > /etc/kdump.conf <<\EOF
+ext3 /dev/HostVG/Data
+path /core
+EOF
+ ovirt_store_config /etc/kdump.conf
+ service kdump restart
+
return 0
else
# /data is not available
--
1.6.0.6
More information about the ovirt-devel
mailing list