Sun Cluster 3.0 系統管理手冊

第 5章 管理叢集交互連接與公用網路

本章提供管理 Sun Cluster 交互連接及公用網路的軟體程序。

叢集交互連接與公用網路的管理工作同由硬體與軟體程序一起組成。通常,當您初次安裝與配置叢集時,您要配置叢集交互連接與公用網路,包括 NAFO 群組。如果您以後要改變叢集交互連接或公用網路的配置,您可以使用本章提供的軟體程序。

以下是本章介紹的程序列表。

有關本章中的相關程序的進階說明,請參閱 表 5-1表 5-2

請參閱 Sun Cluster 3.0 概念 來取得叢集交互連接與公用網路的背景以及概觀資訊。

5.1 管理叢集交互連接

本節提供重新配置叢集交互連接,例如 cluster transport adapter 與 cluster transport cable 的程序。這些程序要求安裝 Sun Cluster 軟體。

在大部份時間,您可以使用 scsetup 公用程式來管理叢集交互連接的叢集傳送。請參閱 scsetup(1M) 線上援助頁來取得詳細資訊。

有關如何安裝叢集軟體的程序,請參閱 Sun Cluster 3.0 安裝手冊。有關維護叢集硬體元件的程序的資訊,請參閱 Sun Cluster 3.0 Hardware Guide

表 5-1 作業指引:管理叢集交互連接

作業 

有關資訊,請進到 ... 

管理叢集傳送 

- 使用 scsetup

"1.5.2 如何存取 scsetup 公用程式"

檢查叢集交互連接的狀態。 

- 使用 scstat

"5.1.1 如何檢查叢集交互連接的狀態"

新增叢集傳送電纜或傳送配接卡 

- 使用 scsetup

"5.1.2 如何新增 Cluster Transport Cable 與傳送配接卡"

移除叢集傳送電纜或傳送配接卡 

- 使用 scsetup

"5.1.3 如何移除叢集傳送電纜與傳送配接卡"

啟動叢集傳送電纜 

- 使用 scsetup

"5.1.4 如何啟動叢集傳送電纜"

停用叢集傳送電纜 

- 使用 scsetup

"5.1.5 如何停用叢集傳送電纜"

5.1.1 如何檢查叢集交互連接的狀態

您不必以超級使用者(superuser)來登入便可以執行這個程序。

  1. 檢查叢集交互連接的狀態。


    # scstat -W
    
  2. 請參閱以下來取得一般狀態訊息。

    狀態訊息 

    說明與可能的動作 

    路徑在線上

    路徑目前正常作業。不必採取任何動作。 

    路徑等待中

    路徑目前正在起始設定。不必採取任何動作。 

    路徑失敗

    路徑未作業。請採取更正動作。 

5.1.1.1 範例-檢查叢集交互連接的狀態

下列範例顯示作用中叢集交互連接的狀態。


# scstat -W
-- Cluster Transport Paths --
                    Endpoint             Endpoint             Status
                    --------             --------             ------
  Transport path:   phys-schost-1:qfe1   phys-schost-2:qfe1   Path online
  Transport path:   phys-schost-1:qfe0   phys-schost-2:qfe0   Path online
  Transport path:   phys-schost-1:qfe1   phys-schost-3:qfe1   Path online
  Transport path:   phys-schost-1:qfe0   phys-schost-3:qfe0   Path online
  Transport path:   phys-schost-2:qfe1   phys-schost-3:qfe1   Path online
  Transport path:   phys-schost-2:qfe0   phys-schost-3:qfe0   Path online

