于吉吉的技術(shù)博客

          建造高性能門戶網(wǎng)

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

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

          /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的狀態(tài)已經(jīng)是running,在googling后,發(fā)現(xiàn)網(wǎng)上有人說是
          This is the problem, portmap is not actually running, causing rpc.statd

          看來問題還是出現(xiàn)rpc上,最主要的進(jìn)程rpc.mountd無法啟動

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

                           # 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,網(wǎng)上有人說

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

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


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

          評論

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

          主站蜘蛛池模板: 建水县| 大洼县| 卢湾区| 瑞金市| 二连浩特市| 乐都县| 铁岭市| 静海县| 绥滨县| 宝应县| 兰溪市| 上犹县| 鄱阳县| 双鸭山市| 沧源| 胶南市| 江都市| 昭苏县| 门源| 行唐县| 清远市| 信丰县| 高雄县| 丁青县| 紫金县| 交城县| 清远市| 罗城| 长岛县| 镇安县| 洪洞县| 冷水江市| 出国| 台州市| 垦利县| 玉林市| 于田县| 周至县| 盐源县| 宝坻区| 屏东县|