On Thu, Mar 06, 2014 at 10:18:44AM -0500, Vivek Goyal wrote:
[..]
I see few problems with this idea.
- It currently breaks the notion of "path" as specified in /etc/kdump.conf.
- It does not gel well with nfs target or ssh target. Now we will have
a new definition of "path" for the special case of where user has
not configured the dump destination explicitly.
- It breaks the notion of "default". Current default "default" is
"reboot". Because we are dumping to root disk by default, choosing
"dump_to_rootfs" as backup does not make any sense.
But if you start travelling down "path" and start choosing a different
disk automatically as dump destination, then it might make sense to
change default to "dump_to_rootfs" also. But some people might like it
saying saving dump is more important and save it to root disk if saving
to /var/crash disk fails while other might not like it saying it is
filling their root disk.
So given all the above, I would rather let user explicitly configure
the dump destination and "default" accordingly instead of trying to be
too smart about it and then get it wrong.
I was thinking more about above ponints and few more thoughts.
- We can modify the definition of path. That is, if user has specified the
dump target, then path is relative to dump target. Otherwise path is
relative to currently mounted root.
So if user has not specified a dump disk, we look for disk mounted on
/var/crash and dump to it. So both disk and path with-in disk will be
dynamically determined.
But if user has specified the disk, then path is relative to that disk
root. This will cover the category of nfs and ssh dump where user has
dump target.
IOW, path will remain same for all other cases and we are introducing
only one special case where user has not explicitly specified dump
destination.
- For the case of default, we can keep it "reboot" by default. That is
our default will be that we don't try to dump to a backup target if
primary target fails. User can change that based on his needs.
So even if /var/ is mounted on a different disk, "default" action will
still be "reboot".
- Now there is a third point of how other tools like system-config-kdump,
know about kdump defaults. In this case, they can probably show
/var/crash as dump target and if user has specified a disk, then show
disk:/var/crash as dump target.
In summary, I am beginning to like the idea of automatically determining
the dump disk and dump path (if user has not specified dump disk
explicitly). That way user will not have to face that error.
Jerry, would you like to post a patch to implement this and also modify
kexec-kdump-howto.txt to explain default dump target.
We can take this in fedora and see how well does it work.
Thanks
Vivek