Sun Cluster 系統管理指南(適用於 Solaris 作業系統)

第 3 章 關閉與啟動叢集

本章提供關閉與啟動叢集以及個別叢集節點的資訊與程序。如需啟動非全域區域的資訊,請參閱「System Administration Guide: Solaris Containers-Resource Management and Solaris Zones」中的第 18 章「Planning and Configuring Non-Global Zones (Tasks)」

如需有關本章中相關程序的高階描述,請參閱表 3–1表 3–2

關閉與啟動叢集的簡介

Sun Cluster cluster(1CL) shutdown 指令按順序停止叢集服務並完全地關閉整個叢集。您可以在移動叢集位置時使用 cluster shutdown 指令。如果應用程式錯誤導致資料毀損,您也可使用此指令來關閉叢集。


備註 –

請使用 cluster shutdown 指令,而非 shutdownhalt 指令以確保整個叢集正常關閉。Solaris shutdown 指令與 clnode(1CL) evacuate 指令一起使用可關閉個別節點。請參閱如何關閉叢集關閉與啟動單一叢集節點,以取得更多資訊。


cluster shutdown 指令可藉由執行下列動作停止叢集中的所有節點:

  1. 使所有執行中的資源群組離線。

  2. 卸載所有的叢集檔案系統。

  3. 關閉使用中的裝置服務。

  4. 執行 init 0,將所有節點引入 OpenBootTM PROM ok 提示符號處 (在以 SPARC 為基礎的系統上) 或引入 GRUB 功能表 (在以 x86 為基礎的系統上)。GRUB 功能表的詳細說明,請參閱 「System Administration Guide: Basic Administration 」中的「System Administration Guide: Basic Administration」中的第 11 章「GRUB Based Booting (Tasks)」


備註 –

如有需要,您可在非叢集模式下啟動節點,如此該節點便不會以叢集成員身份參與。在安裝叢集軟體或執行某些管理程序時,非叢集模式非常有用。請參閱如何以非叢集模式啟動叢集節點以取得更多資訊。


表 3–1 作業清單:關閉與啟動叢集

作業 

相關說明 

停止叢集。 

使用 cluster(1CL) shutdown

請參閱如何關閉叢集

以啟動所有節點的方式來啟動叢集。 

節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。 

請參閱如何啟動叢集

重新啟動叢集。 

使用 cluster shutdown

Press any key to continue 訊息中,按下任一鍵以啟動各節點。

節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。 

請參閱如何重新啟動叢集

Procedure如何關閉叢集


注意 – 注意 –

請勿在叢集主控台上使用 send brk 來關閉叢集節點。叢集中並不支援這個指令。


此程序提供長形式的 Sun Cluster 指令。大多指令也有短的形式。除了指令名稱有長形式和短形式之分外,指令本身是相同的。如需指令及其短形式的清單,請參閱附錄 ASun Cluster 以物件為導向的指令

  1. SPARC:如果您的叢集正在執行 Oracle Parallel Server 或 Oracle Real Application Clusters (RAC),請關閉所有資料庫實例。

    請參閱 Oracle Parallel Server 或 Oracle RAC 產品說明文件,以取得關機程序的說明。

  2. 成為超級使用者或成為可在叢集中的任一節點上提供 solaris.cluster.admin RBAC 授權的角色。

  3. 立即關閉叢集。

    從叢集中的單一節點,輸入下列指令。


    # cluster shutdown -g0 -y
    
  4. 在以 SPARC 為基礎的系統或在以 x86 為基礎的系統之 GRUB 功能表上,請確認所有節點均顯示 ok 提示符號。

    在以 SPARC 為基礎的系統或以 x86 為基礎的系統的啟動子系統上,除非所有叢集節點均已顯示 ok 提示符號,否則不要關閉任何節點的電源。


    # cluster status -t node
    
  5. 必要時,關閉節點的電源。


範例 3–1 SPARC: 關閉叢集

下列範例顯示當正常的叢集作業停止,且所有節點被關閉以致 ok 提示符號顯示時的主控台輸出。-g 0 選項會將關機寬限期設成零,-y 選項提供自動的 yes 回應,以確認問題。關機訊息還會顯示在叢集中其他節點的主控台上。