5.1.2 如何新增 Cluster Transport Cable 與傳送配接卡

  1. 請確定已經安裝實體 cluster transport cable。

    有關如何安裝 cluster transport cable 的程序,請參閱 Sun Cluster 3.0 Hardware Guide

  2. 成為叢集中任何節點的超級使用者(superuser)。

  3. 執行 scsetup 公用程式。


    # scsetup
    

    出現「主功能表」。

  4. 輸入 2(叢集交互連接)來存取「叢集交互連接功能表」。

  5. 輸入 1(新增傳送電纜)來新增電纜。

    請依指示進行並輸入所要求的資訊。具有二個節點的直接連接不需要中繼。不過,您必須同時輸入節點名稱以及您要識別之電纜某個端點的配接卡名稱。


    >>> Add a Cluster Transport Cable <<<
        ...
        Is it okay to continue (yes/no) [yes]? <Return>
        ...
        To which node do you want to add the cable?  nodename
        Name of the adapter to use on "node"?  adaptername
        Name of the junction at the other end of the cable?  junctionname
        Okay to use the default for this cable connection [yes]? <Return>
        Is it okay to proceed with the update (yes/no) [yes]? <Return>
    
  6. 輸入 2(新增傳送配接卡至節點)來新增配接卡。

    請依指示進行並輸入所要求的資訊。具有二個節點的直接連接不需要中繼。不過,您必須同時輸入節點名稱以及您要識別之電纜某個端點的配接卡名稱。


    >>> Add a Cluster Transport Adapter <<<
        ...
        Is it okay to continue (yes/no) [yes]? <Return>
        ...
        To which node do you want to add the cable?  nodename
        Name of the adapter to use on "node"?  adaptername
        Name of the junction at the other end of the cable?  junctionname
        Okay to use the default for this cable connection [yes]? <Return>
        Is it okay to proceed with the update (yes/no) [yes]? <Return>
    
  7. 確認叢集傳送電纜或傳送配接卡新增成功。


    # scconf -p | grep cable
    # scconf -p | grep adapter
    

5.1.2.1 範例-新增叢集傳送電纜與傳送配接卡

以下範例顯示如何使用 scsetup 指令來新增傳送電纜或傳送配接卡到節點。


[Ensure the physical cable is installed.]
[Become superuser on a node in the cluster.]
[Execute the scsetup utility:]
# scsetup
[Enter option 2:]
*** Main Menu ***
    Please select from one of the following options:
    ...
      2) Cluster interconnect
    ...    Option: 2
[Enter option 1 to add a cable:]
*** Cluster Interconnect Menu ***
    Please select from one of the following options:
    ...
    1) Add a transport cable
    ...
    Option: 1
[Enter the requested information:]
>>> Add a Cluster Transport Cable <<<
    ...
    Is it okay to continue (yes/no) [yes]? <Return>	.
    ...
    To which node is the cable attached? phys-schhost-2
    Name of the adapter on "phys-schost-2"? qfe-0
    Is it okay to proceed with the update (yes/no) [yes]? <Return>	.
scconf -a -m endpoint=phys-schost-2:hme1,endpoint=hub0
    Command completed successfully.    Hit ENTER to continue: <Return>
[Enter option 2 to add an adapter:]
*** Cluster Interconnect Menu ***
    Please select from one of the following options:
    ...
    2) Add a transport adapter to a node
    ...
    Option: 2
[Enter the requested information:]
>>> Add a Cluster Transport Adapter <<<
    ...
    Is it okay to continue (yes/no) [yes]? <Return>	.
    ...
    To which node is the cable attached? phys-schhost-2
    Name of the adapter on "phys-schost-2"? qfe-0
    Is it okay to proceed with the update (yes/no) [yes]? <Return>	.
scconf -a -m endpoint=phys-schost-2:hme1,endpoint=hub0
    Command completed successfully.    Hit ENTER to continue: <Return>
[Verify that the cable and adapter are added:]
# scconf -p | grep cable
  Transport cable:   phys-schost-2:qfe0@1 ethernet-1@2    Enabled
  Transport cable:   phys-schost-3:qfe0@1 ethernet-1@3    Enabled
  Transport cable:   phys-schost-1:qfe0@0 ethernet-1@1    Enabled
# scconf -p | grep adapter
  Node transport adapters:                         qfe2 hme1 qfe0
  Node transport adapter:                          qfe0
  Node transport adapters:                         qfe0 qfe2 hme1
  Node transport adapter:                          qfe0
  Node transport adapters:                         qfe0 qfe2 hme1
  Node transport adapter:                          qfe0

5.1.3 如何移除叢集傳送電纜與傳送配接卡

請使用下列程序來從節點移除叢集傳送電纜與叢集傳送配接卡。當電纜停用後,電纜的二個端點仍保持為配置狀態。如果配接卡仍當作傳送電纜的端點使用則無法移除。


