use fstab-sys to mount nfs
dump_nfs mount the nfs share to /mnt, it's not what we expected. Change to use dracut fstab mount infrastructure for this. After the fix nfs dump is just same as localfs dump. The --mount for nfs does not work before, it depend on the upstream patch: 1. dracut fix to autoload nfs.ko in case nfs4. the patch post as below: http://permalink.gmane.org/gmane.linux.kernel.initramfs/2768 Signed-off-by: Dave Young <dyoung@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
parent
a49b0881a8
commit
5e85d20d34
@ -126,17 +126,6 @@ dump_rootfs()
|
|||||||
sync
|
sync
|
||||||
}
|
}
|
||||||
|
|
||||||
dump_nfs()
|
|
||||||
{
|
|
||||||
mount -o remount,rw $NEWROOT/ || return 1
|
|
||||||
[ -d $NEWROOT/mnt ] || mkdir -p $NEWROOT/mnt
|
|
||||||
mount -o nolock -o tcp -t nfs $1 $NEWROOT/mnt/ || return 1
|
|
||||||
mkdir -p $NEWROOT/mnt/$KDUMP_PATH/$DATEDIR || return 1
|
|
||||||
$CORE_COLLECTOR /proc/vmcore $NEWROOT/mnt/$KDUMP_PATH/$DATEDIR/vmcore || return 1
|
|
||||||
umount $NEWROOT/mnt/ || return 1
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
dump_ssh()
|
dump_ssh()
|
||||||
{
|
{
|
||||||
local _opt="-i $1 -o BatchMode=yes -o StrictHostKeyChecking=yes"
|
local _opt="-i $1 -o BatchMode=yes -o StrictHostKeyChecking=yes"
|
||||||
@ -225,7 +214,7 @@ read_kdump_conf()
|
|||||||
if [[ "$config_val" =~ "@" ]]; then
|
if [[ "$config_val" =~ "@" ]]; then
|
||||||
add_dump_code "dump_ssh $SSH_KEY_LOCATION $config_val"
|
add_dump_code "dump_ssh $SSH_KEY_LOCATION $config_val"
|
||||||
else
|
else
|
||||||
add_dump_code "dump_nfs $config_val"
|
add_dump_code "dump_fs $config_val"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user