Sun Cluster 3.0 系統管理手冊

2.1 關閉與啟動叢集概觀

Sun Cluster scshutdown(1M) 指令可依序停止叢集服務並完全關閉叢集。


註解 -

請使用 scshutdown,不是 shutdownhalt 指令來保證整個叢集正常關機。Solaris shutdown 指令用來關閉個別的節點。


scshutdown 指令以下列方式停止叢集:

  1. 使所有執行中的資源群組進入離線狀態

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

  3. 關閉作用中的裝置服務

  4. 執行 init 0 並使所有節點來到 ok PROM 提示

當您要將叢集從某個位置移到另一個位置或因應用程式錯誤導致資料損壞時,便可能需要這樣做。


註解 -

如有必要,您可以非叢集模式啟動節點,來使該節點不是叢集的成員。這在安裝叢集軟體或執行某些管理程序時,非常有用。請參閱 "2.2.4 如何以非叢集模式啟動叢集節點" 以取得其他資訊。


.

表 2-1 作業指引:關閉與啟動叢集

作業 

有關資訊,請進到 ... 

停止節點 

- 使用 scshutdown

"2.1.1 如何關閉叢集"

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

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

"2.1.2 如何啟動叢集"

關閉叢集 

- 使用 scshutdown

ok 提示下,請使用 boot 指令將各節點分別啟動。

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

"2.1.3 如何重新啟動叢集"

2.1.1 如何關閉叢集

  1. (選擇性)。在執行 Oracle Parallel Server(OPS)的叢集,請關閉所有的 OPS 資料庫實例。

    請參閱 Oracle Parallel Server 產品文件來取得關機程序。

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

  3. 使用 scshutdown(1M) 指令立即關閉叢集。

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


    # scshutdown -g 0 -y
    
  4. 確認所有的節點都顯示 ok PROM 提示。

  5. 必要的話,關閉節點的的電源。

2.1.1.1 範例-關閉叢集

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


# scshutdown -g 0 -y
Sep  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.
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 

2.1.1.2 下一步

請參閱 "2.1.2 如何啟動叢集" 來重新啟動已經關機的叢集。

2.1.2 如何啟動叢集

  1. 要啟動已經停止並顯示 ok PROM 提示的節點的叢集,請啟動每一個節點。

    節點的啟動順序沒有任何影響,除非您在二次關機之間進行變更。在這種情況時,您必須先啟動最後配置的節點。


    ok boot
    

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


    註解 -

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


  2. 確認節點啟動成功而且維持運轉。

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


    # scstat -n
    

2.1.2.1 範例-啟動叢集

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


ok boot
Rebooting with command: boot 
...
Hostname: phys-schost-1
Booting as part of a cluster
NOTICE: Node 1 with votecount = 1 added.
NOTICE: Node 2 with votecount = 1 added.
NOTICE: Node 3 with votecount = 1 added.
...
NOTICE: Node 1: attempting to join cluster
...
NOTICE: Node 2 (incarnation # 937690106) has become reachable.
NOTICE: Node 3 (incarnation # 937690290) has become reachable.
NOTICE: cluster has reached quorum.
NOTICE: node 1 is up; new incarnation number = 937846227.
NOTICE: node 2 is up; new incarnation number = 937690106.
NOTICE: node 3 is up; new incarnation number = 937690290.
NOTICE: Cluster members:   1  2  3
...
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.1.3 如何重新啟動叢集

請執行 scshutdown(1M) 指令來關閉叢集,接著在每一個節點上使用 boot 指令來啟動叢集。

  1. (選擇性)。在執行 Oracle Parallel Server(OPS)的叢集時,請關閉所有的 OPS 資料庫實例。

    請參閱 Oracle Parallel Server 產品文件來取得關機程序。

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

  3. 使用 scshutdown 指令來關閉叢集。

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


    # scshutdown -g 0 -y 
    

    這樣會關閉每一個節點使其顯示 ok PROM 提示。


    註解 -

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


  4. 啟動每一個節點。

    節點的啟動順序沒有任何影響,除非您在二次關機之間進行變更。在這種情況時,您必須先啟動最後配置的節點。


    ok boot
    

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

  5. 確認節點啟動成功而且維持運轉。

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


    # scstat -n
    

2.1.3.1 範例-重新啟動叢集

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


# scshutdown -g 0 -y
Sep  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.
...
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 1: attempting to join cluster
...
NOTICE: Node 2 (incarnation # 937690106) has become reachable.
NOTICE: Node 3 (incarnation # 937690290) has become reachable.
NOTICE: cluster has reached quorum.
...
NOTICE: Cluster members:   1  2  3
...
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: