Commit Graph

814 Commits

Author SHA1 Message Date
Hari Bathini
78589a3207 kdump: Check whether or not to invoke capturing vmcore
The script dracut-kdump.sh is  responsible for capturing vmcore during
second kernel boot.  Currently this  script  gets installed into kdump
initrd as part of kdumpbase dracut module.

With fadump support, 'dracut-kdump.sh' script also gets installed into
default initrd to capture  vmcore generated by firmware assisted dump.
Thus in fadump case, the  same initrd is  going to be used for  normal
boot as well as boot after system crash. Hence a  check is required to
see if it is a normal boot or boot after crash.

A new node "ibm,kernel-dump" is added, to the device tree, by firmware
to notify kernel if it is booting after crash.  The below patch adds a
check for this node  before executing  steps to  capture vmcore.  This
check will help bypassing  the vmcore capture steps during normal boot
process.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-07-28 13:03:48 +08:00
Hari Bathini
5bb5be045c kdump: Rebuild default initrd for firmware assisted dump
The current kdump infrastructure builds a separate initrd which then
gets loaded into memory by kexec-tools for use by  kdump kernel. But
firmware  assisted dump (FADUMP) does not  use kexec-based approach.
After crash, firmware reboots  the  partition and  loads grub loader
like the normal  booting process does. Hence in the FADUMP approach,
the second kernel  (after crash) will always  use the default initrd
(OS built). So, to support FADUMP, change is required,  as in to add
dump capturing steps, in this initrd.

The  current kdumpctl script implementation  already has the code to
build initrd  using mkdumprd. This patch  uses  the new  '--rebuild'
option introduced, in  dracut, to incrementally build  the initramfs
image. Before rebuilding, we may need to  probe the initrd image for
fadump support, to avoid  rebuilding the initrd image multiple times
unnecessarily. This can be done using "lsinitrd" tool with the newly
proposed '--mod' option  & inspecting the presence of "kdumpbase" in
the list of modules of default initrd image. We rebuild the image if
only "kdumpbase" module is missing in the initrd image. Also, before
rebuilding, a backup of default initrd image is taken.

Kexec-tools package in rhel7 is now enhanced to insert a out-of-tree
kdump  module for  dracut,  which is responsible for  adding  vmcore
capture  steps into initrd,  if dracut is  invoked  with  "IN_KDUMP"
environment variable set to 1.  mkdumprd script exports "IN_KDUMP=1"
environment variable before  invoking  dracut to build kdump initrd.
This patch relies on this current mechanism of kdump init script.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-07-28 13:03:44 +08:00
Hari Bathini
9f7b8b03b4 kdump: Modify kdump script to stop firmware assisted dump
During service kdump stop, if firmware assisted dump is enabled
and running,  then stop firmware assisted dump by echo'ing 0 to
'/sys/kernel/fadump_registered' file.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-07-28 13:03:41 +08:00
Hari Bathini
734790aa75 kdump: Modify kdump script to start the firmware assisted dump.
During service kdump start, if firmware assisted dump is not enabled then
fallback to starting of existing kexec based kdump.  If firmware assisted
is enabled but not running, then start firmware assisted dump by echo'ing
1 to '/sys/kernel/fadump_registered' file.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-07-28 13:03:38 +08:00
Hari Bathini
e0e70085e1 kdump: Modify status routine to check for firmware-assisted dump
This patch enables kdump script to  check if firmware-assisted dump is
enabled or not by reading value from '/sys/kernel/fadump_enabled'. The
determine_dump_mode() routine sets dump_mode to 'fadump', if fadump is
enabled. By default, dump_mode is set to 'kdump' mode.

Modify status routine to check if firmware assisted dump is registered
or not by  reading value from '/sys/kernel/fadump_registered' file. If
it is set to '1' then return status=0 else return status=1.

    0  <= Firmware assisted is enabled and running
    1  <= Firmware assisted is enabled but not running

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-07-28 13:02:28 +08:00
WANG Chao
0b63f4a522 Release 2.0.7-4
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-07-24 13:01:19 +08:00
WANG Chao
ba7660f37e dracut-module-setup: NIC renamed with prefix "kdump-" for native ethX
We met a problem that eth0 ends up being eth1 and eth1 being eth0
between 1st and 2nd kernel. Because we pass ifname=eth0:$mac to force
it's named eth0 and since "eth0"is already taken by the other NIC, udev
fails to bring up the NIC we want, thus kdump fails.

kernel assigned network interface names are not persistent. So if first
kernel is using kernel assigned interface names, then force it to use
"kdump-" prefixed names in second kernel.

For ethX, we put a prefix "kdump-" before it, so in 2nd kernel, ethX
will name to "kdump-ethX". So that we can avoid the naming conflict.

We only need to change the ethernet card name, that means, for bridge,
vlan, bond, team devices' names , we never prefix them. Because these
names are assigned when they're created by userspace.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-07-24 12:58:06 +08:00
WANG Chao
fd4bd5552b dracut-module-setup: avoid writing the vlan.conf twice
We handle different types of device for vlan. For each type, it should
write different options for vlan.conf in each control path.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-07-24 12:57:53 +08:00
WANG Chao
10b2ee22ef kdump-anaconda-addon: update to kdump-anaconda-addon-001-4-g03898ef.tar.gz
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-07-24 12:56:57 +08:00
Hari Bathini
69986be99d cleanup: Remove "function" keyword from all functions and correct typos
This cleanup patch removes unnecessary keyword "function" at all places in
kdumpctl script. Also, corrects couple of typos in the script.

Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-07-21 17:47:21 +08:00
WANG Chao
61fcf06f98 Release 2.0.7-3
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-07-21 14:50:43 +08:00
WANG Chao
a87b9ff7ef Update kexec-tools-anaconda-addon
update to kdump-anaconda-addon-20140721.tar.gz

Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-07-21 14:49:13 +08:00
WANG Chao
463742ad95 kdumpctl: display message while waiting for the single instance lock
Vivek suggested we should display message while waiting for the lock,
because the waiting could be long and user will have no idea what's
going on.

So we will repeat the following message every 5 seconds while waiting:

"Another app is currently holding the kdump lock; waiting for it to exit..."

Thanks Vivek for providing a more comprehensive message.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-07-18 13:31:54 +08:00
WANG Chao
993961a411 Fix a typo in %changelog
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-07-16 15:10:00 +08:00
WANG Chao
c45783a2c3 Release 2.0.7-2
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-07-16 14:59:13 +08:00
Baoquan He
e5769870b1 Stop maximizing the bitmap buffer to reduce the risk of OOM.
This is a backport of the following upstream commit.

commit 0b732828091a545185ad13d0b2e6800600788d61
Author: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Date:   Tue Jun 10 13:57:29 2014 +0900

    [PATCH 3/3] Stop maximizing the bitmap buffer to reduce the risk of OOM.

    We tried to maximize the bitmap buffer to get the best performance,
    but the performance degradation caused by multi-cycle processing
    looks very small according to the benchmark on 2TB memory:

      https://lkml.org/lkml/2013/3/26/914

    This result means we don't need to make an effort to maximize the
    bitmap buffer, it will just increase the risk of OOM.

    This patch sets a small fixed value (4MB) as a safety limit,
    it may be safer and enough in most cases.

    Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-07-16 14:57:21 +08:00
Baoquan He
23d1c25fd5 Move counting pfn_memhole for cyclic mode.
This is a backport of the following upstream commit.

commit 2648a8f7caa63e3ec82fd4bce471cec0a895b704
Author: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Date:   Mon Jun 9 17:48:30 2014 +0900

    [PATCH 2/3] Move counting pfn_memhole for cyclic mode.

    In cyclic mode, memory holes are checked in initialize_2nd_bitmap_cyclic()
    in both the kdump path and the ELF path, so pfn_memhole should be
    counted there.

    Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-07-16 14:57:18 +08:00
Baoquan He
0bb00b495b Remove the 1st bitmap buffer from the ELF path in cyclic mode.
This is a backport of the following upstream commit.

commit 16b94ab7fad6744d8b77f2b26838f220307e3118
Author: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Date:   Mon Jun 9 17:44:43 2014 +0900

    [PATCH 1/3] Remove the 1st bitmap buffer from the ELF path in cyclic mode.

    We can create the 2nd bitmap without creating the 1st bitmap by commit
    363d53fc8, so we don't need to create the 1st bitmap in cyclic mode
    in the ELF path since it isn't used. Thus, we can use the whole bitmap
    buffer only for the 2nd bitmap like the kdump path.

    Signed-off-by: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-07-16 14:57:15 +08:00
Baoquan He
598e09b6b6 Fix free bitmap_buffer_cyclic error.
This is a backport of the following upstream commit. It is about freeing
the wrong bitmap thing, it could increase the risk of OOM when system is
in an edge of OOM.

