Sun Cluster 3.0 12/01 系統管理手冊

2.2 關閉與啟動單一叢集節點


註解 -

請使用 scswitch 指令及 Solaris shutdown 指令,來關閉個別的節點。 唯有在關閉整個叢集時,才使用 scshutdown 指令。


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

作業 

如需相關說明,請參閱... 

停止叢集節點  

- 使用 scswitch(1M) 和 shutdown(1M)

"2.2.1 如何關閉叢集節點"

以開機方式啟動節點。 

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

"2.2.2 如何啟動叢集節點"

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

- 使用 scswitchshutdown

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

"2.2.3 如何重新啟動叢集節點"

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

- 使用 scswitchshutdown,然後是 boot -x

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

2.2.1 如何關閉叢集節點


小心 - 小心 -

請勿在叢集主控台上使用 send brk 來關閉叢集節點。 如果您使用 send brk 然後輸入go ok 提示符號處 來重新啟動,則節點會產生混亂的狀況。叢集中並不支援此種功能。


  1. 如果您正在執行 Oracle Parallel Server/Real Application Clusters,請關閉所有資料庫實例。

    請參閱 Oracle Parallel Server/Real Application Clusters 產品文件,以取得關機程序的說明。

  2. 成為要關機之叢集節點的超級使用者。

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

    在要關機的節點,輸入以下指令。


    # scswitch -S -h nodelist
    

    -S

    從指定的節點撤出所有的裝置服務與資源群組。

    -h nodelist

    指定您要用來轉換資源群組及裝置群組的節點。

  4. 關閉叢集節點為 OBP。

    在要關機的節點,輸入以下指令。


    # shutdown -g0 -y -i0
    

  5. 確認叢集節點已經顯示於 ok 提示處。

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

2.2.1.1 範例-關閉叢集節點

以下範例顯示關閉節點 phys-schost-1 時的主控台輸出。 -g0 選項將寬限期設成零,-y 提供自動的 yes 回應,以確認問題,以及 -i0 啟動執行層次 0 (零)。 這個節點的關閉訊息出現在叢集中另一個節點的主控台上。


# scswitch -S -h phys-schost-1
# shutdown -g0 -y -i0
May 2 10:08:46 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 

2.2.1.2 下一步

請參閱 "2.2.2 如何啟動叢集節點",以重新啟動已經關機的叢集節點。

2.2.2 如何啟動叢集節點


註解 -

啟動叢集節點會受到法定數目配置的影響。 在兩個節點的叢集中,您必須配置法定裝置來使叢集的法定總數為三 (一個是給節點而另一個是給法定裝置)。 在這個情況下,如果第一個節點關閉,第二個節點會使法定裝置繼續當作單獨的叢集成員來執行。 要使第一個節點回到叢集中成為叢集節點,第二個節點必須啟動並執行,且必要的叢集法定總數 (二) 必須存在。


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


    ok boot
    

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


    註解 -

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


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

    scstat(1M) 指令可報告節點的狀態。


    # scstat -n
    


    註解 -

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


2.2.2.1 範例-啟動叢集節點

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


ok boot
Rebooting with command: boot 
...
Hostname: phys-schost-1
Booting as part of a cluster
...
NOTICE: Node 1: attempting to join cluster
...
NOTICE: Node 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:

2.2.3 如何重新啟動叢集節點

  1. 如果叢集節點正在執行 Oracle Parallel Server/Real Application Clusters,請關閉所有資料庫實例。

    請參閱 Oracle Parallel Server/Real Application Clusters 產品文件,以取得關機程序的說明。

  2. 成為要關機之叢集節點的超級使用者。

  3. 使用 scswitch 以及 shutdown 指令來關閉叢集節點。

    在要關機的節點上,輸入下列指令。 -i 6 選項含有 shutdown 指令,可讓節點在關閉成 ok 提示後,重新開機。


    # scswitch -S -h nodelist
    # shutdown -g0 -y -i6
    

    註解 -

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


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


    # scstat -n
    

2.2.3.1 範例-重新啟動叢集節點

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


# scswitch -S -h phys-schost-1
# shutdown -g0 -y -i6
May 2 10:08:46 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 1: attempting to join cluster
...
NOTICE: Node 1: joined cluster
...
The system is coming up.  Please wait.
The system is ready.
phys-schost-1 console login:

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

您還可以非叢集模式啟動節點,使該節點不會參與成為叢集的成員。 這在安裝叢集軟體或執行某些管理程序 (如修補節點) 時,非常有用。

  1. 在以非叢集模式啟動的叢集上成為超級使用者。

  2. 使用 scswitchshutdown 指令來關閉節點。


    # scswitch -S -h nodelist
    # shutdown -g0 -y -i0
    

  3. 確認節點顯示於 ok 提示處。

  4. 使用 boot(1M) 指令以及 -x 選項,以非叢集模式啟動節點。


    ok boot -x
    

    節點的主控台出現的訊息指出,節點不是叢集的一部份。

2.2.4.1 範例-以非叢集模式啟動叢集節點

以下範例顯示先關閉節點 phys-schost-1 再以非叢集模式啟動時的主控台輸出。 -g0 選項將寬限期設成零,-y 提供自動的 yes 回應,以確認問題,以及 -i0 啟動執行層次 0 (零)。 這個節點的關閉訊息出現在叢集中另一個節點的主控台上。


# scswitch -S -h phys-schost-1
# shutdown -g0 -y -i0
May 2 10:08:46 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 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: