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

關閉與啟動單一叢集節點


備註 –

使用 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: