nfs安装与配|(debianQ?/a>
好吧Q这个错误浪费了我今天几个小时的旉Q必L它记录下来?br />
问题是这LQ在启动更新了portmapQexportfsQ一些没问题后,在做/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
好吧Q检查一下portmap
/home/mnt/index# ps aux | grep portmap
daemon 31478 0.0 0.0 2052 624 ? Ss 13:59 0:00 /sbin/portmap
portmap的状态已l是runningQ在googling后,发现|上有h说是
This is the problem, portmap is not actually running, causing rpc.statd
看来问题q是出现rpc上,最主要的进Erpc.mountd无法启动
好吧Q接下来打开/etc/init.d/nfs-kernel-serverq个启动脚本q行查看
# 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”Q还是googlingQ网上有
I find that this is a bashism, but the init-script is marked as a bash script at the
top:
!/bin/bash
再man BashQ发?br />
Bash, as packaged for Debian, does not support using the /dev/tcp and /dev/udp files
应该很清楚了Q如果按照这里的分析Q那么我们需要对上面的这个启动脚本进行一下修改就可以完成我们的目的,最直接的就是把exit 0注释掉,另外说一点,q个脚本也有些写得不大合理,既然是log_warning_msgQ一个warningQ就不应该直接的exit 0

]]>