On Mon, Feb 24, 2014 at 04:37:15PM +0800, Baoquan He wrote:
On 02/20/14 at 12:01pm, Vivek Goyal wrote:
On Thu, Feb 20, 2014 at 02:00:54PM +0800, Baoquan He wrote:
kdump now defaults to only dump vmcore to the root partition in the /var/crash directory. This is problematic when /var is a separate file system because this makes saved vmcore hidden since one can not unmount /var even in single user mode. This also has the potential of blindly filling the root file system without out a clue as to why.
Now fix this by failing the loading of kdump kernel if default action is dump_to_rootfs while different disk is mounted on save path.
Hi Bao,
Few things.
- First of all, it does not matter what's the default failure action is. Kdump service should fail irrespective of default action.
So we just need focus the fix on default, no need to care about the default failure action which is specified by "default xxx".
Yes.
- Our default dump target is root disk and path /var/crash. If we detect some disk mounted on /var/crash we fail.
Agree.
- We should do this checking *only* if user has not specified any disk and path in /etc/kdump.conf. If user has specified root disk in /etc/kdump.conf, then we should continue to dump.
Here user has not specificed any disk, but specified a path like "/home/user/test", and there's another disk mounted on this path, doesn't this need to be cared?
I think this should fail and give out en error message.
What if user decides do dump to root partition (even if there is another disk mounted on /var). I think we should have mechanism to address that.
I see that "path" is uncommented in kdump.conf. So kdump code has to assume that user specified it.
But disk is not uncommented and we take rootfs as default.
So we can do following.
- If dump target is specified in kdump.conf, then just dump to it. User wants it that way.
- If dump target is not mentioned in kdump.conf and are dumping to rootfs by default, in that case we need to check whether there are other disks mounted in "path" and fail service.
The example you gave, yes, there kdump service will fail as user has not specified the disk and there is another disk mounted on /home/user/test path.
Thanks Vivek