commit 0e7b1a6e3c1919c9222b662d458637ddf802dd04
Author: Arthur Zou <zzou@redhat.com>
Date:   Wed May 7 17:54:16 2014 +0900

    [PATCH v3] Fix free bitmap_buffer_cyclic error.

    Description:
    In create_dump_bitmap() and write_kdump_pages_and_bitmap_cyclic(),
    What should be freed is info->partial_bitmap instead of info->bitmap.

    Solution:
    Add two functions to free the bitmap_buffer_cyclic. info->partial_bitmap1
    is freed by free_bitmap1_buffer_cyclic(). info->partial_bitmap2 is
    freed by free_bitmap2_buffer_cyclic(). At the same time, remove
    thoes frees that free partial_bitmap1 or partial_bitmap2 at the end
    of main() because partial_bitmap1 and partial_bitmap2 has been freed
    after dump file has been written out, so there is no need to free it
    again at the end of main.

    Signed-off-by: Arthur Zou <zzou@redhat.com>

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-07-16 14:57:00 +08:00
Baoquan He
46a8fa94aa Introduce the mdf_pfn_t type.
This is a backport of the following upstream commit. Late back ported
commit depends on it.

commit 9dc6440c63320066bc6344c6e3ca3c3af88bcc42
Author: Petr Tesarik <ptesarik@suse.cz>
Date:   Thu Apr 24 10:58:43 2014 +0900

    [PATCH v3] Introduce the mdf_pfn_t type.

    Replace unsigned long long with mdf_pfn_t where:

      a. the variable denotes a PFN
      b. the variable is a number of pages

    The number of pages is converted to a mdf_pfn_t, because it is a result
    of subtracting two PFNs or incremented in a loop over a range of PFNs,
    so it can get as large as a PFN.

    Note: The mdf_ (i.e. makedumpfile) prefix is used to prevent possible
    conflicts with other software that defines a pfn_t type.

    Signed-off-by: Petr Tesarik <ptesarik@suse.cz>

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com
2014-07-16 14:56:41 +08:00
WANG Chao
33736ef595 makedumpfile: Fix Makefile for eppic_makedumpfile.so build
Backport from the following commit from upstream makedumpfile:

commit 45fc42c
Author: WANG Chao <chaowang@redhat.com>
Date:   Tue Jun 10 14:11:27 2014 +0900

    [PATCH] Fix Makefile for eppic_makedumpfile.so build.

    When libeppic isn't installed on a standard location, building
    eppic_makedumpfile.so with -leppic directly doesn't work.

    Add LDFLAGS to build arguments, so that one can pass LDFLAGS="-Ldir
    -Idir" to tell where to search for libeppic library and its header
    files.

    For example, if eppic source is installed on the same directory level
    with makedumpfile as the following:

    makedumpfile
     |--- arch
     +--- eeppic_scripts
    eppic
     |--- applications
     +--- libeppic

    After compiling libeppic, one can use the following command to build
    eppic_makedumpfile.so:

    make LDFLAGS="-I../eppic/libeppic -L../eppic/libeppic" eppic_makedumpfile.so

    Signed-off-by: WANG Chao <chaowang@redhat.com>

With this patch, we don't need use a fedora-specific patch for building
eppic_makedumpfile.so.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-06-13 13:17:56 +08:00
WANG Chao
2db8de3c8a kexec-tools.spec: add changelog
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-06-10 11:24:55 +08:00
WANG Chao
85ee62fdd1 Release 2.0.7-1
Rebase kexec-tools-2.0.7

Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-06-10 11:20:36 +08:00
Dennis Gilmore
3a560f19ab - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 21:17:21 -05:00
Marc Milgram
7ea50dc7a3 kdump-module-setup.sh: Handle static IPs defined in NetworkManager gui
NetworkManager changed the format of ifcfg-device files.  They may define
static IP addresses with the following format:
    IPADDR0=192.168.122.100
    PREFIX0=24

There may be up to 255 ip addresses for a network device - each with a unique
number tagged to the end of IPADDR and PREFIX.

Prior to this fix, kdump only handled static ip addresses defined with
   IPADDR=192.168.122.100
   PREFIX=24

ie. without the number.

The solution is to use "ip" commands to find the correct network information.

Tested with both static and dynamic IP addresses.

v2: Fixed a local variable that was set incorrectly
v3: Fix iscsi case

