于吉吉的技術博客

          建造高性能門戶網

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            65 隨筆 :: 6 文章 :: 149 評論 :: 0 Trackbacks

          nfs安裝與配置(debian)
          好吧,這個錯誤浪費了我今天幾個小時的時間,必須把它記錄下來。
          問題是這樣的,在啟動更新了portmap,exportfs,一些沒問題后,在做/etc/init.d/nfs-kernel-server restart 出現

          /etc/init.d/nfs-kernel-server start
          Exporting directories for NFS kernel daemonexportfs: /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

          好吧,檢查一下portmap

          /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上,最主要的進程rpc.mountd無法啟動

          好吧,接下來打開/etc/init.d/nfs-kernel-server這個啟動腳本進行查看

                           # See if portmap or rpcbind are running
                           (cat </dev/null >/dev/tcp/localhost/
          1112>/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”,還是googling,網上有人說

          I find that this is a bashism, but the init-script is marked as a bash script at the
          top:
          !/bin/bash
          再man Bash,發現
          Bash, as packaged for Debian, does not support using the /dev/tcp and /dev/udp files

          應該很清楚了,如果按照這里的分析,那么我們需要對上面的這個啟動腳本進行一下修改就可以完成我們的目的,最直接的就是把exit 0注釋掉,另外說一點,這個腳本也有些寫得不大合理,既然是log_warning_msg,一個warning,就不應該直接的exit 0


          posted on 2011-04-06 17:13 陳于喆 閱讀(1931) 評論(1)  編輯  收藏 所屬分類: linux安裝配置

          評論

          # re: 在debian安裝nfs-server出現的bug處理 2011-04-22 18:07 saicain
          今天也遇到了這個問題,隨后就開始各種google各種卸載重裝。搗騰了n久都沒解決,還好現在看到您的solution,真是很lucky, thanks  回復  更多評論
            

          主站蜘蛛池模板: 都昌县| 顺义区| 穆棱市| 阜城县| 资源县| 马山县| 衡水市| 唐山市| 卢龙县| 大邑县| 新田县| 蓝山县| 天长市| 永善县| 丰顺县| 兰西县| 凌云县| 通榆县| 勐海县| 孟州市| 扎鲁特旗| 大方县| 嘉义县| 垫江县| 乳源| 芜湖县| 岳阳县| 德格县| 陇南市| 延边| 甘孜| 达日县| 凯里市| 保康县| 琼海市| 信宜市| 磴口县| 彭州市| 湘阴县| 五常市| 尚志市|