JavaScript is required to for searching.
跳过导航链接
退出打印视图
Oracle Solaris Cluster 系统管理指南     Oracle Solaris Cluster 3.3 3/13 (简体中文)
search filter icon
search icon

文档信息

前言

1.  Oracle Solaris Cluster 管理介绍

2.  Oracle Solaris Cluster 和 RBAC

3.  关闭和引导群集

4.  数据复制方法

5.  管理全局设备、磁盘路径监视和群集文件系统

6.  管理法定

7.  管理群集互连和公共网络

8.  添加和删除节点

9.  管理群集

10.  对 CPU 使用控制的配置

11.  修补 Oracle Solaris Cluster 软件和固件

Oracle Solaris Cluster 修补概述

Oracle Solaris Cluster 修补程序技巧

修补 Oracle Solaris Cluster 软件

如何应用重新引导修补程序(节点)

如何应用重新引导修补程序(群集)

如何应用非重新引导 Oracle Solaris Cluster 修补程序

如何以单用户模式对具有故障转移区域的节点应用修补程序

更改 Oracle Solaris Cluster 修补程序

如何删除非重新引导 Oracle Solaris Cluster 修补程序

如何删除重新引导 Oracle Solaris Cluster 修补程序

12.  备份和恢复群集

13.  使用图形用户界面管理 Oracle Solaris Cluster

A.  示例

索引

修补 Oracle Solaris Cluster 软件

表 11-1 任务列表:修补群集

任务
指导
在不停止节点情况下,一次对一个节点应用非重新引导 Oracle Solaris Cluster 修补程序
将群集成员切换到非群集模式后应用重新引导 Oracle Solaris Cluster 修补程序
对具有故障转移区域的节点以单用户模式应用修补程序
删除 Oracle Solaris Cluster 修补程序

如何应用重新引导修补程序(节点)

一次对群集中的一个节点应用修补程序,使群集本身在修补过程中保持运转。使用此过程,您必须先停止群集中的节点,并使用 boot -sxshutdown -g -y -i0 命令将其引导至单用户模式,然后再应用修补程序。

phys-schost# 提示符表示全局群集提示符。此操作过程适用于全局群集。