Signed-off-by: Marc Milgram <mmilgram@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Baoquan He <bhe@redhat.com>
Acked-by: WANG Chao <chaowang@redhat.com>
2014-05-30 14:52:17 +08:00
WANG Chao
40ce1a4ece Release 2.0.6-8
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-05-22 18:33:02 +08:00
WANG Chao
04c1dc9820 update source for kexec-tools-anaconda-addon
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-05-22 18:33:02 +08:00
Arthur Zou
2553056c74 Rename the subpackage kdump-anaconda-addon
Rename the subpackage kdump-anaconda-addon to kexec-tools-anaconda-addon
to keep consistency and make fedpkg build happy

Because every time fedpkg builds a new release the package version number
should increase. But kdump-annaconda-addon just keep same version, so let's
rename it to kexec-tools-annaconda-addon here kexec-tools- is a default prefix.
For version let's use default top level version.

At the same time, rename the kdump-anaconda-addon directory name to anaconda-addon
to make it more standard. Using the current data instead of version number as a
surfix of kdump-anaconda-addon tarball just like kexec-tools-po did.

Signed-off-by: Arthur Zou <zzou@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2014-05-22 18:32:43 +08:00
WANG Chao
4742c0fb6b Release 2.0.6-7
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-05-21 17:33:00 +08:00
WANG Chao
f6eaa4e227 spec: fix a typo in "Requires" of kexec-tools-eppic
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-05-21 17:32:23 +08:00
WANG Chao
f765f060c8 Release 2.0.6-6
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-05-20 16:48:13 +08:00
WANG Chao
e4cf7a9282 spec: kexec-tools-eppic requires the same version/release of kexec-tools
makedumpfile_eppic.so (provided by kexec-tools-eppic) is built against
makedumpfile (provided by kexec-tools). kexec-tools-eppic must depend on
the same version.release of kexec-tools, otherwise there could be a ABI
compatibility issue.

Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-05-20 16:18:42 +08:00
WANG Chao
c2bcddfecd update sources and .gitignore for kdump-anaconda-addon
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-05-20 16:06:10 +08:00
Arthur Zou
8f963f3318 Modify the kexec-tools.spec file to generate a kdump-anaconda-addon subpackage
Signed-off-by: Arthur Zou <zzou@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2014-05-20 16:05:58 +08:00
Arthur Zou
2955b1d298 Add addon po file to support i18n
Just merge the kdump-anadonda-addon.pot to po files of original
firstboot so that we can reuse most of the translation. But there
still are three sentences that has no translation.

Signed-off-by: Arthur Zou <zzou@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2014-05-20 16:05:57 +08:00
Arthur Zou
5669f6bbe0 Add a anaconda addon to configurate kdump in the system installation process
Currently this work is done by firstboot. Now we move to anaconda addon
to configurate in the system installation process.

Signed-off-by: Arthur Zou <zzou@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2014-05-20 16:05:54 +08:00
WANG Chao
652770e4fb delete old entries in .gitignore
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-05-08 20:38:06 +08:00
Prarit Bhargava
e8f71f38d5 Fix kdump udev memory event restarts
During debugging of another problem issues were noted with the kdump udev
rules.  The kdump service is restarted on memory add and remove events.
These are the wrong events for these types of devices and result in an overly
aggressive restarting of the kdump service.

There are four udev events to consider, "add", "remove", "online", and
"offline".  The remove event is a complete removal from the system -- neither
the hardware nor the kernel know about the hardware; it has been physically
removed.  The add event is associated with hardware being physically added to
the system.  The kernel has some limited knowledge of the device, however,
it is not avaiable for the kernel to use until it is brought online.  Online
events refer to the device being available for the kernel to use.  Opposite
to that is the offline event, which occurs when a device is no longer in
use by the kernel.

Note that in all four events the kernel *may* have some remaining information
stored about the device.

In the case of memory hotplug, kdump should be restarted when a memory module
is onlined or offlined.  This is because the memory is not in use by the
kernel until the memory is onlined, and it is unused when the memory is
offlined.

Making these modifications results in smooth service on systems that do
heavy memory onlining and offlining.

Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-05-04 17:08:34 +08:00
Prarit Bhargava
f28832759e Disable the ratelimit of kdump service on hotplug events
When doing cpu softplug via /sys

ie)
        echo 0 > /sys/devices/system/cpu/cpuX/online
        echo 1 > /sys/devices/system/cpu/cpuX/online

the kdump service is restarted on every cpu up and down.  Eventually the
service stops because it is rate limited by systemd.

