经分析可能原因为Dell Precision 470的网卡Intel Pro 1000进行初始化后需要一定延迟时间才能正常工作,并于RedHat的maillist上找到一个解决方法。通过修改初始化脚本/etc/init.d.netfs,先通过ping命令确保能成功ping通控制节点,然后再mount /home目录。
脚本如下:(其中带+号的行为需要添加到netfs脚本里的代码)
--- netfs.old2003-12-10 11:26:25.000000000 -0800
+++ netfs.new2003-12-10 11:25:49.000000000 -0800
@@ -36,6 +36,23 @@
# See how we were called.
case "" in
start)
+# First, try to check for connectivity to that network:
+ for mynfsserver in `grep -v '^#' /etc/fstab | awk '{if ( ~ /^nfs$/ && !~ /noauto/) print }' | cut -d: -f1`
+ do
+ echo -n "Checking NFS server: $mynfsserver"
+ i=1
+ until ping -q -c 2 -w 5 $mynfsserver > /dev/null || [ $i -ge 60 ]
+ do
+ sleep 0.1
+ i=$((i+1))
+ echo -n .
+ done
+
+ ping -q -c 1 -w 3 $mynfsserver > /dev/null || echo_warning
+ ping -q -c 1 -w 3 $mynfsserver > /dev/null && echo_success
+ echo
+ done
+
[ -n "$NFSFSTAB" ] &&
{
[ ! -f /var/lock/subsys/portmap ] && service portmap start
文章来源于领测软件测试网 https://www.ltesting.net/