小心 - 小心 -

叢集節點要求至少有一條作用中的電纜連到叢集交互連接以成為叢集的成員。請務必要先確認節點的叢集交互連接的狀態,然後再停用電纜。請在驗證後發現某電纜為多餘(有另一個連線可用)時才停用該電纜。停用節點最後一條繼續運轉中的電纜會使該節點失去叢集成員的資格。


  1. 成為叢集中任何節點的超級使用者(superuser)。

  2. 檢查其餘叢集傳送路徑的狀態。


    # scstat -W
    

    小心 - 小心 -

    您移除二節點叢集中的任一個而收到 "路徑失效" 的錯誤時,請先解決問題再繼續執行本程序。這種問題可能指示節點路徑不可使用。移除其餘好的路徑會使節點失去叢集成員資格而導致必須重新配置。


  3. 執行 scsetup 公用程式。


    # scsetup
    

    出現「主功能表」。

  4. 輸入 2(叢集交互連接)來存取「叢集交互連接功能表」。

  5. 輸入 4(移除傳送電纜)來移除電纜。

    請依指示進行並輸入所要求的資訊。您必須同時輸入節點名稱以及您要識別之電纜某個端點的配接卡名稱。


    *** Cluster Interconnect Menu ***
        Please select from one of the following options:
        ...
        4) Remove a transport cable
        ...
        Option: 4
        ...
    >>> Remove a Cluster Transport Cable <<<
        ...
        Is it okay to continue (yes/no) [yes]? <Return>
        ...
        To which node is the cable attached? nodename
        Name of the adapter on "node"? adaptername
        Is it okay to proceed with the update (yes/no) [yes]? <Return>
        ...
        Command completed successfully.    Hit ENTER to continue: <Return>
    

    註解 -

    如果您移除實體電纜,請切斷電纜與埠以及目標裝置之間的連接。


  6. 要移除配接卡,請輸入 5(從節點移除傳送配接卡)。

    請依指示進行並輸入所要求的資訊。您必須同時輸入節點名稱以及您要識別之電纜某個端點的配接卡名稱。


    *** Cluster Interconnect Menu **    Please select from one of the following options:
        ...
        5) Remove a transport adapter
        ...
        Option: 5
        ...
    >>> Remove a Cluster Transport Adapter <<<
        ...
        Is it okay to continue (yes/no) [yes]? <Return>
        ...
        To which node is the cable attached? nodename
        Name of the adapter on "node"? adaptername
        Is it okay to proceed with the update (yes/no) [yes]? <Return>
        ...
        Command completed successfully.    Hit ENTER to continue: <Return>
    

    註解 -

    如果您要從節點移除實體配接卡,請參閱 Sun Cluster 3.0 Hardware Guide 來取得硬體服務程序。


  7. 確認電纜或配接卡成功移除。


    # scconf -p | grep cable
    # scconf -p | grep adapter
    

    從給定節點移除傳送電纜或配接卡應該不會出現在這個指令的輸出中。

5.1.3.1 範例-移除傳送電纜或傳送配接卡

以下範例顯示如何使用 scsetup 指令來移除傳送電纜或傳送配接卡。


[Become superuser on a node in the cluster.]
[Execute the scsetup utility:]
# scsetup
[Enter option 2:]
*** Main Menu ***
    Please select from one of the following options:
    ...
      2) Cluster interconnect
    ...    Option: 2
[Enter option 4 to remove a cable:]
*** Cluster Interconnect Menu ***
    Please select from one of the following options:
    ...
      4) Remove a transport cable
    ...
    Option: 4
[Enter the requested information:]
>>> Remove a Cluster Transport Cable <<<
    ...
    Is it okay to continue (yes/no) [yes]? <Return>	.
    ...
    To which node is the cable attached? phys-schhost-2
    Name of the adapter on "phys-schost-2"? qfe-0
    Is it okay to proceed with the update (yes/no) [yes]? <Return>	.
scconf -a -m endpoint=phys-schost-2:hme1,endpoint=hub0
    Command completed successfully.    Hit ENTER to continue: <Return>
