mkdumprd fail if target is NFS and mounted on /var/crash
Now when dump target is not specified, separate disk can't be mounted on "path", e.g /var/crash. However if target is specified, whatever the default fail action is set, mkdumprd should go ahead and not be failed. In check_block_dump_target(), the check only on disk is not complete, NFS and ssh need be filtered too. So introduce is_user_configured_dump_target to check this. Signed-off-by: Baoquan He <bhe@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
parent
7f9b45002a
commit
c1bf4dec6c
14
kdump-lib.sh
14
kdump-lib.sh
@ -52,6 +52,20 @@ get_user_configured_dump_disk()
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is_user_configured_dump_target()
|
||||||
|
{
|
||||||
|
local _target
|
||||||
|
|
||||||
|
if is_ssh_dump_target || is_nfs_dump_target; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
_target=$(egrep "^ext[234]|^xfs|^btrfs|^minix|^raw" /etc/kdump.conf 2>/dev/null |awk '{print $2}')
|
||||||
|
[ -n "$_target" ] && return 0
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
get_root_fs_device()
|
get_root_fs_device()
|
||||||
{
|
{
|
||||||
local _target
|
local _target
|
||||||
|
3
mkdumprd
3
mkdumprd
@ -363,8 +363,7 @@ check_block_dump_target()
|
|||||||
local _target
|
local _target
|
||||||
local _mntpoint
|
local _mntpoint
|
||||||
|
|
||||||
_target=$(get_user_configured_dump_disk)
|
is_user_configured_dump_target && return
|
||||||
[ -n "$_target" ] && return
|
|
||||||
|
|
||||||
_target=$(get_root_fs_device)
|
_target=$(get_root_fs_device)
|
||||||
if [ -b "$_target" ]; then
|
if [ -b "$_target" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user