確保備份和災難復原服務的 NFS 連線

本頁面提供如何確保備份和 DR 有 NFS 連線的資訊。

在 Red Hat RHEL 6 或 CentOS Linux 主機上安裝 NFS 用戶端

執行以下指令,查看是否已安裝用戶端:# rpm -qa | grep nfs

這應該會傳回類似以下的內容:

  nfs-utils-lib-1.1.5-9.el6.x86_64
  nfs-utils-1.2.3-54.el6.x86_64
  • 如果沒有任何顯示內容,請使用 yum 安裝 NFS 用戶端套件。跑步:# yum install nfs-utils nfs-utils-lib
  • 請確認 Linux 主機上已安裝 rpcbind /portmapper 套件。跑步:# rpm -qa | grep rpcbind

這應該會傳回類似 rpcbind-0.2.0-11.el6.x86_64 的內容

  • 如果沒有任何結果,請使用 yum 安裝 rpcbind。執行:# yum install rpcbind

在 SLES Linux 主機上安裝 NFS 用戶端

  1. 如要查看是否已安裝用戶端,請執行:# rpm -qa | grep nfs

    這應該會傳回類似以下的內容:

    nfs-client-1.2.1-2.6.6
    yast2-nfs-common-2.17.7-1.1.2
    yast2-nfs-client-2.17.12-0.1.81
    
  2. 如果找不到 nfs-client 或 yast2-nfs-xxxx 套件,請使用 YaST 或 zypper 安裝 NFS 用戶端套件。

    • 使用 YaST:
    # yast2 --install yast2-nfs-client
    # yast2 --install yast2-nfs-common
    
    • 使用 Zypper:# zypper install nfs-client
  3. 請確認 Linux 主機上已安裝 rpcbind 或 portmapper 套件。執行: # rpm -qa | grep rpcbind 這應該會傳回類似以下的內容:rpcbind-0.1.6+git20080930-6.15

  4. 如果沒有任何項目,則必須使用 YaST 或 zypper 安裝套件:

    • 使用 YaST:# yast2 --install rpcbind
    • 使用 Zypper:# zypper install rpcbind

從 Linux 主機瞭解 NFS 用戶端資訊

主機上必須安裝備份和 DR 核准的 NFS 用戶端套件和版本。

  1. 檢查 portmapper 或 rpcbind 服務是否正在執行。執行:# sudo service rpcbind status

    • Red Hat RHEL 6 或 CentOS Linux 主機應傳回類似以下的內容: rpcbind (pid 1591) is running...
    • SLES Linux 主機應傳回類似以下的內容: Checking for service rpcbind running
  2. 如果 rpcbind 服務未在 Linux 主機上執行,請使用以下指令啟動: # sudo service rpcbind start

  3. 使用 rpcinfo 列出已註冊的 RPC 程式或服務。Portmapper 必須註冊並執行。

    # sudo rpcinfo -p
    program vers proto port service
    100000 4 tcp 111 portmapper
    100000 3 tcp 111 portmapper
    100000 2 tcp 111 portmapper
    100000 4 udp 111 portmapper
    100000 3 udp 111 portmapper
    100000 2 udp 111 portmapper
    
  4. 請使用下列指令,確認 Linux 主機是否可對備份/復原裝置上的 rpcbind 和 NFS 程式發出 RPC 呼叫。

    # sudo rpcinfo -T tcp <#vm internal IP> rpcbind
    program 100000 version 2 ready and waiting
    program 100000 version 3 ready and waiting
    program 100000 version 4 ready and waiting
    # sudo rpcinfo -T tcp <#vm internal IP> nfs
    program 100003 version 2 ready and waiting
    program 100003 version 3 ready and waiting
    

如果上述指令傳回上述輸出內容,表示從 Linux 主機到備份/復原裝置的 NFS 連線正常。