On Mon, Mar 17, 2014 at 03:49:20PM +0800, Baoquan He wrote:
Now it's time to change the behavior of 'path'. If no
target is specified
explicitly in /etc/kdump.conf, the 'path' will be chcked if any separate
file system is mounted on any tier of 'path'. If no mount, vmcore is written
into root file system. If yes, vmcore will be wirtten into the mounted
file system with the left path relative to mountpoint.
We need to put some text in kdump.conf man page. Also need to modify
kdump.conf.
Signed-off-by: Baoquan He <bhe(a)redhat.com>
---
kexec-kdump-howto.txt | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/kexec-kdump-howto.txt b/kexec-kdump-howto.txt
index 7ffeab9..dcaf7f2 100644
--- a/kexec-kdump-howto.txt
+++ b/kexec-kdump-howto.txt
@@ -377,6 +377,12 @@ example, 'path /data/coredumps' would lead to vmcore files
being written to
that the path option is ingnored if your kdump configuration results in the
core being saved from the initscripts in the root filesystem.
+Note: If a separate file system is mounted on any tier of specified path, and
+no explicit target is specified, kdump will find the mount and writes vmcore
+to the separate file system with the left path. For example, '/var/crash' is
+specified, and a separate disk is mounted on /var. Then vmcore will be written
+into ./crash/%HOST-%DATE of the disk.
+
These "Note" are showing everywhere in the kexec-kdump-howto.txt file and
they don't look good.
So let us not add another "Note". Let us just cleanup the whole
description of "path". I think existing description itself is not fully
correct and is twisted.
How about following.
Path
====
"path" represents the file system path in which vmcore will be saved.
If a dump target is specified in kdump.conf, then "path" is relative to the
specified dump target. For example, if dump target is "ext4 /dev/sda", then
dump will be saved ni "$path" directory on /dev/sda.
Same is the case for nfs dump. If user specified "nfs foo.com:/export/tmp/"
as dump target, then dump will effectively be saved in
"foo.com:/export/tmp/var/crash/" directory.
Interpretation of path changes a bit if user has not specified a dump
target explicitly in kdump.conf. In this case, "path" represents the
absolute path from root. And dump target and adjusted path are arrived
at automatically depending on what's mounted in the current system.
Following are few examples.
path /var/crash/
----------------
Assuming there is no disk mounted on /var/ or on /var/crash, dump will
be saved on disk backing rootfs in directory /var/crash.
path /var/crash/ (A separate disk mounted on /var)
--------------------------------------------------
Say a disk /dev/sdb is mouted on /var. In this case dump target will
become /dev/sdb and path will become "/crash" and dump will be saved
on "sdb:/crash/" directory.
path /var/crash/ (NFS mounted on /var)
-------------------------------------
Say foo.com:/export/tmp is mounted on /var. In this case dump target is
nfs server and path will be adjusted to "/crash" and dump will be saved to
foo.com:/export/tmp/crash/ directory.
Thanks
Vivek