于吉吉的技術博客

          建造高性能門戶網

            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 陳于喆 閱讀(1930) 評論(1)  編輯  收藏 所屬分類: linux安裝配置

          評論

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

          主站蜘蛛池模板: 林周县| 象山县| 海口市| 泽库县| 康乐县| 永安市| 南昌市| 宁都县| 丹阳市| 平乡县| 高平市| 荣昌县| 汶上县| 漳州市| 隆化县| 华宁县| 镶黄旗| 师宗县| 门源| 龙门县| 区。| 阿合奇县| 施秉县| 应用必备| 江山市| 子长县| 肃宁县| 大庆市| 通山县| 大埔县| 平果县| 新津县| 新宁县| 南宁市| 宜黄县| 高青县| 霸州市| 靖边县| 吉水县| 磴口县| 从江县|