[Enter option 5 to remove an adapter:]
*** Cluster Interconnect Menu ***
    Please select from one of the following options:
    ...
      5) Remove a transport adapter from a node
    ...
    Option: 5
[Enter the requested information:]
>>> Remove a Cluster Transport Adapter <<<
    ...
    Is it okay to continue (yes/no) [yes]? <Return>	.
    ...
    To which node is the cable attached? phys-schhost-2
    Name of the adapter on "phys-schost-2"? qfe-0
    Is it okay to proceed with the update (yes/no) [yes]? <Return>	.
 
scconf -r -m endpoint=phys-schost-2:hme1
 
    Command completed successfully.    Hit ENTER to continue: <Return>
[Verify that the cable or adapter is removed:]
# scconf -p | grep cable
  Transport cable:   phys-schost-2:qfe0@1 ethernet-1@2    Enabled
  Transport cable:   phys-schost-3:qfe0@1 ethernet-1@3    Enabled
  Transport cable:   phys-schost-1:qfe0@0 ethernet-1@1    Enabled
# scconf -p | grep adapter
  Node transport adapters:   qfe2 hme1 qfe0
  Node transport adapter:   qfe0
  Node transport adapters:   qfe0 qfe2 hme1
  Node transport adapter:   qfe0
  Node transport adapters:   qfe0 qfe2 hme1
  Node transport adapter:   qfe0

5.1.4 如何啟動叢集傳送電纜

這個選項用來啟動已經存在的叢集傳送電纜。

  1. 成為叢集中任何節點的超級使用者(superuser)。

  2. 輸入 scsetup 公用程式。


    # scsetup
    

    出現「主功能表」。

  3. 輸入 2(叢集交互連接)來存取「叢集交互連接功能表」。

  4. 輸入 7(啟動傳送電纜)來啟動傳送電纜。

    請依出現的提示及指示進行。您必須同時輸入節點名稱以及您要識別之電纜某個端點的配接卡名稱。

  5. 確認電纜啟動成功。


    # scconf -p | grep cable
    

5.1.4.1 範例-啟動叢集傳送電纜

這個範例顯示如何啟動位於節點 phys-schost-2 上的配接卡 qfe-1 上的叢集傳送電纜。


[Become superuser on any node.]
[Enter the scsetup utility:]
# scsetup
[Enter option 7:]
*** Cluster Interconnect Menu ***
    Please select from one of the following options:
    ...
      7) Enable a transport cable
    ...
    Option: 7
[Enter the requested information:]
>>> Enable a Cluster Transport Cable <<<
    ...
    Is it okay to continue (yes/no) [yes]? <Return>
    ...
    To which node is the cable attached? phys-schhost-2
    Name of the adapter on "phys-schost-2"? qfe-1
    Is it okay to proceed with the update (yes/no) [yes]? <Return>
 
scconf -c -m endpoint=phys-schost-2:qfe1,state=enabled
 
    Command completed successfully.
    Hit ENTER to continue: <Return>
[Verify that the cable is enabled:]
# scconf -p | grep cable
  Transport cable:   phys-schost-2:qfe1@0 ethernet-1@2    Enabled
  Transport cable:   phys-schost-3:qfe0@1 ethernet-1@3    Enabled
  Transport cable:   phys-schost-1:qfe0@0 ethernet-1@1    Enabled

5.1.5 如何停用叢集傳送電纜

您可能需停用叢集傳送電纜來暫時關閉叢集交互連接路徑。這在解決叢集交互連接的問題或更換叢集交互連接硬體時,非常有用。

當電纜停用後,電纜的二個端點仍保持為配置狀態。如果配接卡仍當作傳送電纜的端點使用則無法移除。


小心 - 小心 -