[root@dhg3 hoemann]# systemctl status kdump
kdump.service - Crash recovery kernel arming
   Loaded: loaded (/usr/lib/systemd/system/kdump.service; enabled)
   Active: failed (Result: start-limit) since Tue 2014-04-22 17:02:56 MDT; 59min ago
  Process: 8803 ExecStop=/usr/bin/kdumpctl stop (code=exited, status=0/SUCCESS)
  Process: 8911 ExecStart=/usr/bin/kdumpctl start (code=killed, signal=TERM)
 Main PID: 8911 (code=killed, signal=TERM)

Apr 22 17:02:56 dhg3 systemd[1]: Starting Crash recovery kernel arming...
Apr 22 17:02:56 dhg3 systemd[1]: Stopping Crash recovery kernel arming...
Apr 22 17:02:56 dhg3 systemd[1]: Starting Crash recovery kernel arming...
Apr 22 17:02:56 dhg3 systemd[1]: kdump.service start request repeated too quickly, refusing to start.
Apr 22 17:02:56 dhg3 systemd[1]: Failed to start Crash recovery kernel arming.
Apr 22 17:02:56 dhg3 systemd[1]: Unit kdump.service entered failed state.

The ratelimiting can be disabled by adding StartLimitInterval=0 to the kdump
service file.

Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-05-04 17:08:14 +08:00
WANG Chao
649f83713e Release 2.0.6-5
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-04-30 13:43:50 +08:00
WANG Chao
c7ed468aeb mkdumprd: stop passing nofail mount option
In current systemd implementation, nofail mount will not block
local-fs.target, which means our kdump.sh (in dracut-pre-pivot.service)
can't wait for nofail mount. And kdump.sh could run early than nofail
mount happens.

For short term, let's stop passing nofail to mount. As for
sysroot.mount, since we have explicitly specify to wait for it, "nofail"
isn't a problem.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-04-30 13:43:40 +08:00
WANG Chao
39178b1346 Rebase makedumpfile-1.5.6
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-04-30 13:40:01 +08:00
WANG Chao
38eb68edad Remove sysconfig.ia64 file
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-04-28 11:10:51 +08:00
WANG Chao
1780a4b77c kexec-tools.spec: remove ia64 architecture
Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-04-23 14:02:57 +08:00
WANG Chao
3db7748534 remove dead file kdump.init
Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-04-23 14:02:43 +08:00
WANG Chao
06750c40e7 Release 2.0.6-4
Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-04-17 11:31:32 +08:00
Baoquan He
d9e6603678 kdump.conf: renew the path section
In case no target is specified explicitly in /etc/kdump.conf, the behavior
of path is changed, a check need be taken to see if any separate file
system is mounted on any tier of 'path', and also to take the relevant
action. Now the path section need be renewed for kdump.conf and its
man page accordingly.

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-04-17 11:27:31 +08:00
Baoquan He
ddeec11f09 kexec-kdump-howto.txt: renew the path section
In case no target is specified explicitly in /etc/kdump.conf, the behavior
of path is changed, a check need be taken to see if any separate file
system is mounted on any tier of 'path', and also to take the relevant
action. Now the path section need be renewed accordingly.

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-04-17 11:27:31 +08:00
Baoquan He
a54ea2d6b8 store the default dump target info when default target is a separate disk
If default target is a separate disk, the related information need be
stored in /etc/kdump.conf of kdump initramfs. This includes the disk
info which will help to deduce the dump_code and path which the vmcore
will be written into.

v5->v7:
    No v6 for this patch. Just use newly introduced function
    is_fs_type_nfs in default_dump_target_install_conf().

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-04-17 11:27:31 +08:00
Baoquan He
f8d7090b59 pass mount info to dracut when default target is a separate disk
When user does not specify dump target explicitly, it's better to
dump to the "path" specified. That means after dump user enter into
1st kernel, can find vmcore in the "path". If that path is in root
fs, vmcore is stored in root fs. If separate disk is mounted on
any tier of "path", we just dump vmcore into the left path on the
left separate disk.

E.g in kdump.conf
path /mnt/nfs

in mount info,
/dev/vdb on /mnt type ext4 (rw,relatime,seclabel,data=ordered)

Then vmcore will be saved in /nfs of /dev/vdb.

In this patch, pass mount info to dracut in this case if separate
disk is mounted on any tier of "path".

Meanwhile introduce a function in kdump-lib.sh to check if any
target is specified.

v4->v5:
    Per Vivek's comment, add a helper function is_fs_dump_target.
    Then is_user_configured_dump_target is rewrite with these helper
    functions.

v5->v7:
    No v6 for this patch. Just use newly introduced function
    is_fs_type_nfs in handle_default_dump_target.

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-04-17 11:27:31 +08:00