nfs瀹夎涓庨厤緗紙debian錛?/a>
濂藉惂錛岃繖涓敊璇氮璐逛簡鎴戜粖澶╁嚑涓皬鏃剁殑鏃墮棿錛屽繀欏繪妸瀹冭褰曚笅鏉ャ?br />
闂鏄繖鏍風殑錛屽湪鍚姩鏇存柊浜唒ortmap錛宔xportfs錛屼竴浜涙病闂鍚庯紝鍦ㄥ仛/etc/init.d/nfs-kernel-server restart 鍑虹幇
/etc/init.d/nfs-kernel-server start
Exporting directories for NFS kernel daemon
exportfs: /etc/exports [1]:
Neither 'subtree_check' or 'no_subtree_check' specified for export
"foobar".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x
.
Starting NFS kernel daemon: nfsd
Not starting: portmap daemon is not running (warning).
璀﹀憡鎻愮ずportmap is not running
濂藉惂錛屾鏌ヤ竴涓媝ortmap
/home/mnt/index# ps aux | grep portmap
daemon 31478 0.0 0.0 2052 624 ? Ss 13:59 0:00 /sbin/portmap
portmap鐨勭姸鎬佸凡緇忔槸running錛屽湪googling鍚庯紝鍙戠幇緗戜笂鏈変漢璇存槸
This is the problem, portmap is not actually running, causing rpc.statd
鐪嬫潵闂榪樻槸鍑虹幇rpc涓婏紝鏈涓昏鐨勮繘紼媟pc.mountd鏃犳硶鍚姩
濂藉惂錛屾帴涓嬫潵鎵撳紑/etc/init.d/nfs-kernel-server榪欎釜鍚姩鑴氭湰榪涜鏌ョ湅
# See if portmap or rpcbind are running
(cat </dev/null >/dev/tcp/localhost/111) 2>/dev/null
RET=$?
if [ $RET != 0 ]; then
echo
log_warning_msg "Not starting: portmap daemon is not running"
exit 0
fi
鐪嬫潵闂灝卞嚭鏉ヨ繖涓紝浠涔堝彨“/dev/tcp/localhost/111”錛岃繕鏄痝oogling錛岀綉涓婃湁浜鴻
I find that this is a bashism, but the init-script is marked as a bash script at the
top:
!/bin/bash
鍐峬an Bash錛屽彂鐜?br />
Bash, as packaged for Debian, does not support using the /dev/tcp and /dev/udp files
搴旇寰堟竻妤氫簡錛屽鏋滄寜鐓ц繖閲岀殑鍒嗘瀽錛岄偅涔堟垜浠渶瑕佸涓婇潰鐨勮繖涓惎鍔ㄨ剼鏈繘琛屼竴涓嬩慨鏀瑰氨鍙互瀹屾垚鎴戜滑鐨勭洰鐨勶紝鏈鐩存帴鐨勫氨鏄妸exit 0娉ㄩ噴鎺夛紝鍙﹀璇翠竴鐐癸紝榪欎釜鑴氭湰涔熸湁浜涘啓寰椾笉澶у悎鐞嗭紝鏃㈢劧鏄痩og_warning_msg錛屼竴涓獁arning錛屽氨涓嶅簲璇ョ洿鎺ョ殑exit 0

]]>