xref: /OK3568_Linux_fs/kernel/Documentation/s390/zfcpdump.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun==================================
2*4882a593SmuzhiyunThe s390 SCSI dump tool (zfcpdump)
3*4882a593Smuzhiyun==================================
4*4882a593Smuzhiyun
5*4882a593SmuzhiyunSystem z machines (z900 or higher) provide hardware support for creating system
6*4882a593Smuzhiyundumps on SCSI disks. The dump process is initiated by booting a dump tool, which
7*4882a593Smuzhiyunhas to create a dump of the current (probably crashed) Linux image. In order to
8*4882a593Smuzhiyunnot overwrite memory of the crashed Linux with data of the dump tool, the
9*4882a593Smuzhiyunhardware saves some memory plus the register sets of the boot CPU before the
10*4882a593Smuzhiyundump tool is loaded. There exists an SCLP hardware interface to obtain the saved
11*4882a593Smuzhiyunmemory afterwards. Currently 32 MB are saved.
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunThis zfcpdump implementation consists of a Linux dump kernel together with
14*4882a593Smuzhiyuna user space dump tool, which are loaded together into the saved memory region
15*4882a593Smuzhiyunbelow 32 MB. zfcpdump is installed on a SCSI disk using zipl (as contained in
16*4882a593Smuzhiyunthe s390-tools package) to make the device bootable. The operator of a Linux
17*4882a593Smuzhiyunsystem can then trigger a SCSI dump by booting the SCSI disk, where zfcpdump
18*4882a593Smuzhiyunresides on.
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunThe user space dump tool accesses the memory of the crashed system by means
21*4882a593Smuzhiyunof the /proc/vmcore interface. This interface exports the crashed system's
22*4882a593Smuzhiyunmemory and registers in ELF core dump format. To access the memory which has
23*4882a593Smuzhiyunbeen saved by the hardware SCLP requests will be created at the time the data
24*4882a593Smuzhiyunis needed by /proc/vmcore. The tail part of the crashed systems memory which
25*4882a593Smuzhiyunhas not been stashed by hardware can just be copied from real memory.
26*4882a593Smuzhiyun
27*4882a593SmuzhiyunTo build a dump enabled kernel the kernel config option CONFIG_CRASH_DUMP
28*4882a593Smuzhiyunhas to be set.
29*4882a593Smuzhiyun
30*4882a593SmuzhiyunTo get a valid zfcpdump kernel configuration use "make zfcpdump_defconfig".
31*4882a593Smuzhiyun
32*4882a593SmuzhiyunThe s390 zipl tool looks for the zfcpdump kernel and optional initrd/initramfs
33*4882a593Smuzhiyununder the following locations:
34*4882a593Smuzhiyun
35*4882a593Smuzhiyun* kernel:  <zfcpdump directory>/zfcpdump.image
36*4882a593Smuzhiyun* ramdisk: <zfcpdump directory>/zfcpdump.rd
37*4882a593Smuzhiyun
38*4882a593SmuzhiyunThe zfcpdump directory is defined in the s390-tools package.
39*4882a593Smuzhiyun
40*4882a593SmuzhiyunThe user space application of zfcpdump can reside in an intitramfs or an
41*4882a593Smuzhiyuninitrd. It can also be included in a built-in kernel initramfs. The application
42*4882a593Smuzhiyunreads from /proc/vmcore or zcore/mem and writes the system dump to a SCSI disk.
43*4882a593Smuzhiyun
44*4882a593SmuzhiyunThe s390-tools package version 1.24.0 and above builds an external zfcpdump
45*4882a593Smuzhiyuninitramfs with a user space application that writes the dump to a SCSI
46*4882a593Smuzhiyunpartition.
47*4882a593Smuzhiyun
48*4882a593SmuzhiyunFor more information on how to use zfcpdump refer to the s390 'Using the Dump
49*4882a593SmuzhiyunTools' book, which is available from IBM Knowledge Center:
50*4882a593Smuzhiyunhttps://www.ibm.com/support/knowledgecenter/linuxonibm/liaaf/lnz_r_dt.html
51