# cluster shutdown -g0 -y
Wed Mar 10 13:47:32 phys-schost-1 cl_runtime: 
WARNING: CMM monitoring disabled.
phys-schost-1# 
INIT: New run level: 0
The system is coming down.  Please wait.
System services are now being stopped.
/etc/rc0.d/K05initrgm: Calling scswitch -S (evacuate)
The system is down.
syncing file systems... done
Program terminated
ok 


範例 3–2 x86: 關閉叢集

下列範例顯示當正常的叢集作業停止,且所有節點關閉時的主控台輸出。在範例中,ok 提示符號不會顯示在所有節點上。-g 0 選項會將關機寬限期設成零,-y 選項提供自動的 yes 回應,以確認問題。關機訊息還會顯示在叢集中其他節點的主控台上。


# cluster shutdown -g0 -y
May  2 10:32:57 phys-schost-1 cl_runtime: 
WARNING: CMM: Monitoring disabled.  
root@phys-schost-1#
INIT: New run level: 0
The system is coming down.  Please wait.
System services are now being stopped.
/etc/rc0.d/K05initrgm: Calling scswitch -S (evacuate)
failfasts already disabled on node 1
Print services already stopped.
May  2 10:33:13 phys-schost-1 syslogd: going down on signal 15
The system is down.
syncing file systems... done
Type any key to continue 

另請參閱

請參閱如何啟動叢集重新啟動已關閉的叢集。

Procedure如何啟動叢集

此程序說明如何啟動叢集,該叢集的節點已關閉且位於 SPARC 系統上的 ok 提示符號或位於以 GRUB 為基礎的 x86 系統上的 Press any key to continue 訊息。

此程序提供長形式的 Sun Cluster 指令。大多指令也有短的形式。除了指令名稱有長形式和短形式之分外,指令本身是相同的。如需指令及其短形式的清單,請參閱附錄 ASun Cluster 以物件為導向的指令

  1. 啟動每個節點進入叢集模式。

    • 在基於 SPARC 的系統上,執行下列動作︰


      ok boot
      
    • 在基於 x86 的系統上,執行下列動作︰

      當螢幕顯示 GRUB 功能表時,請選取合適的 Solaris 項目然後按下 Enter。GRUB 功能表會以類似以下的方式顯示:


      GNU GRUB version 0.95 (631K lower / 2095488K upper memory)
      +-------------------------------------------------------------------------+
      | Solaris 10 /sol_10_x86                                                  |
      | Solaris failsafe                                                        |
      |                                                                         |
      +-------------------------------------------------------------------------+
      Use the ^ and v keys to select which entry is highlighted.
      Press enter to boot the selected OS, 'e' to edit the
      commands before booting, or 'c' for a command-line.

    備註 –

    叢集節點和叢集互連之間必須有運轉中的連線,才能夠成為叢集成員。


    如需得知更多以 GRUB 為基礎的啟動之相關資訊,請參閱「System Administration Guide: Basic Administration 」中的「System Administration Guide: Basic Administration」中的第 11 章「GRUB Based Booting (Tasks)」

  2. 確認節點啟動成功而且是在線上狀態。

    cluster(1CL) 狀況指令報告節點狀況。


    # cluster status -t node
    

    備註 –

    如果叢集節點的 /var 檔案系統已滿,Sun Cluster 可能無法在該節點上重新啟動。如果出現此問題,請參閱如何修復整個 /var 檔案系統



範例 3–3 SPARC: 啟動叢集

以下範例顯示 phys-schost-1 節點啟動為叢集時的主控台輸出。類似的訊息會出現在叢集中其他節點的主控台上。


