任务 |
指导 |
---|---|
在不停止节点的情况下,一次将一个非重新引导 Sun Cluster 修补程序应用到一个节点 | |
将群集成员带入非群集模式后应用一个重新引导 Sun Cluster 修补程序 | |
当群集中包含故障转移节点时,以单用户模式应用修补程序 | |
删除 Sun Cluster 修补程序 |
一次仅向群集中的一个节点应用修补程序可使该群集本身在修补过程中保持可操作状态。执行此过程时,您必须先关闭节点,使用 boot -sx 或 shutdown -g -y -i0 命令将节点引导至单用户模式,然后再应用修补程序。
phys-schost# 提示符表示全局群集提示符。此操作过程适用于全局群集。
此过程提供了 Sun Cluster 命令的长格式。此外,大多数命令还有简短格式。这些命令除了名称长短的不同以外,其功能都是相同的。有关命令及其简短格式的列表,请参见附录 B。
在应用修补程序之前,请查看 Sun Cluster 产品 Web 站点中是否有关于安装前或安装后的特殊说明。
在要应用修补程序的节点上,成为超级用户或使用一个可提供 solaris.cluster.admin RBAC 授权的角色。
列出所要修补的节点上的资源组和设备组。
# clresourcegroup status -n node # cldevicegroup status -n node |
将所有资源组、资源和设备组从要修补的节点切换到其他群集成员。
# clnode evacuate -n node |
撤离所有设备组和资源组,包括所有全局群集非投票节点。
指定切换资源组和设备组所在的节点。
关闭该节点。
# 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 的引导的更多信息,请参见《系统管理指南:基本管理》中的“使用 GRUB 引导基于 x86 的系统(任务图)”。
在引导参数屏幕中,使用方向键选择内核条目,然后键入 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 -sx |
按 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.- |
键入 b 将节点引导至非群集模式。
对内核引导参数命令所做的这一更改在系统引导后将失效。下次重新引导节点时,系统将引导至群集模式。如果希望引导至非群集模式,请重新执行上述步骤,将 -sx 选项添加到内核引导参数命令中。
应用软件或固件的修补程序。
# patchadd -M patch-dir patch-id |
指定修补程序的目录位置。
指定给定修补程序的修补程序号。
请始终遵循修补程序目录中的说明进行操作。如果与本章介绍的过程不符,应以修补程序目录中的说明为准。
检验该修补程序是否已成功安装。
# showrev -p | grep patch-id |
重新引导节点,进入群集。
# reboot |
检验修补程序是否有效,以及该节点和群集是否正常运行。
重新引导所有节点后,最后一个重新引导的节点的资源组和设备组不会联机。
# cldevicegroup switch -n node + | devicegroup ... # clresourcegroup switch -n node[:zone][,...] + | resource-group ... |
正在将资源组和设备组切换到的节点的名称。
可控制资源组的全局群集非投票节点 (node) 的名称。只有在创建资源组时指定了非投票节点的情况下,才能指定 zone。
查看是否需要使用 scversions 命令来升级修补程序软件。
# /usr/cluster/bin/scversions |
您将会看见以下结果之一:
Upgrade commit is needed. Upgrade commit is NOT needed. All versions match. |
如果需要升级,请升级修补程序软件。
# scversions -c |
运行 scversions 将导致 CMM 进行一次或多次重新配置,这取决于具体情况。
以下示例说明了将一个需重新引导的 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 # scversions Upgrade commit is needed. # scversions -c |
如果需要取消修补程序,请参见更改 Sun Cluster 修补程序。
执行此过程时,您必须先停止群集,使用 boot -sx 或 shtudown -g -y -i0 命令将每个节点引导至单用户模式,然后再应用修补程序。
在应用修补程序之前,请查看 Sun Cluster 产品 Web 站点中是否有关于安装前或安装后的特殊说明。
成为群集中任一节点上的超级用户。
关闭群集。
# cluster shutdown -y -g grace-period “message” |
指定在出现确认提示时回答 yes。
指定关闭前等待的时间,以秒为单位。默认宽限期为 60 秒。
指定要广播的警告消息。如果 message 中包含多个词,请使用引号。
将每个节点引导到非群集单用户模式。
在每个节点的控制台上,运行以下命令。
在基于 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 的引导的更多信息,请参见《系统管理指南:基本管理》中的“使用 GRUB 引导基于 x86 的系统(任务图)”。
在引导参数屏幕中,使用方向键选择内核条目,然后键入 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 -sx |
按 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.- |
键入 b 将节点引导至非群集模式。
对内核引导参数命令所做的这一更改在系统引导后将失效。下次重新引导节点时,系统将引导至群集模式。如果希望引导至非群集模式,请重新执行上述步骤,将 -sx 选项添加到内核引导参数命令中。
应用软件或固件的修补程序。
每次在一个节点上运行以下命令。
# patchadd -M patch-dir patch-id |
指定修补程序的目录位置。
指定给定修补程序的修补程序号。
每次都要按照修补程序目录中的、可替代本章中的过程的说明操作。
检验是否已成功地在每个节点上安装了修补程序。
# showrev -p | grep patch-id |
在将修补程序应用到所有节点后,重新将节点引导到群集中。
在每个节点上运行以下命令。
# reboot |
查看是否需要使用 scversions 命令来升级修补程序软件。
# /usr/cluster/bin/scversions |
您将会看见以下结果之一:
Upgrade commit is needed. Upgrade commit is NOT needed. All versions match. |
如果需要升级,请升级修补程序软件。
# scversions -c |
运行 scversions 将导致 CMM 进行一次或多次重新配置,这取决于具体情况。
检验修补程序是否有效,以及该节点和群集是否正常运行。
以下示例说明将一个需重新引导的 Sun Cluster 修补程序应用到一个群集的过程。
# cluster shutdown -g0 -y ... |
将群集引导到非群集单用户模式。
SPARC:键入以下内容:
ok boot -sx |
x86:将每个节点引导到非群集单用户模式下。参见上述过程以了解相关步骤。
... # 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 修补程序。
每次仅向群集中的一个节点应用修补程序。在应用不需要重新引导的修补程序时,您无需先关闭要接收该修补程序的节点。
在应用修补程序之前,请查看 Sun Cluster 产品 Web 页中是否有关于安装前或安装后的特殊说明。
在单个节点上应用修补程序。
# patchadd -M patch-dir patch-id |
指定修补程序的目录位置。
指定给定修补程序的修补程序号。
检验该修补程序是否已成功安装。
# showrev -p | grep patch-id |
检验修补程序是否有效,以及该节点和群集是否正常运行。
查看是否需要使用 scversions 命令来升级修补程序软件。
# /usr/cluster/bin/scversions |
您将会看见以下结果之一:
Upgrade commit is needed. Upgrade commit is NOT needed. All versions match. |
如果需要升级,请升级修补程序软件。
# scversions -c |
运行 scversions 将导致 CMM 进行一次或多次重新配置,这取决于具体情况。
# patchadd -M /tmp/patches 234567-05 ... # showrev -p | grep 234567-05 # scversions Upgrade commit is needed. # scversions -c |
如果需要取消修补程序,请参见更改 Sun Cluster 修补程序。
可通过执行此任务来以单用户模式对故障转移节点应用 修补程序。如果要将故障转移配置中的 Sun Cluster Data Service for Solaris Containers 与 Sun Cluster 软件一起使用,就需要采用这种修补方法。
确认并没有为任何一个用作磁盘集(包含此过程中手动实施的区域路径)共享存储的 LUN 配置法定设备。
确定包含区域路径的磁盘集中是否使用了法定设备,并确定法定设备是否使用了 SCSI2 或 SCSI3 预留空间。
# clquorum show |
如果法定设备位于磁盘集的某个 LUN 中,请添加一个新的 LUN 作为法定设备,并且不要让这个新的法定设备成为包含区域路径的任何磁盘集的一部分。
# clquorum add new-didname |
删除旧的法定设备。
# clquorum remove old-didname |
如果旧的法定设备使用了 SCSI2 预留空间,请从旧的法定设备中清除 SCSI2 预留空间,然后确认没有遗留下任何 SCSI2 预留空间。
# /usr/cluster/lib/sc/pgre -c pgre_scrub -d /dev/did/rdsk/old-didnames2 # /usr/cluster/lib/sc/pgre -c pgre_inkeys -d /dev/did/rdsk/old-didnames2 |
如果无意中清除了活动法定设备上的保留关键字,则必须删除并重新添加法定设备,以便将新的保留关键字放置到法定设备上。
撤出要修补的节点。
# clresourcegroup evacuate -n node1 |
使包含 HA Solaris Container 资源的一个或多个资源组脱机。
# clresourcegroup offline resourcegroupname |
禁用已脱机的资源组中的所有资源。
# clresource disable resourcename |
取消对已脱机的资源组的管理。
# clresourcegroup unmanage resourcegroupname |
使相应的一个或多个设备组脱机。
# cldevicegroup offline cldevicegroupname |
禁用已脱机的设备组。
# cldevicegroup disable devicegroupname |
将非活动节点引导出群集。
# reboot -- -x |
继续执行操作之前,检验非活动节点上的所有 SMF 启动方法是否均已完成。
# svcs -x |
检验活动节点上的各种重新配置进程是否均已完成。
# cluster status |
确定磁盘集中的磁盘上是否存在 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。
确定磁盘集中的磁盘上是否有 SCSI-3 保留项。
获取非活动节点上元集的所有权。
# metaset -s disksetname -C take -f |
在非活动节点上挂载包含区域路径的一个或多个文件系统。
# mount device mountpoint |
在非活动节点上切换到单用户模式。
# init s |
停止所有可能已引导且不在 Sun Cluster Data Service for Solaris Container 控制下的区域。
# zoneadm -z zonename halt |
(可选的)如果要安装多个修补程序,出于性能考虑,您可以选择以单用户模式引导所有已配置的区域。
# zoneadm -z zonename boot -s |
应用修补程序。
重新引导节点,等待所有 SMF 启动方法完成。只有在节点重新引导完毕之后,才能执行 svcs -a 命令。
# reboot |
# svcs -a |
第一个节点现已准备就绪。
撤出要修补的第二个节点。
# clresourcegroup evacuate -n node2 |
对第二个节点重复执行步骤 8 至步骤 13。
拆离已经过修补的区域,以加快修补过程。
# zoneadm -z zonename detach |
在非活动节点上切换到单用户模式。
# init s |
停止所有可能已引导且不在 Sun Cluster Data Service for Solaris Container 控制下的区域。
# zoneadm -z zonename halt |
(可选的)如果要安装多个修补程序,出于性能考虑,您可以选择以单用户模式引导所有已配置的区域。
# zoneadm -z zonename boot -s |
应用修补程序。
连接被拆离的区域。
# zoneadm -z zonename attach -F |
将节点重新引导至群集模式。
# reboot |
使一个或多个设备组联机。
启动资源组。
查看是否需要使用 scversions 命令来升级修补程序软件。
# /usr/cluster/bin/scversions |
您将会看见以下结果之一:
Upgrade commit is needed. Upgrade commit is NOT needed. All versions match. |
如果需要升级,请升级修补程序软件。
# scversions -c |
运行 scversions 将导致 CMM 进行一次或多次重新配置,这取决于具体情况。
要删除已应用到群集中的 Sun Cluster 修补程序,必须先删除新的 Sun Cluster 修补程序,然后重新应用以前的修补程序或更新版本。要删除新的 Sun Cluster 修补程序,请参见以下过程。要重新应用以前的 Sun Cluster 修补程序,请参见以下过程之一:
应用某个 Sun Cluster 修补程序之前,请先阅读该修补程序的 README 文件。
成为群集中任一节点上的超级用户。
将群集节点引导至非群集模式。有关将节点引导至非群集模式的信息,请参见如何以非群集模式引导节点。
删除需重新引导的修补程序。
# patchrm patchid |
将群集节点重新引导回群集模式。
# reboot |
对每个群集节点重复执行步骤 2 到 4。