NFS中的soft mount和 hard mount以及silent data corruption

当发生网络或NFS服务器端故障时,选用hard-mount选项会引起NFS客户端的程序挂起,而soft-mount则不会。

soft-mount: 当客户端加载NFS不成功时,重试retrans设定的次数.如果retrans次都不成功,则放弃此操作,返回错误信息 "Connect time out"

hard-mount: 当客户端加载NFS不成功时,一直重试,直到NFS服务器有响应hard-mount 是系统的缺省值。在选定hard-mount 时,最好同时选 intr , 允许中断系统的调用请求,避免引起系统的挂起。当NFS服务器不能响应NFS客户端的 hard-mount请求时, NFS客户端会显示"NFS server hostname not responding, still trying


from:http://hi.baidu.com/wa0362/item/8d7b1c2c0abbd8d7a417b6c5


hard mount命令:mount -t nfs –o hard 192.168.1.4:/home/cao /home/nfs/cao


使用hard还是soft主要取决于访问的信息。例如,要查看NFS服务器的视频文件,不会希望由于一些意外的情况(如网络速度变得很慢)而使系统输出大量的错误信息。如果此时使用hard方式,系统就会等待,直到能够重新与NFS服务器建立连接传输信息。

from http://book.51cto.com/art/200808/85192.htm


Soft-mounts 会带来silent data corruption

According to the nfs man page, and every other source on the internet, this leads to silent data corruption because applications get told prematurely that a write was successful when in fact the data is still in cache, unable to be written to the NFS server that we just lost connection to.

So you need to make sure that your application could deal with these kind of situations.


from https://www.centos.org/forums/viewtopic.php?t=8787


A soft timeout may cause silent data corruption if it occurs during data or metadata transmissions, so you should only use soft mounts in the cases where client responsiveness is more important than data integrity. If you require the use of soft mounts over an unreliable link such as DSL, try using TCP, which is what Solaris uses by default. This will help manage the impact of brief network interruptions. If using TCP is not possible, then you should reduce the risk of using soft mounts with UDP by specifying long retransmission timeout values and a relatively large number of retries in the mount command options (i.e., timeo=30, retrans=10).

from http://nfs.sourceforge.net/#faq_e4

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值