此过程提供了 Oracle Solaris Cluster 命令的长格式。此外,大多数命令还有短形式。这些命令除了名称长短的不同以外,其功能都是相同的。

  1. 在应用修补程序前,查看 Oracle Solaris Cluster 产品 Web 站点上是否有特殊的安装前或安装后说明。
  2. 在要应用修补程序的节点上,成为超级用户或承担可提供 solaris.cluster.admin RBAC 授权的角色。
  3. 列出要修补的节点上的资源组和设备组。
    # clresourcegroup status -Z all -n node[,...]
    node

    所修补的节点上的全局群集节点或区域群集节点的名称。

    # cldevicegroup status -n node
    node

    所修补的全局群集节点的名称。


    注 - 设备组与区域群集不关联。


  4. 将所有资源组、资源和设备组从要修补的节点切换到其他群集成员。
    # clnode evacuate -n node
    evacuate

    清空所有设备组和资源组,包括所有全局群集非投票节点。

    -n node

    指定从中切换资源组和设备组的节点。

  5. 关闭该节点。
    # shutdown -g0 [-y]
     [-i0]
  6. 以非群集、单用户模式引导节点。
    • 在基于 SPARC 的系统上,运行以下命令。

      ok boot -sx
    • 在基于 x86 的系统上,运行以下命令。

      phys-schost# shutdown -g -y -i0
      
      Press any key to continue
    1. 在 GRUB 菜单中,使用方向键选择适当的 Oracle 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 的引导的更多信息,请参见《Oracle Solaris 管理:基本管理》中的"使用 GRUB 引导基于 x86 的系统(任务列表)"

    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 -sx
    4. 按 Enter 键接受所做更改,并返回到引导参数屏幕。

      屏幕将显示编辑后的命令。

      GNU GRUB version 0.95 (615K lower / 2095552K upper memory)
      +----------------------------------------------------------------------+
      | root (hd0,0,a)                                                       |
      | kernel /platform/i86pc/multiboot -sx                                  |
      | 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 选项添加到内核引导参数命令中。


  7. 应用软件或固件修补程序。
    # patchadd -M patch-dir patch-id
    patch-dir

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

    patch-id

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


    注 - 请始终遵从修补程序目录中的说明,这些说明优先于本章中的过程。


  8. 检验修补程序是否已成功安装。
    # showrev -p | grep patch-id
  9. 将节点重新引导至群集模式。
    # reboot
  10. 检验修补程序是否有效运行,以及节点和群集是否在正常运转。
  11. 对剩余的所有群集节点,重复执行步骤 2步骤 10
  12. 根据需要切换资源组和设备组。

    重新引导所有节点后,在所引导的最后一个节点上,资源组和设备组不会处于联机状态。

    # cldevicegroup switch -n node + | devicegroup ...
    # clresourcegroup switch -n node[:zone][,...] + | resource-group ...
    node

    要将资源组和设备组切换到的节点的名称。

    区域

    可控制该资源组的全局群集非投票节点 (node) 的名称。只有在创建资源组时指定了非投票节点时,才能指定区域。

    # clresourcegroup switch -Z zoneclustername -n zcnode[,...] + | resource-group ...
    zoneclustername

    要将资源组切换到的区域群集的名称。

    zcnode

    可控制该资源组的区域群集节点的名称。


    注 - 设备组与区域群集不关联。


  13. 使用 scversions 命令检验是否需要提交修补程序软件。
    # /usr/cluster/bin/scversions

    您将看到以下结果之一:

    Upgrade commit is needed.
    
    Upgrade commit is NOT needed. All versions match.
  14. 如果需要提交,则提交修补程序软件。
    # scversions -c

    注 - 运行 scversions 会根据具体情况导致一次或多次 CMM 重新配置。


示例 11-1 应用重新引导修补程序(节点)

下列示例显示的是对节点应用重新引导 Oracle Solaris 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
...

以非群集、单用户模式引导节点。

# 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
# scversions
Upgrade commit is needed.
# scversions -c

另请参见

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

如何应用重新引导修补程序(群集)

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

  1. 在应用修补程序前,查看 Oracle Solaris 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 菜单中,使用方向键选择适当的 Oracle 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 的引导的更多信息,请参见《Oracle Solaris 管理:基本管理》中的"使用 GRUB 引导基于 x86 的系统(任务列表)"

    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 -sx
    4. 按 Enter 键接受所做更改,并返回到引导参数屏幕。

      屏幕将显示编辑后的命令。

      GNU GRUB version 0.95 (615K lower / 2095552K upper memory)
      +----------------------------------------------------------------------+
      | root (hd0,0,a)                                                       |
      | kernel /platform/i86pc/multiboot -sx                                  |
      | 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. 检验修补程序是否有效运行,以及节点和群集是否在正常运转。

示例 11-2 应用重新引导修补程序(群集)

下列示例显示的是对群集应用重新引导 Oracle Solaris 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

另请参见

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

如何应用非重新引导 Oracle Solaris Cluster 修补程序

一次对群集中的一个节点应用修补程序。在应用非重新引导修补程序时,不需要先停止正在接收修补程序的节点。

  1. 在应用修补程序前,查看 Oracle Solaris Cluster 产品网页上是否有特殊的安装前或安装后说明。
  2. 对单个节点应用修补程序。
    # patchadd -M patch-dir patch-id
    patch-dir

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

    patch-id

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

  3. 检验修补程序是否已成功安装。
    # showrev -p | grep patch-id
  4. 检验修补程序是否有效运行,以及节点和群集是否在正常运转。
  5. 对剩余的群集节点,重复执行步骤 2步骤 4
  6. 使用 scversions 命令检验是否需要提交修补程序软件。
    # /usr/cluster/bin/scversions

    您将看到以下结果之一:

    Upgrade commit is needed.
    
    Upgrade commit is NOT needed. All versions match.
  7. 如果需要提交,则提交修补程序软件。
    # scversions -c

    注 - 运行 scversions 会根据具体情况导致一次或多次 CMM 重新配置。