ok boot
Rebooting with command: boot 
...
Hostname: phys-schost-1
Booting as part of a cluster
NOTICE: Node phys-schost-1 with votecount = 1 added.
NOTICE: Node phys-schost-2 with votecount = 1 added.
NOTICE: Node phys-schost-3 with votecount = 1 added.
...
NOTICE: Node phys-schost-1: attempting to join cluster
...
NOTICE: Node phys-schost-2 (incarnation # 937690106) has become reachable.
NOTICE: Node phys-schost-3 (incarnation # 937690290) has become reachable.
NOTICE: cluster has reached quorum.
NOTICE: node phys-schost-1 is up; new incarnation number = 937846227.
NOTICE: node phys-schost-2 is up; new incarnation number = 937690106.
NOTICE: node phys-schost-3 is up; new incarnation number = 937690290.
NOTICE: Cluster members: phys-schost-1 phys-schost-2 phys-schost-3.
...

Procedure如何重新啟動叢集

執行 cluster(1CL) shutdown 指令來關閉叢集,接著在各個節點上使用 boot(1M) 指令啟動叢集。

此程序提供長形式的 Sun Cluster 指令。大多指令也有短的形式。除了指令名稱有長形式和短形式之分外,指令本身是相同的。如需指令及其短形式的清單,請參閱附錄 ASun Cluster 以物件為導向的指令

  1. SPARC:如果叢集正在執行 Oracle Parallel Server 或 Oracle RAC,請關閉所有資料庫實例。

    請參閱 Oracle Parallel Server 或 Oracle RAC 產品說明文件,以取得關機程序的說明。

  2. 成為超級使用者或成為可在叢集中的任一節點上提供 solaris.cluster.admin RBAC 授權的角色。

  3. 關閉叢集。

    從叢集中的單一節點,輸入下列指令。


    # cluster shutdown -g0 -y 
    

    會關閉每一個節點。


    備註 –

    叢集節點和叢集互連之間必須有運轉中的連線,才能夠成為叢集成員。


  4. 啟動每一個節點。

    節點的啟動順序沒有任何影響,除非您在兩次關機之間進行配置變更。如果您在關機期間變更任何配置,請先以最近的配置啟動節點。

    • 在基於 SPARC 的系統上,執行下列動作︰


      ok boot
      
    • 在基於 x86 的系統上,執行下列動作︰

      當螢幕顯示 GRUB 功能表時,請選取合適的 Solaris 項目然後按下 Enter。GRUB 功能表會以類似以下的方式顯示:


      GNU GRUB version 0.95 (631K lower / 2095488K upper memory)
      +-------------------------------------------------------------------------+
      | Solaris 10 /sol_10_x86                                                  |
      | Solaris failsafe                                                        |
      |                                                                         |
      +-------------------------------------------------------------------------+
      Use the ^ and v keys to select which entry is highlighted.
      Press enter to boot the selected OS, 'e' to edit the
      commands before booting, or 'c' for a command-line.

    備註 –

    叢集節點和叢集互連之間必須有運轉中的連線,才能夠成為叢集成員。


    如需得知更多以 GRUB 為基礎的啟動之相關資訊,請參閱「System Administration Guide: Basic Administration 」中的「System Administration Guide: Basic Administration」中的第 11 章「GRUB Based Booting (Tasks)」

    當叢集元件啟動時,訊息會出現在啟動節點的主控台上。

  5. 確認節點啟動成功而且是在線上狀態。

    scstat 指令可報告節點的狀態。


    # cluster status -t node
    

    備註 –

    如果叢集節點的 /var 檔案系統已滿,Sun Cluster 可能無法在該節點上重新啟動。如果出現此問題,請參閱如何修復整個 /var 檔案系統



範例 3–4 SPARC: 重新啟動叢集

下列的範例顯示當停止正常的叢集作業,將所有節點關閉至 ok 提示符號,並重新啟動叢集時主控台的輸出。-g 0 選項可將寬限期設成零,-y 提供自動的 yes 回應,以確認問題。關機訊息還會出現在叢集中其他節點的主控台上。


# cluster shutdown -g0 -y
Wed Mar 10 13:47:32 phys-schost-1 cl_runtime: 
WARNING: CMM monitoring disabled.
phys-schost-1# 
INIT: New run level: 0
The system is coming down.  Please wait.
...
The system is down.
syncing file systems... done
Program terminated
ok boot
Rebooting with command: boot 
...
Hostname: phys-schost-1
Booting as part of a cluster
...
NOTICE: Node phys-schost-1: attempting to join cluster
...
NOTICE: Node phys-schost-2 (incarnation # 937690106) has become reachable.
NOTICE: Node phys-schost-3 (incarnation # 937690290) has become reachable.
NOTICE: cluster has reached quorum.
...
NOTICE: Cluster members: phys-schost-1 phys-schost-2 phys-schost-3.
...
NOTICE: Node phys-schost-1: joined cluster
...
The system is coming up.  Please wait.
checking ufs filesystems
...
reservation program successfully exiting
Print services started.
volume management starting.
The system is ready.
phys-schost-1 console login:
NOTICE: Node phys-schost-1: joined cluster
...
The system is coming up.  Please wait.
checking ufs filesystems
...
reservation program successfully exiting
Print services started.
volume management starting.
The system is ready.
phys-schost-1 console login: 

關閉與啟動單一叢集節點


備註 –

使用 clnode(1CL) evacuate 指令和 Solaris shutdown(1M) 指令來關閉個別的節點。唯有在關閉整個叢集時,才使用 cluster shutdown 指令。如需關於關閉與啟動非全域區域的資訊,請參閱「System Administration Guide: Solaris Containers-Resource Management and Solaris Zones 」中的「System Administration Guide: Solaris Containers-Resource Management and Solaris Zones」中的第 20 章「Installing, Booting, Halting, Uninstalling, and Cloning Non-Global Zones (Tasks)」


表 3–2 作業清單:關閉與啟動叢集節點

作業 

工具 

操作說明 

停止叢集節點 

使用 clnode(1CL) evacuate 指令和 shutdown 指令

如何關閉叢集節點

啟動節點 

節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。 

使用 bootb 指令

如何啟動叢集節點

停止並重新啟動 (重新開機) 叢集節點 

節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。 

使用 clnode evacuateshutdown 指令

如何重新啟動叢集節點

啟動節點,以讓此節點不參與成為叢集成員 

使用 clnode evacuateshutdown 指令,接著使用 boot -xshutdown -g -y -i0 指令

如何以非叢集模式啟動叢集節點

Procedure如何關閉叢集節點


注意 – 注意 –

請勿在叢集主控台上使用 send brk 來關閉叢集節點。叢集中並不支援這個指令。


如需關於關閉非全域區域的資訊,請參閱「System Administration Guide: Solaris Containers-Resource Management and Solaris Zones 」中的「System Administration Guide: Solaris Containers-Resource Management and Solaris Zones」中的第 20 章「Installing, Booting, Halting, Uninstalling, and Cloning Non-Global Zones (Tasks)」

此程序提供長形式的 Sun Cluster 指令。大多指令也有短的形式。除了指令名稱有長形式和短形式之分外,指令本身是相同的。如需指令及其短形式的清單,請參閱附錄 ASun Cluster 以物件為導向的指令

  1. SPARC:如果叢集正在執行 Oracle Parallel Server 或 Oracle RAC,請關閉所有資料庫實例。

    請參閱 Oracle Parallel Server 或 Oracle RAC 產品說明文件,以取得關機程序的說明。

  2. 成為超級使用者或成為可在叢集中要關閉的叢集節點上提供 solaris.cluster.admin RBAC 授權的角色。

  3. 將所有的資源群組、資源以及裝置群組,從要關閉的節點切換到其他叢集成員。

    在要關閉的節點上,鍵入下列指令。clnode evacuate 指令可切換所有資源群組和裝置群組,包含所有來自指定節點到下個偏好的節點的非全域區域。


    # clnode evacuate 節點
    
    節點

    指定您要從中切換資源群組及裝置群組的節點。

  4. 關閉叢集節點。

    在要關閉的節點上,鍵入下列指令。


    # shutdown -g0 -y -i0
    

    驗證叢集節點否在以 SPARC 為基礎的系統上是顯示 ok 提示符號或在以 x86 為基礎的系統的 GRUB 功能表上顯示 Press any key to continue 訊息。

  5. 必要時請關閉節點電源。


範例 3–5 SPARC: 關閉叢集節點

當關閉 phys-schost-1 時,下列範例會顯示主控台輸出。-g0 選項會將寬限期設定為零,-y 選項會對確認的問題提供自動的 yes 回應。這個節點的關閉訊息出現在叢集中另一個節點的主控台上。


# clnode evacuate -S -h phys-schost-1
# shutdown -T0 -y
Wed Mar 10 13:47:32 phys-schost-1 cl_runtime:
WARNING: CMM monitoring disabled.
phys-schost-1# 
INIT: New run level: 0
The system is coming down.  Please wait.
Notice: rgmd is being stopped.
Notice: rpc.pmfd is being stopped.
Notice: rpc.fed is being stopped.
umount: /global/.devices/node@1 busy
umount: /global/phys-schost-1 busy
The system is down.
syncing file systems... done
Program terminated
ok 


範例 3–6 x86: 關閉叢集節點

當關閉 phys-schost-1 時,下列範例會顯示主控台輸出。-g0 選項會將寬限期設定為零,-y 選項會對確認的問題提供自動的 yes 回應。這個節點的關閉訊息出現在叢集中另一個節點的主控台上。


# clnode evacuate phys-schost-1
# shutdown -T0 -y
Shutdown started.    Wed Mar 10 13:47:32 PST 2004

Changing to init state 0 - please wait
Broadcast Message from root (console) on phys-schost-1 Wed Mar 10 13:47:32... 
THE SYSTEM phys-schost-1 IS BEING SHUT DOWN NOW ! ! !
Log off now or risk your files being damaged

phys-schost-1#
INIT: New run level: 0
The system is coming down.  Please wait.
System services are now being stopped.
/etc/rc0.d/K05initrgm: Calling scswitch -S (evacuate)
failfasts disabled on node 1
Print services already stopped.
Mar 10 13:47:44 phys-schost-1 syslogd: going down on signal 15
umount: /global/.devices/node@2 busy
umount: /global/.devices/node@1 busy
The system is down.
syncing file systems... done
WARNING: CMM: Node being shut down.
Type any key to continue 

另請參閱

請參閱如何啟動叢集節點重新啟動已關閉的叢集節點。

Procedure如何啟動叢集節點

如果您計劃關閉或重新啟動叢集中其他的使用中節點,請至少等待至您正啟動的節點已達到下列狀況:

否則,該節點將不能用於接管來自您關閉或重新啟動的叢集中其他節點的服務。如需關於啟動非全域區域的資訊,請參閱「System Administration Guide: Solaris Containers-Resource Management and Solaris Zones 」中的「System Administration Guide: Solaris Containers-Resource Management and Solaris Zones」中的第 20 章「Installing, Booting, Halting, Uninstalling, and Cloning Non-Global Zones (Tasks)」


備註 –

啟動叢集節點會受到法定數目配置的影響。在擁有兩個節點的叢集中,您必須配置法定裝置以使叢集的法定總數為三。每一個節點都應有一個法定計數,以及一個法定計數用於法定裝置。在這個情況下,如果第一個節點關閉,第二個節點會使法定裝置繼續當作單獨的叢集成員執行。要使第一個節點回到叢集中成為叢集節點,則第二個節點必須啟動並執行。必要的叢集法定計數 (二) 必須存在。


此程序提供長形式的 Sun Cluster 指令。大多指令也有短的形式。除了指令名稱有長形式和短形式之分外,指令本身是相同的。如需指令及其短形式的清單,請參閱附錄 ASun Cluster 以物件為導向的指令

  1. 若要啟動已經關閉的叢集節點,請啟動節點。

    • 在基於 SPARC 的系統上,執行下列動作︰


      ok boot
      
    • 在基於 x86 的系統上,執行下列動作︰

      當螢幕顯示 GRUB 功能表時,請選取合適的 Solaris 項目然後按下 Enter。GRUB 功能表會以類似以下的方式顯示:


      GNU GRUB version 0.95 (631K lower / 2095488K upper memory)
      +-------------------------------------------------------------------------+
      | Solaris 10 /sol_10_x86                                                  |
      | Solaris failsafe                                                        |
      |                                                                         |
      +-------------------------------------------------------------------------+
      Use the ^ and v keys to select which entry is highlighted.
      Press enter to boot the selected OS, 'e' to edit the
      commands before booting, or 'c' for a command-line.

    當叢集元件啟動時,訊息會出現在啟動節點的主控台上。


    備註 –

    叢集節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。


  2. 確認節點啟動成功而且是在線上狀態。

    cluster status 指令報告節點的狀態。


    # cluster status -t node
    

    備註 –

    如果叢集節點的 /var 檔案系統已滿,Sun Cluster 可能無法在該節點上重新啟動。如果出現此問題,請參閱如何修復整個 /var 檔案系統



範例 3–7 SPARC: 啟動叢集節點

以下範例顯示 phys-schost-1 節點啟動為叢集時的主控台輸出。


ok boot
Rebooting with command: boot 
...
Hostname: phys-schost-1
Booting as part of a cluster
...
NOTICE: Node phys-schost-1: attempting to join cluster
...
NOTICE: Node phys-schost-1: joined cluster
...
The system is coming up.  Please wait.
checking ufs filesystems
...
reservation program successfully exiting
Print services started.
volume management starting.
The system is ready.
phys-schost-1 console login:

Procedure如何重新啟動叢集節點

如果您計劃關閉或重新啟動叢集中其他的作用中節點,請至少等待至您正重新啟動的節點已達到下列狀況:

否則,該節點將不能用於接管來自您關閉或重新啟動的叢集中其他節點的服務。如需關於重新啟動非全域區域的資訊,請參閱「System Administration Guide: Solaris Containers-Resource Management and Solaris Zones 」中的「System Administration Guide: Solaris Containers-Resource Management and Solaris Zones」中的第 20 章「Installing, Booting, Halting, Uninstalling, and Cloning Non-Global Zones (Tasks)」

此程序提供長形式的 Sun Cluster 指令。大多指令也有短的形式。除了指令名稱有長形式和短形式之分外,指令本身是相同的。如需指令及其短形式的清單,請參閱附錄 ASun Cluster 以物件為導向的指令

  1. SPARC:如果叢集節點正在執行 Oracle Parallel Server 或 Oracle RAC,請關閉所有資料庫實例。

    請參閱 Oracle Parallel Server 或 Oracle RAC 產品說明文件,以取得關機程序的說明。

  2. 成為超級使用者或成為在要關閉的叢集節點上提供 solaris.cluster.admin RBAC 授權的角色。

  3. 使用 clnode evacuate shutdown 指令關閉叢集節點。

    在要關閉的節點上輸入下列指令。clnode evacuate 指令會將所有裝置群組從特定的節點切換至下一個喜好的節點。指定也會將所有資源群組從特定節點上的全域或非全域區域切換至其他節點上的下一個喜好全域或非全域區域。

    • 在基於 SPARC 的系統上,執行下列動作︰


      # clnode evacuate  節點
      # shutdown -g0 -y -i6
      
    • 在基於 x86 的系統上,執行下列動作︰


      # clnode evacuate  節點
      

      當螢幕顯示 GRUB 功能表時,請選取合適的 Solaris 項目然後按下 Enter。GRUB 功能表會以類似以下的方式顯示:


      GNU GRUB version 0.95 (631K lower / 2095488K upper memory)
      +-------------------------------------------------------------------------+
      | Solaris 10 /sol_10_x86                                                  |
      | Solaris failsafe                                                        |
      |                                                                         |
      +-------------------------------------------------------------------------+
      Use the ^ and v keys to select which entry is highlighted.
      Press enter to boot the selected OS, 'e' to edit the
      commands before booting, or 'c' for a command-line.

    備註 –

    叢集節點和叢集互連之間必須有運轉中的連線,才能夠成為叢集成員。


  4. 確認節點啟動成功而且是在線上狀態。


    # cluster status -t node
    

範例 3–8 SPARC: 重新啟動叢集節點

當重新啟動 phys-schost-1 時,下列範例會顯示主控台輸出。這個節點的訊息,例如關機和啟動通知,會顯示在叢集中其他節點的主控台上。


# clnode evacuate phys-schost-1
# shutdown -g0 -y -i6
Shutdown started.    Wed Mar 10 13:47:32 phys-schost-1 cl_runtime: 

WARNING: CMM monitoring disabled.
phys-schost-1# 
INIT: New run level: 6
The system is coming down.  Please wait.
System services are now being stopped.
Notice: rgmd is being stopped.
Notice: rpc.pmfd is being stopped.
Notice: rpc.fed is being stopped.
umount: /global/.devices/node@1 busy
umount: /global/phys-schost-1 busy
The system is down.
syncing file systems... done
rebooting...
Resetting ... 
,,,
Sun Ultra 1 SBus (UltraSPARC 143MHz), No Keyboard
OpenBoot 3.11, 128 MB memory installed, Serial #5932401.
Ethernet address 8:8:20:99:ab:77, Host ID: 8899ab77.
...
Rebooting with command: boot
...
Hostname: phys-schost-1
Booting as part of a cluster
...
NOTICE: Node phys-schost-1: attempting to join cluster
...
NOTICE: Node phys-schost-1: joined cluster
...
The system is coming up.  Please wait.
The system is ready.
phys-schost-1 console login: 


範例 3–9 x86: 重新啟動叢集節點

以下範例顯示重新啟動節點 phys-schost-1 時的主控台輸出。這個節點的訊息,例如關機和啟動通知,會顯示在叢集中其他節點的主控台上。


# clnode evacuate phys-schost-1
ok boot
Rebooting with command: boot 
...
Hostname: phys-schost-1
Booting as part of a cluster
...
NOTICE: Node phys-schost-1: attempting to join cluster
...
NOTICE: Node phys-schost-1: joined cluster
...
The system is coming up.  Please wait.
checking ufs filesystems
...
reservation program successfully exiting
Print services started.
volume management starting.
The system is ready.
phys-schost-1 console login: 

Procedure如何以非叢集模式啟動叢集節點

您可以啟動一個節點以便該節點不以叢集成員身份參與作業,即非叢集模式。在安裝叢集軟體或執行某些管理程序 (如修補節點) 時,非叢集模式非常有用。

此程序提供長形式的 Sun Cluster 指令。大多指令也有短的形式。除了指令名稱有長形式和短形式之分外,指令本身是相同的。如需指令及其短形式的清單,請參閱附錄 ASun Cluster 以物件為導向的指令

  1. 成為超級使用者或成為可在叢集中要關閉的節點上提供 solaris.cluster.admin RBAC 授權的角色。

  2. 使用 clnode evacuate shutdown 指令關閉節點。

    clnode evacuate 指令會將所有裝置群組從特定的節點切換至下一個喜好的節點。指定也會將所有資源群組從特定節點上的全域或非全域區域切換至其他節點上的下一個喜好全域或非全域區域。


    # clnode evacuate  節點
    # shutdown -g0 -y
    
  3. 驗證叢集節點在以 Solaris 為基礎的系統上是否顯示 ok 提示符號或在以 x86 為基礎的系統的 GRUB 功能表上顯示 Press any key to continue 訊息。

  4. 在非叢集模式中啟動節點。

    • 在 SPARC 架構的系統上,執行下列指令:


      phys-schost# boot -xs
      
    • 在 x86 架構的系統上,執行下列指令:


      phys-schost# shutdown -g -y -i0
      
      Press any key to continue
    1. 在 GRUB 功能表中,使用方向鍵選取適合的 Solaris 項目,並鍵入 e 以編輯其指令。

      GRUB 功能表會以類似以下的方式顯示:


      GNU GRUB version 0.95 (631K lower / 2095488K upper memory)
      +-------------------------------------------------------------------------+
      | Solaris 10 /sol_10_x86                                                  |
      | Solaris failsafe                                                        |
      |                                                                         |
      +-------------------------------------------------------------------------+
      Use the ^ and v keys to select which entry is highlighted.
      Press enter to boot the selected OS, 'e' to edit the
      commands before booting, or 'c' for a command-line.

      如需得知更多以 GRUB 為基礎的啟動之相關資訊,請參閱「System Administration Guide: Basic Administration 」中的「System Administration Guide: Basic Administration」中的第 11 章「GRUB Based Booting (Tasks)」

    2. 在啟動參數畫面中,使用方向鍵選取核心項目並鍵入 e 以編輯該項目。

      GRUB 啟動參數畫面會以類似以下的方式顯示:


      GNU GRUB version 0.95 (615K lower / 2095552K upper memory)
      +----------------------------------------------------------------------+
      | root (hd0,0,a)                                                       |
      | kernel /platform/i86pc/multiboot                                     |
      | module /platform/i86pc/boot_archive                                  |
      +----------------------------------------------------------------------+
      Use the ^ and v keys to select which entry is highlighted.
      Press 'b' to boot, 'e' to edit the selected command in the
      boot sequence, 'c' for a command-line, 'o' to open a new line
      after ('O' for before) the selected line, 'd' to remove the
      selected line, or escape to go back to the main menu.
    3. -x 增加至指令以指定系統會啟動至非叢集模式。


      [ Minimal BASH-like line editing is supported. For the first word, TAB
      lists possible command completions. Anywhere else TAB lists the possible
      completions of a device/filename. ESC at any time exits. ]
      
      grub edit> kernel /platform/i86pc/multiboot -x
    4. 按 Enter 鍵接受變更並返回啟動參數畫面。

      畫面會顯示已編輯的指令。


      GNU GRUB version 0.95 (615K lower / 2095552K upper memory)
      +----------------------------------------------------------------------+
      | root (hd0,0,a)                                                       |
      | kernel /platform/i86pc/multiboot -x                                  |
      | module /platform/i86pc/boot_archive                                  |
      +----------------------------------------------------------------------+
      Use the ^ and v keys to select which entry is highlighted.
      Press 'b' to boot, 'e' to edit the selected command in the
      boot sequence, 'c' for a command-line, 'o' to open a new line
      after ('O' for before) the selected line, 'd' to remove the
      selected line, or escape to go back to the main menu.-
    5. 鍵入 b 將節點啟動至非叢集模式。


      備註 –

      對核心啟動參數指令所做的這個變更不會在系統啟動後持續。下次您重新啟動節點時,將會啟動至叢集模式。若要啟動至非叢集模式,請重新執行這些步驟,將 -x 選項增加至核心啟動參數指令。



範例 3–10 SPARC: 以非叢集模式啟動叢集節點

當關閉節點 phys-schost-1 且重新啟動於非叢集模式中時,下列範例會顯示主控台輸出。-g0 選項會將寬限期設成零,-y 選項會對確認的問題提供自動的 yes 回應,而 -i0 會呼叫執行層級 0 (零)。這個節點的關閉訊息出現在叢集中另一個節點的主控台上。


# clnode evacuate phys-schost-1
# cluster shutdown -T0 -y
Shutdown started.    Wed Mar 10 13:47:32 phys-schost-1 cl_runtime: 

WARNING: CMM monitoring disabled.
phys-schost-1# 
...
rg_name = schost-sa-1 ...
offline node = phys-schost-2 ...
num of node = 0 ...
phys-schost-1# 
INIT: New run level: 0
The system is coming down.  Please wait.
System services are now being stopped.
Print services stopped.
syslogd: going down on signal 15
...
The system is down.
syncing file systems... done
WARNING: node phys-schost-1 is being shut down.
Program terminated

ok boot -x
...
Not booting as part of cluster
...
The system is ready.
phys-schost-1 console login:

修復整個 /var 檔案系統

Solaris 和 Sun Cluster 軟體都將錯誤訊息寫入 /var/adm/messages 檔案,而在一段時間後會將 /var 檔案系統佔滿。如果叢集節點的 /var 檔案系統已滿,Sun Cluster 可能無法在該節點上重新啟動。不僅如此,您還可能無法登入該節點。

Procedure如何修復整個 /var 檔案系統

如果節點報告整個 /var 檔案系統已滿但仍繼續執行 Sun Cluster 服務,請使用這個程序清除已滿的檔案系統。請參閱「System Administration Guide: Advanced Administration 」中的「System Administration Guide: Advanced Administration」中的「Viewing System Messages」以取得更多資訊。

此程序提供長形式的 Sun Cluster 指令。大多指令也有短的形式。除了指令名稱有長形式和短形式之分外,指令本身是相同的。如需指令及其短形式的清單,請參閱附錄 ASun Cluster 以物件為導向的指令

  1. 在擁有已滿的 /var 檔案系統的叢集節點上成為超級使用者。

  2. 清除整個檔案系統。

    例如,刪除檔案系統中不必要的檔案。