Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > AS/ES/WS v. 3 > Issue <<  103 of 593 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 5704
Last update: 06-19-06
Issue:
How can I save the coredump (vmcore) onto the hard disk when I get a system OOPS or a kernel panic on Red Hat Enterprise Linux 3 or 4?
Resolution:

The diskdump utility will capture output identical to the netdump utility without the need of a network or another server. It only works with the hardware listed below. Diskdump is limited to i386 and x86_64 only, as of this writing.

The following is a copy of /usr/share/doc/diskdumputils-1.0-1/README. Additional hardware is being added all the time, for the latest update to this list execute the command:

# up2date diskdumputils

Then read the latest copy of this document in /usr/share/doc/diskdumputils-/README, shown below:

Overview
--------
The diskdumputils package is installed on the machine that enables
disk dump. It loads and configures the diskdump modules so that
if the machine crashes, the memory dump will be dumped to disk.

Supported Drivers
------------------
Disk dump only works on the disks which are connected to
adapters that the following drivers control:

        RHEL3                   RHEL4
        ---------------------------------
        aic7xxx                 aic7xxx
        aic79xx                 aic79xx
        dpt_i2o
                                ipr
        megaraid2               megaraid
        mptfusion               mptfusion
        sym53c8xx               sym53c8xx
        sata_promise            sata_promise
        ata_piix                ata_piix

Supported Kernels
------------------
Disk dump is supported in the following Red Hat kernels,
where  is the version containing this
diskdumputils package:

        RHEL3     (Note: RHEL3 requires Update 3 or higher)
                kernel-.i686.rpm
                kernel-smp-.i686.rpm
                kernel-hugemem-.i686.rpm
                kernel-.athlon.rpm
                kernel-smp-.athlon.rpm
                kernel-.ia64.rpm
                kernel-.x86-64.rpm
                kernel-smp-.x86-64.rpm
                kernel-smp-.ia32e.rpm
        RHEL4
                kernel-.i686.rpm
                kernel-smp-.i686.rpm
                kernel-hugemem-.i686.rpm
                kernel-.ia64.rpm
                kernel-.ppc64.rpm
                kernel-.x86-64.rpm
                kernel-smp-.x86-64.rpm

Setup
------------
The setup procedure is as follows.  First a dump device must be
selected.  Either a whole device or a partition is fine.  The dump
device is wholly formatted for dump, and cannot be shared with a file
system or as a swap partition.  The size of dump device should be
big enough to save the whole dump.  The dump size to be written
consists of the size of whole memory plus a header field.  To
determine the exact size required, refer to the output of
/proc/diskdump after the diskdump module is loaded:

  # modprobe diskdump

  # cat /proc/diskdump

  # sample_rate: 8
  # block_order: 2
  # fallback_on_err: 1
  # allow_risky_dumps: 1
  # total_blocks: 262042
  #

The total block size is expressed in page-size units, so in this
example, the selected device must contain at least (262042 * 4096) bytes
on an i386 machine.


Select the dump partition in /etc/sysconfig/diskdump, as in the
following example:

  -------------------
  DEVICE=/dev/sde1
  -------------------

Multiple dump partitions can be specified as a colon-separated list.
Each partition should be large enough to contain whole dump, even if
multiple partitions are specified.

Next, Format the dump partition. The administrator needs to execute this once:

  # service diskdump initialformat

Enable the service:

  # chkconfig diskdump on
  # service diskdump start

If /proc/diskdump exists and it shows the registered dump device, the diskdump has been activated:

  # cat /proc/diskdump
  /dev/sde1 514080 1012095
Testing diskdump
---------------
To test the diskdump, use Alt-SysRq-C or "echo c > /proc/sysrq-trigger".
After completing the dump, a vmcore file will be created during the next
reboot sequence, and saved in a directory of the name format:

  /var/crash/127.0.0.1-<date>

The vmcore file's format is same as that created by the netdump
facility, so you can use the crash command to analyze it

Note
----
Once you set up, it is not necessary to do anything after that.
But you should always maintain enough diskspace in /var/crash.
If there is not enough space, the dump file will be partially saved;
an incomplete dump file will be named vmcore-incomplete.

Diskdump currently contains one customizable script file called
diskdump-nospace.  The diskdump-nospace script is called prior
to the creation of the vmcore file if /var/crash does not have
enough space to hold the complete dumpfile.  The script may be
customized to clean up enough space for the dump in question
to proceed.

Tunable parameters
----
The diskdump module has following module parameters:

block_order:    Specifies the dump-time I/O block size. Default value is 2,
                which sets the I/O block size equal to "page-size << 2", or
                16 kbytes on an i386 machine. Larger values may make for
                better performance, but occupies more module memory.

sample_rate:    Determine how many blocks in the dump partition are verified
                before actual memory dumping begins. Default value is 8,
                which means one of every "1<<8" (256) blocks are verified.
                Specifying zero means all blocks in the partition are verified,
                and a minus value disables verification.

Example:

The following option sets I/O block size to 32 kbytes, and verification is
done on every block in the partition.

        options diskdump 'block_order=3' 'sample_rate=0'


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > AS/ES/WS v. 3 > Issue <<   103  of  593  >>