From 90bc3df3addedc7dd8b57649be2652f96d62d646 Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Jul 02 2009 19:33:05 +0000 Subject: Updating mkdumprd2 infrastructure --- diff --git a/kdump_initscripts/kdumpinit.rootfs b/kdump_initscripts/kdumpinit.rootfs index 166262d..ba8d90d 100644 --- a/kdump_initscripts/kdumpinit.rootfs +++ b/kdump_initscripts/kdumpinit.rootfs @@ -21,12 +21,51 @@ start_udev ################################################## load_modules +################################################## +# Assemble any existing lvm arrays +################################################## +assemble_lvm_array + + +################################################## +# Assemble any mdraid partitions that might exist +################################################## +#TODO - FILL ME IN +################################################## +# Mount the root file system +# Note that the sample manifest modified +# The /etc/fstab file to put the root file system +# under /mnt directly +################################################## +mount /mnt +if [ $? -ne 0] + echo "Failed to mount root fs for dump capture. rebooting" + reboot -f +fi +################################################## +# Now capture the core dump to the target fs +# Note we need to set the date here +################################################## +if [ -f /etc/clock ] +then + . /etc/clock +fi +if [ "$UTC" == "true" ] +then + TIME_FORMAT=-u +else + TIME_FORMAT=-l +fi +hwclock --hctosys $TIME_FORMAT +DATE=`date +%Y-%m-%d-%T` +cp /proc/vmcore /mnt/var/crash/$DATE/vmcore + ################################################## # Reboot the system to get back to production ################################################## diff --git a/kdump_sample_manifests/manifest.localrootfs b/kdump_sample_manifests/manifest.localrootfs index faa070e..7aa7523 100644 --- a/kdump_sample_manifests/manifest.localrootfs +++ b/kdump_sample_manifests/manifest.localrootfs @@ -11,6 +11,7 @@ # 1) reg # reg # A regular file copy from the source to the dst directory +# # 2) creg # creg # like reg, but only copy if the source file exists @@ -74,7 +75,13 @@ creg /etc/mdadm.conf /etc gen awk /etc/fstab '/^[^#]/{print $1 " /mnt"$2 " "$3 " "$4 " "$5 " "$6}' /etc/fstab ################################################### +# Grab /etc/clock so we can set the clock properly +################################################### +creg /etc/clock /etc + +################################################### # Grab the standard initscript to capture to the local # rootfs ################################################### -#ren /usr/share/kexec-tools/kdumpinit.rootfs /init +# +ren /usr/share/kexec-tools/kdumpinit.rootfs /init diff --git a/sources b/sources index 0c8330b..9c6cef9 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ d9f2ecd3c3307905f24130a25816e6cc kexec-tools-2.0.0.tar.bz2 3e802d638dce0080b910f15908c04a24 kexec-tools-po.tar.gz 190f8878aa7e7b63a96fde5d59538eec makedumpfile-1.3.3.tar.gz -f06ce57e7e4eb59dde1c986f8787c8b0 mkdumprd2-files.tbz2 +eeaf6fd69d4254ea61e42259898bc1ef mkdumprd2-files.tbz2