示例 11-3 应用非重新引导 Oracle Solaris Cluster 修补程序

# patchadd -M /tmp/patches 234567-05
...
# showrev -p | grep 234567-05
# scversions
Upgrade commit is needed.
# scversions -c

另请参见

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

如何以单用户模式对具有故障转移区域的节点应用修补程序

以单用户模式执行此任务可对具有故障转移区域的节点应用修补程序。如果将采用故障转移配置的 Oracle Solaris Cluster Data Service for Solaris Containers 与 Oracle Solaris Cluster 软件一起使用,则必须采用此修补方法。

  1. 对于包含此过程中手动实施的区域路径的磁盘集,确认没有法定设备配置为此类磁盘集中用作共享存储的 LUN。
    1. 确定包含区域路径的磁盘集中是否使用了法定设备,并确定该法定设备是否使用了 SCSI2 或 SCSI3 预留空间。
      # clquorum show
    2. 如果法定设备位于此类磁盘集的某个 LUN 中,请添加一个新的 LUN 作为法定设备,并使新法定设备不在包含区域路径的任何磁盘集中。
      # clquorum add new-didname
    3. 删除旧的法定设备。
      # clquorum remove old-didname
    4. 如果旧的法定设备使用了 SCSI2 预留空间,请从旧的法定设备中清理掉 SCSI2 预留空间,并确认没有保留任何 SCSI2 预留空间。

      以下命令可查找持久组保留仿真 (PGRE) 密钥。如果磁盘上没有密钥,将显示 errno=22 消息。

      # /usr/cluster/lib/sc/pgre -c pgre_inkeys -d /dev/did/rdsk/dids2

      找到密钥后,将清理 PGRE 密钥。

      # /usr/cluster/lib/sc/pgre -c pgre_scrub -d /dev/did/rdsk/dids2

      注意

      注意 - 如果从磁盘中清理活动法定设备密钥,群集将在下次重新配置时出现紧急情况,并显示 Lost operational quorum 消息。


  2. 清空要修补的节点。
    # clresourcegroup evacuate -n node1
  3. 使包含 HA Solaris Container 资源的一个或多个资源组脱机。
    # clresourcegroup offline resourcegroupname
  4. 禁用已使其脱机的资源组中的所有资源。
    # clresource disable resourcename
  5. 取消管理您使其脱机的资源组。
    # clresourcegroup unmanage resourcegroupname
  6. 使对应的设备组脱机。
    # cldevicegroup offline cldevicegroupname

    注 - 如果要修补的是区域路径具有存储池的故障转移区域,请跳过此步骤和步骤 7


  7. 禁用您使其脱机的设备组
    # cldevicegroup disable devicegroupname
  8. 将被动节点引导出群集。
    # reboot -- -x

    注 - 如果要修补的是区域路径具有存储池的故障转移区域,请使用下列命令。

    # reboot -- -xs

  9. 在继续之前,检验被动节点上的 SMF 启动方法是否已完成。
    # svcs -x

    注 - 如果要修补的是区域路径具有存储池的故障转移区域,请跳过此步骤。


  10. 检验活动节点上的重新配置过程是否已完成。
    # cluster status
  11. 确定磁盘集中的磁盘上是否存在 SCSI-2 预留空间,并释放关键字。按以下说明确定是否存在 SCSI-2 预留空间,然后释放它们。
    • 对于磁盘集中的所有磁盘,运行以下命令:/usr/cluster/lib/sc/scsi -c disfailfast -d /dev/did/rdsk/d#s2

    • 如果列出了关键字,请运行以下命令释放它们:/usr/cluster/lib/sc/scsi -c release -d /dev/did/rdsk/d#s2

    释放完保留关键字后,请跳过步骤 12,继续执行步骤 13。

  12. 确定磁盘集中的磁盘上是否存在任何 SCSI-3 预留空间。
    1. 在磁盘集中的所有磁盘上运行以下命令。
      # /usr/cluster/lib/sc/scsi -c inkeys -d /dev/did/rdsk/didnames2
    2. 如果列出了关键字,请将其清理掉。
      # /usr/cluster/lib/sc/scsi -c scrub -d /dev/did/rdsk/didnames2
  13. 获取被动节点上元集的拥有权。
    # metaset -s disksetname -C take -f

    注 - 如果要修补的是区域路径具有存储池的故障转移区域,请使用下列命令。

    # zpool import -R / pool_name

  14. 在被动节点上挂载包含区域路径的一个或多个文件系统。
    # mount device mountpoint

    注 - 如果要修补的是区域路径具有存储池的故障转移区域,请跳过此步骤和步骤 15


  15. 在被动节点上切换至单用户模式。
    # init s
  16. 停止不在 Oracle Solaris Cluster Data Service for Solaris Container 控制下的所有可能的已引导区域。
    # zoneadm -z zonename halt
  17. 可选如果要安装多个修补程序,出于性能考虑,可以选择以单用户模式引导所有已配置区域。
    # zoneadm -z zonename boot -s
  18. 应用修补程序。
  19. 重新引导节点并等待其所有 SMF 启动方法完成。仅在已重新引导节点后才执行 svcs -a 命令。
    # reboot
    # svcs -a

    第一个节点现在已准备就绪。

  20. 清空要修补的第二个节点。
    # clresourcegroup evacuate -n node2
  21. 对第二个节点重复步骤 8 至 13。
  22. 分离已修补的区域。如果不分离已修补的区域,修补过程将会失败。
    # zoneadm -z zonename detach
  23. 在被动节点上切换至单用户模式。
    # init s
  24. 停止不在 Oracle Solaris Cluster Data Service for Solaris Container 控制下的所有可能的已引导区域。
    # zoneadm -z zonename halt
  25. 可选如果要安装多个修补程序,出于性能考虑,可以选择以单用户模式引导所有已配置区域。
    # zoneadm -z zonename boot -s
  26. 应用修补程序。
  27. 附加已分离的区域。
    # zoneadm -z zonename attach -F
  28. 将该节点重新引导至群集模式。
    # reboot
  29. 使设备组联机。
  30. 启动资源组。
  31. 使用 scversions 命令检验是否需要提交修补程序软件。
    # /usr/cluster/bin/scversions

    您将看到以下结果之一:

    Upgrade commit is needed.
    
    Upgrade commit is NOT needed. All versions match.
  32. 如果需要提交,则提交修补程序软件。
    # scversions -c

    注 - 运行 scversions 会根据具体情况导致一次或多次 CMM 重新配置。


更改 Oracle Solaris Cluster 修补程序

要删除已应用于群集的 Oracle Solaris Cluster 修补程序,必须先删除新的 Oracle Solaris Cluster 修补程序,然后重新应用先前的修补程序或更新版本。要删除新的 Oracle Solaris Cluster 修补程序,请参见以下过程。要重新应用先前的 Oracle Solaris Cluster 修补程序,请参见以下过程之一:


注 - 在应用 Oracle Solaris Cluster 修补程序之前,先阅读此修补程序的 README 文件。


如何删除非重新引导 Oracle Solaris Cluster 修补程序

  1. 成为群集中任一节点上的超级用户。
  2. 删除非重新引导修补程序。
    # patchrm patchid

如何删除重新引导 Oracle Solaris Cluster 修补程序

  1. 成为群集中任一节点上的超级用户。
  2. 将群集节点引导至非群集模式。有关将节点引导至非群集模式的信息,请参见如何以非群集模式引导节点
  3. 删除重新引导修补程序。
    # patchrm patchid
  4. 将群集节点重新引导回群集模式。
    # reboot
  5. 对每个群集节点重复步骤 2 至 4。