叢集節點要求至少有一條作用中的電纜連到叢集交互連接以成為叢集的成員。請務必要先確認節點的叢集交互連接的狀態,然後再停用電纜。請在驗證後發現某電纜為多餘(有另一個連線可用)時才停用該電纜。停用節點最後一條繼續運轉中的電纜會使該節點失去叢集成員的資格。


  1. 成為叢集中任何節點的超級使用者(superuser)。

  2. 先檢查叢集交互連接的狀態再停用電纜。


    # scstat -W
    

    小心 - 小心 -

    您移除二節點叢集中的任一個而收到 "路徑失效" 的錯誤時,請先解決問題再繼續執行本程序。這種問題可能指示節點路徑不可使用。移除其餘好的路徑會使節點失去叢集成員資格而導致必須重新配置。


  3. 輸入 scsetup 公用程式。


    # scsetup
    

    出現「主功能表」。

  4. 輸入 2(叢集交互連接)來存取「叢集交互連接功能表」。

  5. 輸入 8(停用傳送電纜)來停用電纜。

    請依指示進行並輸入所要求的資訊。這個叢集交互連接上的所有元件都會被停用。您必須同時輸入節點名稱以及您要識別之電纜某個端點的配接卡名稱。

  6. 確認電纜停用成功。


    # scconf -p | grep cable
    

5.1.5.1 範例-停用叢集傳送電纜

這個範例顯示如何停用位於節點 phys-schost-2 之配接卡 qfe-1 上的叢集傳送電纜。


[Become superuser on any node.]
[Enter the scsetup utility:]
# scsetup
[Enter option 8:]
*** Cluster Interconnect Menu ***
    Please select from one of the following options:
    ...
      8) Disable a transport cable
    ...
    Option: 8
[Enter the requested information:]
>>> Disable a Cluster Transport Cable <<<
    ...
    Is it okay to continue (yes/no) [yes]? <Return>
    ...
    To which node is the cable attached? phys-schhost-2
    Name of the adapter on "phys-schost-2"? qfe-1
    Is it okay to proceed with the update (yes/no) [yes]? <Return>

scconf -c -m endpoint=phys-schost-2:qfe1,state=disabled

    Command completed successfully.
    Hit ENTER to continue: <Return>
[Verify that the cable is disabled:]
# scconf -p | grep cable
  Transport cable:   phys-schost-2:qfe1@0 ethernet-1@2    Disabled
  Transport cable:   phys-schost-3:qfe0@1 ethernet-1@3    Enabled
  Transport cable:   phys-schost-1:qfe0@0 ethernet-1@1    Enabled

5.2 管理公用網路

如果您需要改變公用網路配置,您可以使用本節敘述的軟體程序。

當您管理公用網路配接卡時,請注意下列:

有關如何安裝叢集軟體的程序,請參閱 Sun Cluster 3.0 安裝手冊。有關如何維護公用網路硬體元件的程序,請參閱 Sun Cluster 3.0 Hardware Guide

表 5-2 作業指引:管理公用網路

作業 

有關資訊,請進到 ... 

在節點上建立 NAFO 

"5.2.1 如何建立 NAFO 群組"

新增更多配接卡到節點以提高公用網路配接卡的可用性。 

"5.2.3 如何新增配接卡至 NAFO 群組"

刪除 NAFO 群組來使群組中任何配接卡都沒有監控或失效移管。 

"5.2.2 如何刪除 NAFO 群組"

從現有的 NAFO 群組移除備份配接卡來從系統移除配接卡、置換配接卡、重新連到其他子網路以及當作其他 NAFO 群組的備份。 

"5.2.4 如何從 NAFO 群組移除配接卡"

請將作用中配接卡切換為備份配接卡,以便從 NAFO 群組移除現行的作用中配接卡。 

"5.2.5 如何切換 NAFO 群組的作用中配接卡"

檢查 NAFO 群組的狀態。 

"5.2.6 如何檢查 NAFO 群組的狀態"

變更參數以調整 PNM 失敗偵測以及失效移管處理。 

"5.2.7 如何變更公用網路管理可調整參數"

