將修補程式一次套用至叢集中的一個節點,以保持叢集自身在處理修補程式期間處於作業狀態。使用這個程序,您必須先關閉節點,並使用 boot -sx 或 shutdown -g -y -i0 指令將該節點啟動為單一使用者模式,然後才能套用修補程式。
此程序提供長形式的 Sun Cluster 指令。大多指令也有短的形式。除了指令名稱有長形式和短形式之分外,指令本身是相同的。如需指令及其短形式的清單,請參閱附錄 ASun Cluster 以物件為導向的指令。
在套用修補程式之前,先檢查 Sun Cluster 產品網站有無特殊的安裝前、安裝後相關指示。
成為超級使用者,或在您要套用修補程式的節點上成為提供 solaris.cluster.admin RBAC 授權的角色。
列示要修補之節點上的資源群組與裝置群組。
# clresourcegroup status -n 節點 # cldevicegroup status -n 節點 |
將所有的資源群組、資源及裝置群組從要修補的節點切換到其他叢集成員。
# clnode evacuate -n 節點 |
撤除所有裝置群組和資源群組,包括來自特定節點的所有非全域區域。
指定您要用從中切換資源群組及裝置群組的節點。
關閉節點。
# shutdown -g0 [-y] [-i0] |
以非叢集單一使用者模式啟動節點。
在 SPARC 架構的系統上,執行下列指令:
ok boot -sx |
在 x86 架構的系統上,執行下列指令:
phys-schost# shutdown -g -y -i0 Press any key to continue |
在 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)」。
在啟動參數畫面中,使用方向鍵選取核心項目並鍵入 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. |
將 -sx 增加至指令以指定系統啟動至非叢集模式。
[ 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 |
按 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.- |
鍵入 b 將節點啟動至非叢集模式。
對核心啟動參數指令所做的這個變更不會在系統啟動後持續。下次您重新啟動節點時,將會啟動至叢集模式。若要啟動至非叢集模式,請再一次執行這些步驟來增加 -sx 選項到核心啟動參數指令。
套用軟體或韌體修補程式。
# patchadd -M patch-dir patch-id |
指定修補程式的目錄位置。
指定修補程式的修補程式編號。
務必遵循取代本章敘述之程序的修補程式目錄中的指示。
確認已成功安裝修補程式。
# showrev -p | grep patch-id |
將節點重新啟動為叢集。
# reboot |
確認修補程式可以作業,並且節點與叢集正常作業。
重新啟動所有的節點後,最後一個重新啟動的節點不會使資源群組及裝置群組連線。
# cldevicegroup switch -n 節點 + | 裝置群組 ... # clresourcegroup switch -n 節點[:區域][,...] + | 資源群組 ... |
您正用來切換資源群組及裝置群組的節點名稱。
可控制資源群組的 節點 上的非全域區域名稱。僅在當您建立資源群組時已指定非全域區域的情況下指定區域。
以下範例顯示將將要重新啟動的 Sun Cluster 修補應用程式套用到節點。
# clresourcegroup status -n rg1 ...Resource Group Resource -------------- -------- rg1 rs-2 rg1 rs-3 ... # cldevicegroup status -n nodedg-schost-1 ... Device Group Name: dg-schost-1 ... # clnode evacuate phys-schost-2 # shutdown -g0 -y -i0 ... |
以非叢集單一使用者模式啟動節點。
SPARC:鍵入:
ok boot -sx |
x86:以非叢集單一使用者模式啟動節點。請參閱上述程序中的啟動步驟。
# patchadd -M /var/tmp/patches 234567-05 ... # showrev -p | grep 234567-05 ... # reboot ... # cldevicegroup switch -n phys-schost-1 dg-schost-1 # clresourcegroup switch -n phys-schost-1 schost-sa-1 |
如果需要解除安裝修補程式,請參閱變更 Sun Cluster 修補程式。