本章提供關閉與啟動叢集以及個別叢集節點的程序。
以下是本章介紹的程序列表。
有關本章中相關程序的進階.明,請參.表2-1 和表2-2。
Sun Cluster scshutdown(1M) 指令可依序停止叢集服務並將整個叢集關閉。當您要將叢集從某個位置移到另一個位置,或因應用程式錯誤導致資料毀損時,便可能需要這樣做。
請使用 scshutdown,不是 shutdown 或 halt 指令來確保整個叢集正常關機。Solaris shutdown 指令是連同使用 scswitch 指令來關閉個別的節點。請參閱 "2.1.1 如何關閉叢集" 或 "2.2 關閉與啟動單一叢集節點",以取得詳細資訊。
scshutdown 指令以下列方式停止叢集:
使所有執行中的資源群組進入離線狀態。
卸載所有的叢集檔案系統。
關閉作用中的裝置服務。
執行 init 0 並使所有節點回到 OBP ok 提示符號。
如有需要,您可在非叢集模式下啟動節點,如此該節點便不會以叢集成員份參與。這在安裝叢集軟體或執行某些管理程序時,非常有用。請參閱 "2.2.4 如何以非叢集模式啟動叢集節點",以取得詳細資訊。
作業 |
有關資訊請至 ... |
---|---|
停止節點 - 使用 scshutdown | |
以啟動所有節點的方式來啟動叢集。 節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。 | |
關閉並重新啟動叢集 - 使用 scshutdown 在 ok 提示處,請使用 boot 指令個別啟動每個節點。 節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。 |
小心-- 請勿在叢集主控台上使用send brk 來關閉叢集節點。叢集中並不支援此種功能。如果您使用send brk 然 後在ok 提示符號輸入go 來重新啟動,節點會產生混亂的狀況
如果您的叢集正在執行 Oracle Parallel Server (OPS),請關閉所有 OPS 資料庫實例。
請參閱 Oracle Parallel Server 產品文件,以取得關機程序。
成為叢集中任何節點的超級使用者。
立刻關閉叢集為 OBP。
從叢集中的單一節點,輸入下列指令。
# scshutdown -g0 -y |
確認所有節點都顯示 ok 提示符號。
在所有叢集節點都出現 ok 提示符號前,請勿關閉任何節點的電源。
必要的話,關閉節點的的電源。
以下範例顯示先停止叢集正常作業,然後關閉所有節點使其顯示 ok 提示時顯示的主控台輸出。--g 0 選項可將寬限期設成零,-y 可對確認問題自動提供 yes 回應。關機訊息還會顯示在叢集中其他節點的主控台上。
# scshutdown -g0 -y 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. 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 提示符號的節點的叢集,請啟動每一個節點。
如果您在關機期間變更任何配置,請先以最近的配置啟動節點。除此情形外,節點的啟動順序並無影響。
ok boot |
當叢集元件啟動時,訊息會出現在啟動節點的主控台上。
叢集節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。
確認節點啟動成功而且是在線上狀態。
scstat(1M) 指令可報告節點的狀態。
# scstat -n |
如果叢集節點的 /var 檔案系統已滿,Sun Cluster 可能無法在該節點上啟動。如果發生這個問題,請參閱 "2.3.1 如何修復整個 /var 檔案系統"。
以下範例顯示 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 ... |
請執行 scshutdown(1M) 指令來關閉叢集,接著在每一個節點上使用 boot 指令來啟動叢集。
(可選用)。對於正在執行 Oracle Parallel Server (OPS) 的叢集,請關閉所有 OPS 資料庫實例。
請參閱 Oracle Parallel Server 產品文件,以取得關機程序。
成為叢集中任何節點的超級使用者。
關閉叢集為 OBP。
從叢集中的單一節點,輸入下列指令。
# scshutdown -g0 -y |
這樣會關閉每一個節點使其顯示 ok 提示符號。
叢集節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。
啟動每一個節點。
節點的啟動順序沒有任何影響,除非您在兩次關機之間進行變更。在這種情況時,您必須先啟動最後配置的節點。
ok boot |
當叢集元件啟動時,訊息會出現在啟動節點的主控台上。
確認節點啟動成功而且是在線上狀態。
scstat 指令可報告節點的狀態。
# scstat -n |
如果叢集節點的 /var 檔案系統已滿,Sun Cluster 可能無法在該節點上啟動。如果發生這個問題,請參閱 "2.3.1 如何修復整個 /var 檔案系統"。
以下範例顯示先停止叢集正常作業並關閉所有節點使其顯示 ok 提示,然後重新啟動叢集時的主控台輸出。- -g 0 選項可將寬限期設成零,-y 可對確認問題自動提供 <yes 回應。關機訊息還會出現在叢集中其他節點的主控台上。
# scshutdown -g0 -y 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. ... 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: 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 |
請勿在叢集主控台上使用 send brk 來關閉叢集節點。如果您使用 send brk 然後在 ok 提示符號輸入 go 來重新啟動,節點會產生混亂的狀況。叢集中並不支援此種功能。
如果您正在執行 Oracle Parallel Server (OPS),請關閉所有 OPS 資料庫實例。
請參閱 Oracle Parallel Server 產品文件,以取得關機程序。
成為要關機之叢集節點的超級使用者。
將所有的資源群組、資源以及裝置群組,從要關閉的節點切換到其他叢集成員。
在要關機的節點,輸入以下指令。
# scswitch -S -h nodelist |
從指定的節點撤出所有的裝置服務與資源群組。
指定您要用來轉換資源群組及裝置群組的節點。
關閉叢集節點為 OBP。
在要關機的節點上,輸入以下指令。
# shutdown -g0 -y -i0 |
確認叢集節點已經到達 ok 提示。
必要時請關閉節點電源。
以下範例顯示關閉 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.2 如何啟動叢集節點",以重新啟動已經關機的叢集節點。
啟動叢集節點會受到法定數目配置的影響。在二個節點的叢集,您必須配置法定裝置來使叢集的法定總數為三 (一個是給節點而另一個是給法定裝置)。在這個情況下,如果第一個節點關閉,第二個節點會使法定裝置繼續當作單獨的叢集成員執行。要使第一個回到叢集中成為叢集節點,第二個節點必須啟動並執行,且必要的叢集法定總數 (二)必須存在。
若要啟動已經關閉的叢集節點,請啟動節點。
ok boot |
當叢集元件啟動時,訊息會出現在所有節點的主控台上。
叢集節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。
確認節點啟動成功而且在線上。
scstat(1M) 指令可報告節點的狀態。
# scstat -n |
如果叢集節點的 /var 檔案系統已滿,Sun Cluster 可能無法在該節點上啟動。如果發生這個問題,請參閱 "2.3.1 如何修復整個 /var 檔案系統"。
以下範例顯示 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 產品文件,以取得關機程序。
成為要關機之叢集節點的超級使用者。
使用 scswitch 以及 shutdown 指令來關閉叢集節點。
在要關機的節點上,輸入下列指令。-i 6 選項含有 shutdown 指令,可讓節點在關閉成 ok 提示後重新開機。
# scswitch -S -h nodelist # shutdown -g0 -y -i6 |
叢集節點和叢集交互連接之間必須有運轉中的連線,才能夠成為叢集成員。
確認節點啟動成功而且在線上。
# scstat -n |
以下範例顯示關閉 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: |
您還可以非叢集模式啟動節點,使該節點不會參與成為叢集的成員。這在安裝叢集軟體或執行某些管理程序 (如修補節點) 時,非常有用。
在以非叢集模式啟動的叢集上成為超級使用者。
使用 scswitch 和 shutdown 指令來關閉節點。
# scswitch -S -h nodelist # shutdown -g0 -y -i0 |
確認節點顯示在 ok 提示。
使用 boot(1M) 指令以及 -x 選項,以非叢集模式啟動節點。
ok boot -x |
節點的主控台出現的訊息指出,節點不是叢集的一部份。
以下範例顯示 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: |
Solaris 與 Sun Cluster 軟體都是將錯誤訊息寫入 /var/adm/messages 檔,而一段時間後可能會填滿 /var 檔案系統。如果叢集節點的 /var 檔案系統已滿,Sun Cluster 可能無法在該節點上啟動。不僅如此,您還可能無法登入該節點。
如果節點報告整個 /var 檔案系統已滿但仍繼續執行 Sun Cluster 服務,請使用這個程序清除已滿的檔案系統。