5.2.1 如何建立 NAFO 群組

  1. 請注意以下建立 NAFO 群組的需求:

    • 所有的公用網路配接卡必須配置為屬於一個 NAFO 群組。

    • 在任何給定的節點上,必須至多有一個 NAFO 群組在給定的子網路上。

    • 給定 NAFO 群組中的所有配接卡必須連到同一個子網路。

    • 在給定的 NAFO 群組中只能有一個配接卡可以有主機名稱關聯,也說是說有一個 /etc/hostname.adapter 檔。

    • 公用網路配接卡只可屬於一個 NAFO 群組。

  2. 成為要配置為 NAFO 群組之節點的超級使用者(superuser)。

  3. 在這個節點找出實際連到同一個子網路的公用網路配接卡。

    這些配接卡構成 NAFO 群組的備份配接卡。

  4. 判斷是否要為某一個公用網路配接卡建立一個 /etc/hostname.adapter 檔。

    • 如果不需要(檔案已經存在),請進到 步驟 5

    • 如果需要(檔案不存在),請建立檔案,並將公用網路配接卡之 IP 位址的主機名稱加到檔案中。例如:


    # vi /etc/hostname.hme0
    phys-schost-1
  5. 請編輯 /etc/inet/hosts 檔,在其中加入指定給公用網路配接卡的 IP 位址與對應的主機名稱。

    例如,以下範例顯示 IP 位址 192.29.75.101 與主機名稱 phys-schost-1 added to the /etc/inet/hosts 檔。


    # vi /etc/inet/hosts
    192.29.75.101   phys-schost-1

    註解 -

    如果已經使用名稱服務,這個資訊應該同時存在名稱服務資料庫中。


  6. 建立 NAFO 群組。


    # pnmset -c nafo-group -o create adapter [adapter ...]
    -c nafo-group

    對指定的 NAFO 群組指定配置次指令。NAFO 群組必須命名為 nafoN,其中 N 是群組之非負整數的識別碼。群組名稱在每一個節點必須是「區域的」。這樣,同一個 NAFO 群組名稱便可以用於多個節點。

    -o create

    建立新的 NAFO 群組。

    adapter [ adapter ... ]

    指定當作備份配接卡的公用網路配接卡。請參閱前面的 步驟 3


    註解 -

    如果已經配置有配接卡,它會被選擇成為作用中配接卡而且 pnmset 指令不會改變它的狀態。否則,將會配置某一個備份配接卡並對其指定可在 NAFO 群組之 /etc/hostname.adapter 檔中找到的 IP 位址。


  7. 確認 NAFO 群組的狀態。


    # pnmstat -l
    

5.2.1.1 範例-建立 NAFO 群組

以下範例顯示如何建立配置有二個網路配接卡(qfe0qfe1)的 NAFO 群組(nafo0)。


# pnmstat -l
# pnmset -c nafo0 -o create qfe0 qfe1
# pnmstat -l
group   adapters       status   fo_time   act_adp
nafo0   qfe0:qfe1       OK      NEVER     qfe0

5.2.2 如何刪除 NAFO 群組

請在群組中的任何配接卡不需要監控或失效移管時刪除 NAFO 群組。 刪除時,NAFO 群組不可以被邏輯主機資源群組或共用位址資源群組所使用。

  1. 在含有要刪除之 NAFO 群組的節點上成為超級使用者(superuser)。

  2. 檢查 NAFO 群組是否正在被邏輯主機或共用位址資源使用。


    # scrgadm -pv
    

    您還可以使用 scrgadm -pvv(含有二個 v 旗號)來尋找正在使用您要刪除之 NAFO 群組的資源。

  3. 將正在使用這個 NAFO 群組的邏輯主機資源群組及共用位址資源群組切換到其他節點。


    # scswitch -z -g resource-group -h node
    
    -z -g resource-group

    切換指定的資源群組。

    -h node

    指定當作資源群組切換目標的節點。

  4. 刪除 NAFO 群組。


    # pnmset -c nafo-group -o delete 
    
    -c nafo-group

    指定要刪除的 NAFO 群組。

    -o delete

    刪除 NAFO 群組。

  5. 確認 NAFO 群組的狀態。

    刪除的 NAFO 群組應該不會出現在列表中。


    # pnmstat -l
    

5.2.2.1 範例-刪除 NAFO 群組

以下範例顯示從系統移除名為 nafo1 的 NAFO 群組。使用這個 NAFO 群組的邏輯主機資源群組 lh-rg-1 首先被切換到其他節點。


