Sun Cluster 系统管理指南(适用于 Solaris OS)

Procedure如何应用需重新引导群集的修补程序

执行此过程时,您必须先关闭群集,并使用 boot -sxshtudown -g -y -i0 命令将每个节点引导至单用户模式,然后再应用修补程序。

  1. 在应用修补程序之前,请查看 Sun Cluster 产品 Web 站点中是否有关于安装前或安装后的特殊说明。

  2. 成为群集中任一节点上的超级用户。

  3. 关闭群集。


    # cluster shutdown -y -g grace-period message
    
    -y

    指定在出现确认提示时回答 yes

    -g grace-period

    指定关闭前等待的时间,以秒为单位。默认宽限期为 60 秒。

    message

    指定要广播的警告消息。如果 message 中包含多个词,请使用引号。

  4. 将每个节点引导到非群集单用户模式。

    在每个节点的控制台上,运行以下命令。

    • 在基于 SPARC 的系统中,执行以下命令:


      ok boot -sx
      
    • 在基于 x86 的系统中,执行以下命令:


      phys-schost# shutdown -g -y -i0
      
      Press any key to continue
    1. 在 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》中的第 11  章 “GRUB Based Booting (Tasks)”

    2. 在引导参数屏幕中,使用方向键选择内核条目,然后键入 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.
    3. 向命令中添加 -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
    4. 按 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.-
    5. 键入 b 以将节点引导至非群集模式。


      注 –

      对内核引导参数命令所做的这一更改在系统引导后将失效。下次重新引导节点时,系统将引导至群集模式。如果希望引导至非群集模式,请重新执行上述步骤,将 -sx 选项添加到内核引导参数命令中。


  5. 应用软件或固件的修补程序。

    每次在一个节点上运行以下命令。


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

    指定修补程序的目录位置。

    patch-id

    指定给定修补程序的修补程序号。


    注 –

    每次都要按照修补程序目录中的、可替代本章中的过程的说明操作。


  6. 检验是否已成功地在每个节点上安装了修补程序。


    # showrev -p | grep patch-id
    
  7. 在将修补程序应用到所有节点后,重新将节点引导到群集中。

    在每个节点上运行以下命令。


    # reboot
    
  8. 查看是否需要使用 scversions 命令来升级修补程序软件。


    # /usr/cluster/bin/scversions
    

    您将会看见以下结果之一:


    Upgrade commit is needed.
    
    Upgrade commit is NOT needed. All versions match.
  9. 如果需要升级,请升级修补程序软件。


    # scversions -c
    

    注 –

    运行 scversions 将导致 CMM 进行一次或多次重新配置,这取决于具体情况。


  10. 检验修补程序是否有效,以及该节点和群集是否正常运行。


示例 10–2 应用需重新引导群集的修补程序

以下示例说明将一个需重新引导的 Sun Cluster 修补程序应用到一个群集的过程。


# cluster shutdown -g0 -y
...

将群集引导到非群集单用户模式。


...
# patchadd -M /var/tmp/patches 234567-05
(Apply patch to other cluster nodes)
...
# showrev -p | grep 234567-05
# reboot
# scversions
Upgrade commit is needed.
# scversions -c

另请参见

如果需要取消修补程序,请参见更改 Sun Cluster 修补程序