在做一個(gè)項(xiàng)目的時(shí)候, 需要通過nfs集中式地mount很多個(gè)機(jī)器屑那。
但是拱镐,在mount數(shù)量達(dá)到350+的時(shí)候,出現(xiàn)了mount不上的問題持际。
原因是nfs mount 的時(shí)候沃琅,默認(rèn)會(huì)使用1024一下的保留端口? http://people.redhat.com/jmoyer/nfs-limits.html
解決辦法:
1. 在nfs-service的機(jī)器上修改配置
打開 /etc/exoprts
添加或修改以下內(nèi)容
${你要mount的目錄} ${客戶端地址}(insecure,rw,sync,no_subtree_check,no_root_squash)
eg:
/data/ftp 192.168.1.10(insecure,rw,sync,no_subtree_check,no_root_squash)
2. 執(zhí)行命令? : exportfs
3. 重啟nfs服務(wù)? : service nfs-kernel-server restart
4. 遠(yuǎn)程mount的機(jī)器使用以下命令
mount -t nfs -o nolock,noresvport ${nfs-service地址}:${nfs-servers上的目錄} ${本地目錄}
eg:
mount -t nfs -o nolock,noresvport 192.168.1.3:、data/ftp /home/mount/dir1