# scswitch -z -g lh-rg-1 -h phys-schost-2
# pnmstat -l
group   adapters       status   fo_time  act_adp
nafo0   qfe0:qfe1       OK      NEVER    qfe0
nafo1   qfe2            OK      NEVER    qfe2
# pnmset -c nafo1 -o delete
# pnmstat -l
group   adapters        status  fo_time  act_adp
nafo0   qfe0:qfe1        OK     NEVER    qfe0

5.2.3 如何新增配接卡至 NAFO 群組

您可以新增配接卡到現有的 NAFO 群組,以便在 NAFO 群組提供額外的備份配接卡,同時增加叢集節點之公用網路的連接可用性。

  1. 您是否必須安裝新的公用網路配接卡到節點?

    • 如果是,請參閱 Sun Cluster 3.0 Hardware Guide 來取得指示。

    • 如果不是,請進到 步驟 2

  2. 確定要新增到 NAFO 群組已經連到同一子網路當作 NAFO 群組的作用中配接卡。

  3. 確定配接卡未解除配置而且沒有關聯的 /etc/hostname.adapter 檔。

  4. 要含有要在其中新增新配接卡之 NAFO 群組的節點成為超級使用者(superuser)。

  5. 新增配接卡到 NAFO 群組。


    # pnmset -c nafo-group -o add adapter
    
    -c nafo-group

    指定要在其中新增新配接卡的 NAFO 群組。

    -o add adapter

    指定要新增到指名 NAFO 群組的公用網路配接卡。

  6. 確認 NAFO 群組的狀態。


    # pnmstat -l
    

5.2.3.1 範例-新增額外的公用網路配接卡至 NAFO 群組

以下範例顯示如何新增配接卡 qfe2 到 NAFO 群組 nafo0,該 NAFO 群組已經含有二個配接卡(qfe0qfe1)。


# pnmstat -l
group   adapters        status   fo_time  act_adp
nafo0   qfe0:qfe1        OK      NEVER    qfe0
# pnmset -c nafo0 -o add qfe2
# pnmstat -l
group   adapters        status   fo_time  act_adp
nafo0   qfe0:qfe1:qfe2   OK      NEVER    qfe0

5.2.4 如何從 NAFO 群組移除配接卡

從現有的 NAFO 群組移除備份配接卡來從系統移除配接卡、置換配接卡、重新連到其他子網路以及當作其他 NAFO 群組的備份。


小心 - 小心 -

從 NAFO 群組移除最後一個備份配接卡,會使作用中的配接卡偵測到的失效失去保護,同時降低叢集節點的公用網路可用性。


  1. 要移除作用中配接卡,請先切換到群組中的其他配接卡。

    請參閱 "5.2.5 如何切換 NAFO 群組的作用中配接卡"

  2. 以超級使用者(superuser)身份從 NAFO 群組移除配接卡。


     # pnmset -c nafo-group -o remove adapter
    
    -c nafo-group

    指定要從其移除配接卡的 NAFO 群組。

    -o remove adapter

    從 NAFO 群組移除配接卡。

  3. 確認 NAFO 群組的狀態。

    刪除的配接卡應該不會出現在 NAFO 群組的列表中。


    # pnmstat -l
    

5.2.4.1 範例-從 NAFO 群組移除配接卡

以下範例從 NAFO 群組 nafo0 移除配接卡 qfe2


# pnmstat -l
group   adapters       status   fo_time  act_adp
nafo0   qfe0:qfe1:qfe2  OK      NEVER    qfe0
# pnmset -c nafo0 -o remove qfe2
# pnmstat -l
group   adapters       status   fo_time  act_adp
nafo0   qfe0:qfe1       OK      NEVER    qfe0

5.2.5 如何切換 NAFO 群組的作用中配接卡

請將作用中配接卡切換為備份配接卡,以便從 NAFO 群組移除現行的作用中配接卡。pnmd(1M) 常駐程式會將現行作用中配接卡主管的所有 IP 位址,以和失效觸發之失效移管相似的方式切換到新的作用中配接卡。


註解 -

進行切換時,連線可能會短時間變慢。否則,運作效能應該發揮到極致。


  1. 確定新的作用中配接卡的實體連接,和目前作用中配接卡的相同。

    如果新的作用中配接卡將某些 IP 位址控管為目前的作用中配接卡失敗,需要這些 IP 位址的網路與資料服務會被中斷,直到實體連線被修復或有後續發生成功的失效移管為止。

  2. 在含有您要切換其作用中配接卡之 NAFO 群組的節點上,成為超級使用者(superuser)。

  3. 切換作用中配接卡。


     # pnmset -c nafo-group -o switch adapter
    
    -c nafo-group

    指定含有配切換之配接卡的 NAFO 群組。

    -o switch adapter

    使 NAFO 群組中指定的配接卡成為作用中配接卡。

  4. 確認 NAFO 群組的狀態。

    "切換目標" 配接卡現在應該成為作用中配接卡。


    # pnmstat -l
    

5.2.5.1 範例-切換 NAFO 群組的作用中配接卡

以下範例將作用中配接卡從 qfe0 切換到 qfe1


# pnmstat -l
group   adapters       status   fo_time  act_adp
nafo0   qfe0:qfe1       OK      NEVER    qfe0
# pnmset -c nafo0 -o switch qfe1
# pnmstat -l
group   adapters       status   fo_time  act_adp
nafo0   qfe0:qfe1       OK      11       qfe1

5.2.6 如何檢查 NAFO 群組的狀態

    執行 pnmstat(1M) 指令來列出某個節點上之所有 NAFO 群組的目前設置與狀態的相關資訊。


    # pnmstat -l
    

您還可以使用 pnmptor(1M)pnmrtop(1M) 指令來取得配接卡的相關資訊。

5.2.6.1 範例-檢查 NAFO 群組的狀態

以下範例顯示含有三個 NAFO 群組之節點的狀態。


# pnmstat -l
Group   adapters        status  fo_time act_adp 
nafo0   qfe5            OK      NEVER   qfe5 
nafo1   qfe6            OK      NEVER   qfe6 
nafo2   qfe7            OK      NEVER   qfe7 

5.2.6.2 範例-尋找 NAFO 群組的作用中配接卡

以下範例顯示 NAFO 群組 nafo0 的作用中配接卡是 qfe5


# pnmptor nafo0
qfe5

5.2.6.3 範例-尋找配接卡的 NAFO 群組

以下範例顯示配接卡 qfe5 屬於 NAFO 群組 nafo0


# pnmrtop qfe5
nafo0

5.2.7 如何變更公用網路管理可調整參數

這個演算法有四個可調整參數:inactive_timeping_timeoutrepeat_testslow_network。這些參數提供了錯誤偵測的速度和正確性之間的取捨選擇。請參閱 表 5-3 以取得其他資訊。

請使用這個程序來變更 pnmd(1M) 常駐程式的內定「公用網路管理」(PNM)值。

  1. 成為叢集中某個節點的超級使用者(superuser)。

  2. 如果不存在,請建立 pnmparams 檔。


    # vi /etc/cluster/pnmparams
    
  3. 使用下列表格來設定 PNM 參數。


    註解 -

    /etc/cluster/pnmparams 檔中的設定值適用於節點上的所有 NAFO 群組。以磅記號(#)開頭的行會被忽略。 檔案中其他行必須是以下的格式:variable=value


    表 5-3 公用網路管理參數可調整參數

    參數 

    說明 

    inactive_time

    二次連續探測現行作用中配接卡的資料分封計數器之間的秒數。內定值為 5。 

    ping_timeout

    ALL_HOST_MULTICAST 與子網路廣播 ping 的逾時值(秒數)。內定值為 4。

    repeat_test

    在宣告作用中配接卡失效且失效移管被觸發之前連續執行 ping 的次數。內定值為 3。 

    slow_network

    每次連續 ping 之後檢查資料分封計數器有無變更之前的等待秒數。內定值為 2。 

    warmup_time

    在失效移管至備份配接卡後繼續失效監控之前的等待秒數。這樣可對較慢的驅動程式或埠起始設定提供較多的時間。內定值為 0。 


    註解 -

    變更要在下一次 pnmd 常駐程式啟動時才會生效。


5.2.7.1 範例-變更公用網路管理參數可調整參數

以下範例/etc/cluster/pnmparams 檔含有二個內定值已經改變的參數。


inactive_time=3
repeat_test=5