本章提供關閉與啟動叢集以及個別叢集節點的程序。
以下是本章介紹的程序列表。
有關本章中的相關程序的進階說明,請參閱 表 2-1 與 表 2-2。
Sun Cluster scshutdown(1M) 指令可依序停止叢集服務並完全關閉叢集。
請使用 scshutdown,不是 shutdown 或 halt 指令來保證整個叢集正常關機。Solaris shutdown 指令用來關閉個別的節點。
scshutdown 指令以下列方式停止叢集:
使所有執行中的資源群組進入離線狀態
卸載所有的叢集檔案系統
關閉作用中的裝置服務
執行 init 0 並使所有節點來到 ok PROM 提示
當您要將叢集從某個位置移到另一個位置或因應用程式錯誤導致資料損壞時,便可能需要這樣做。
如有必要,您可以非叢集模式啟動節點,來使該節點不是叢集的成員。這在安裝叢集軟體或執行某些管理程序時,非常有用。請參閱 "2.2.4 如何以非叢集模式啟動叢集節點" 以取得其他資訊。
.
表 2-1 作業指引:關閉與啟動叢集
作業 |
有關資訊,請進到 ... |
---|---|
停止節點 - 使用 scshutdown | |
以啟動所有節點的方式啟動叢集。 節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。 | |
關閉叢集 - 使用 scshutdown 在 ok 提示下,請使用 boot 指令將各節點分別啟動。 節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。 |
(選擇性)。在執行 Oracle Parallel Server(OPS)的叢集,請關閉所有的 OPS 資料庫實例。
請參閱 Oracle Parallel Server 產品文件來取得關機程序。
成為叢集中某個節點的超級使用者(superuser)。
使用 scshutdown(1M) 指令立即關閉叢集。
從叢集中的單一節點,請輸入下列指令。
# scshutdown -g 0 -y |
確認所有的節點都顯示 ok PROM 提示。
必要的話,關閉節點的的電源。
以下範例顯示先停止叢集正常作業,然後關閉所有節點使其顯示 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.2 如何啟動叢集" 來重新啟動已經關機的叢集。
要啟動已經停止並顯示 ok PROM 提示的節點的叢集,請啟動每一個節點。
節點的啟動順序沒有任何影響,除非您在二次關機之間進行變更。在這種情況時,您必須先啟動最後配置的節點。
ok boot |
當叢集元件啟動時,訊息會出現在啟動節點的主控台上。
叢集節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。
確認節點啟動成功而且維持運轉。
scstat(1M) 指令可報告節點的狀態。
# scstat -n |
以下範例顯示 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: |
請執行 scshutdown(1M) 指令來關閉叢集,接著在每一個節點上使用 boot 指令來啟動叢集。
(選擇性)。在執行 Oracle Parallel Server(OPS)的叢集時,請關閉所有的 OPS 資料庫實例。
請參閱 Oracle Parallel Server 產品文件來取得關機程序。
成為叢集中某個節點的超級使用者(superuser)。
使用 scshutdown 指令來關閉叢集。
從叢集中的單一節點,請輸入下列指令。
# scshutdown -g 0 -y |
這樣會關閉每一個節點使其顯示 ok PROM 提示。
叢集節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。
啟動每一個節點。
節點的啟動順序沒有任何影響,除非您在二次關機之間進行變更。在這種情況時,您必須先啟動最後配置的節點。
ok boot |
當叢集元件啟動時,訊息會出現在啟動節點的主控台上。
確認節點啟動成功而且維持運轉。
scstat 指令可報告節點的狀態。
# scstat -n |
以下範例顯示先停止叢集正常作業並關閉所有節點使其顯示 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: |
請使用 scswitch 指令及 Solaris shutdown 指令,來關閉個別的節點。只有在關閉整個的叢集時,才使用 scshutdown 指令。
作業 |
有關資訊,請進到 ... |
---|---|
停止叢集節點 - 使用 scswitch(1M) 與 shutdown(1M) | |
以開機方式啟動節點。 節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。 | |
停止並重新啟動(重新開機)叢集節點 - 使用 scswitch 與 shutdown 節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。 | |
啟動節點,讓此節點不參與叢集的成員身份 - 使用 scswitch 與 shutdown,然後啟動 -x |
(選擇性)。在執行 Oracle Parallel Server(OPS)的叢集節點時,請關閉所有的 OPS 資料庫實例。
請參閱 Oracle Parallel Server 產品文件來取得關機程序。
成為要關機之叢集節點的超級使用者(superuser)。
使用 scswitch 以及 shutdown 指令來關閉叢集節點。
在要關機的節點上,輸入下列指令。
# scswitch -S -h node # shutdown -g 0 -y |
確認叢集節點已經到達 ok PROM 提示。
必要時請關閉節點電源。
以下範例顯示關閉 phys-schost-1 節點時的主控台輸出。-g 0 選項可將寬限值設成零,-y 可對確認問題自動提供 yes(是)的回應。這個節點的關閉訊息出現在叢集中另一個節點的主控台上。
# scswitch -S -h phys-schost-1 # shutdown -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. 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.2 如何啟動叢集節點" 來重新啟動已經關機的叢集節點。
啟動叢集節點會受到 quorum 配置的影響。在二個節點的叢集,您必須配置法定裝置來使叢集的法定總數為 三(二個節點以及一個法定裝置)。在這個情況下,如果第一個節點關閉,第二個節點會使法定繼續當作單獨的叢集成員 執行。要使第一個回到叢集中成為叢集節點,第二個節點必須啟動並執行,必要的叢集法定計數(二)必須存在。
要啟動已經關閉的叢集節點,請啟動節點。
ok boot |
當叢集元件啟動時,訊息會出現在啟動之節點的主控台以及成員節點的主控台上。
叢集節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。
確認節點啟動成功而且在線上。
scstat(1M) 指令可報告節點的狀態。
# scstat -n |
以下範例顯示 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: |
(選擇性)。在執行 Oracle Parallel Server(OPS)的叢集節點,請關閉所有的 OPS 資料庫實例。
請參閱 Oracle Parallel Server 產品文件來取得關機程序。
成為要關機之叢集節點的超級使用者(superuser)。
使用 scswitch 以及 shutdown 指令來關閉叢集節點。
在要關機的節點上,輸入下列指令。
# scswitch -S -h node # shutdown -g 0 -y -i 6 |
此項 -i 6 選擇含 shutdown 指令,可讓節點在關閉成 ok PROM 提示後重新開機。
叢集節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。
確認節點啟動成功而且在線上。
scstat(1M) 指令可報告節點的狀態。
# scstat -n |
以下範例顯示節點 phys-schost-1 節點關機再重新啟動時顯示的主控台輸出。-g 0 選項可將寬限值設成零,-y 可對確認問題自動提供 yes(是)的回應。這個節點的關機與啟動訊息會顯示在叢集中其他節點的主控台上。
# scswitch -S -h phys-schost-1 # shutdown -g 0 -y -i 6 Sep 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 #7982421. Ethernet address 8:0:20:79:cd:55, Host ID: 8079cd55. ... 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: |
您還可以非叢集模式啟動節點,使該節點不是叢集的成員。這在安裝叢集軟體或執行某些管理程序如修補節點時,非常有用。
在要以非叢集模式啟動的叢集上成為超級使用者(superuser)
使用 scswitch 與 shutdown 指令來關閉節點。
# scswitch -S -h node # shutdown -g 0 -y |
確認節點顯示 ok PROM 提示。
使用 boot(1M) 指令以及 -x 選項,以非叢集模式啟動節點。
ok boot -x |
節點的主控台出現的訊息指出,節點不是叢集的一部份。
以下範例顯示 phys-schost-1 節點先關閉再以非叢集模式啟動時的主控台輸出。-g -0 選項可將寬限值設成零,-y 可對確認問題自動提供 yes(是)的回應。這個節點的關閉訊息出現在叢集中另一個節點的主控台上。
# scswitch -S -h phys-schost-1 # shutdown -g 0 -y Sep 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: |
本節說明叢集與叢集節點日常作業可能發生之問題的解決方案。
Solaris 與 Sun Cluster 軟體都是將錯誤訊息寫入 /var/adm/messages 檔,一段時間後可能會填滿 /var 檔案系統。如果叢集節點的 /var 檔案系統已滿, Sun Cluster 可能無法在該節點啟動。不僅如此,您還可能無法登入該節點。
如果節點報告 /var 檔案系統已滿但仍繼續執行 Sun Cluster 服務,請使用這個程序清除已滿的檔案系統。