Sun Cluster 系統管理指南(適用於 Solaris 作業系統)

Procedure如何套用要重新啟動的修補程式 (節點)

將修補程式一次套用至叢集中的一個節點,以保持叢集自身在處理修補程式期間處於作業狀態。使用這個程序,您必須先關閉節點,並使用 boot -sxb -sx 指令,以單用戶模式啟動該節點,然後才能套用修補程式。

步驟
  1. 在套用修補程式之前,先檢查 Sun Cluster 產品網頁有無特殊的安裝前、安裝後相關指示。

  2. 在您要套用修補程式的節點上成為超級使用者。

  3. 列示要修補之節點上的資源群組與裝置群組。


    # scrgadm -pv
    # scstat
    
  4. 將所有的資源群組、資源及裝置群組從要修補的節點切換到其他叢集成員。


     # scswitch -S -h node[,...]
    
    -S

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

    -h node[,...]

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

  5. 關閉節點。


    # shutdown -g0 [-y]
     [-i0]
  6. 以非叢集單一使用者模式啟動節點。

    • SPARC:


      ok boot -sx
      
    • x86:


                            <<< Current Boot Parameters >>>
      Boot path: /pci@0,0/pci8086,2545@3/pci8086,1460@1d/pci8086,341a@7,1/
      sd@0,0:a
      Boot args:
      
      Type    b [file-name] [boot-flags] <ENTER>  to boot with options
      or      i <ENTER>                           to enter boot interpreter
      or      <ENTER>                             to boot with defaults
      
                        <<< timeout in 5 seconds >>>
      Select (b)oot or (i)nterpreter: b -sx
      
  7. 套用修補程式。


    # patchadd -M patch-dir patch-id
    
    patch-dir

    指定修補程式的目錄位置。

    patch-id

    指定修補程式的修補程式編號。


    備註 –

    務必遵循取代本章敘述之程序的修補程式目錄中的指示。


  8. 確認已成功安裝修補程式。


    # showrev -p | grep patch-id
    
  9. 將節點重新啟動為叢集。


    # reboot
    
  10. 確認修補程式可以作業,並且節點與叢集正常作業。

  11. 對於其餘的所有叢集節點,重複執行步驟 2步驟 10

  12. 在需要時可切換資源群組、資源及裝置群組。

    重新啟動所有的節點後,最後一個重新啟動的節點不會使資源群組及裝置群組連線。


    # scswitch -z -D  device-group[,...]
    -h node[,...]
    # scswitch -z -g  resource-group[,...]
    -h nod[,...]e
    
    -z

    指定對主要資源群組或裝置群組所做的變更。

    -h node[,...]

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

    -D

    將指定的裝置群組切換至 -h 選項所識別的節點上。

    -g

    將指定的資源群組切換至 -h 選項所識別的節點上。如果未指定 -h,資源群組將會離線。

  13. 使用 scversions 指令檢查是否需要確定修補程式軟體。


    # /usr/cluster/bin/scversions 
    

    您將看到以下結果之一:


    Upgrade commit is needed.
    
    Upgrade commit is NOT needed. All versions match.
  14. 如果需要確定,請確定該修補程式軟體。


    #/usr/cluster/bin/scversions -c
    

    -c 選項可以使叢集確定並執行新修補的軟體。


    備註 –

    根據情況,執行 scversions(1m) 將導致一次或多次 CMM 重新配置。



範例 8–1 安裝需要重新啟動的修補程式 (節點)

以下範例顯示將將要重新啟動的 Sun Cluster 修補應用程式套用到節點。


# scrgadm -pv
...
RG Name: schost-sa-1
...
# scstat
...
Device Group Name:											dg-schost-1
...
# scswitch -S -h phys-schost-2
# shutdown -g0 -y -i0
...

以非叢集單一使用者模式啟動節點。


# patchadd -M /var/tmp/patches 234567-05
...
# showrev -p | grep 234567-05

...
# reboot
...
# scswitch -z -D dg-schost-1 -h phys-schost-1
# scswitch -z -g schost-sa-1 -h phys-schost-1
# scversions
Upgrade commit is needed.
# scversions -c

另請參閱

如果需要解除安裝修補程式,請參閱如何移除 Sun Cluster 修補程式