linux nfs时间不对,NFS挂载主机或不稳定的原因与解决方法
因為nfs client端默認(rèn)是采取UDP協(xié)議傳輸方式,可以強(qiáng)制nfs client端采取TCP協(xié)議方式傳輸。
1.bootloader傳遞給linux內(nèi)核時:
setenv bootargs root=nfs nfsroot=192.168.80.251:/filesystem,proto=tcp,nfsvers=3,nolock ip=192.168.80.252 console=ttySAC0,115200 init=/linuxrc
2.nfs client掛載nfs server某個文件夾時:mount -t nfs -o nolock -o tcp 192.168.80.251:/file_name /mnt
注意: nfsvers需為3,即設(shè)置使用nfs v3 ,nfs v2只能使用udp.
kernel 可用nfs 選項如下:
"port=%u" "rsize=%u" ?"wsize=%u" "timeo=%u" "retrans=%u" "acregmin=%u", "acregmax=%u" "acdirmin=%u" "acdirmax=%u" "soft" "hard" "intr" "nointr" "posix" "noposix" "cto" "nocto" "ac" "noac" "lock" "nolock" "nfsvers=2" "nfsvers=3" "proto=udp" "proto=tcp" "acl" "noacl"
總結(jié)
以上是生活随笔為你收集整理的linux nfs时间不对,NFS挂载主机或不稳定的原因与解决方法的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux内核启动后门,Linux下编写
- 下一篇: linux连接到程序,Linux下C程序