cluster 命令使用 check 子命令验证全局群集正常工作所需的基本配置。如果所有检查均未失败,cluster check 将返回到 shell 提示符。如果某项检查失败,cluster check 将在指定的输出目录或默认输出目录中生成报告。如果对多个节点运行 cluster check,则 cluster check 将为每个节点生成一个报告并为多节点检查生成一个报告。也可使用 cluster list-checks 命令显示所有可用群集检查的列表。
除不需要用户交互即可运行的基本检查之外,该命令还可以运行交互式检查和功能检查。未指定 –k keyword 选项时将运行基本检查。
交互式检查需要从用户获取检查无法确定的信息。该检查会提示用户提供所需的信息,例如,固件版本号。使用 –k interactive 关键字可指定一个或多个交互式检查。
功能检查执行群集的特定功能或行为。该检查会提示用户输入信息(例如,要故障转移到的节点)以及确认是否开始或继续检查。使用 –k functional check-id 关键字指定功能检查。一次只能执行一项功能检查。
% cluster list-checks -v -C checkID
可在详细模式下运行带有 –v 标志的 cluster check 命令,以显示进度信息。
在全局群集节点上运行 clzonecluster(1CL) 命令时,会运行一组检查,以验证区域群集正常工作所需的配置。如果所有检查都通过,clzonecluster verify 将返回到 shell 提示符,您可以放心地安装该区域群集。如果某项检查失败,则 clzonecluster verify 将报告检验失败的全局群集节点。如果对多个节点运行 clzonecluster verify,将针对每个节点和多个节点的检查分别生成一个报告。不允许在区域群集内部运行 verify 子命令。
phys-schost# su
从全局群集的节点执行此过程中的所有步骤。
该搜索查找包含检查的 Oracle Solaris Cluster 软件更新。
phys-schost# cluster check -v -o outputdir
详细模式
将输出重定向到 outputdir 子目录。
该命令会运行所有可用的基本检查。不会影响任何群集功能。
phys-schost# cluster check -v -k interactive -o outputdir
指定运行交互式验证检查。
该命令会运行所有可用的交互式检查并提示您提供所需的群集相关信息。不会影响任何群集功能。
phys-schost# cluster list-checks -k functional
例如,功能检查可能会引起节点出现紧急情况或故障转移到其他节点。
phys-schost# cluster list-checks -v -C check-ID
指定特定检查。
phys-schost# cluster check -v -k functional -C check-ID -o outputdir
指定运行功能验证检查。
响应来自检查的提示,确认应运行该检查以及必须执行的任何信息或操作。
phys-schost# clzonecluster verify zoneclustername
以下示例显示了针对节点 phys-schost-1 和 phys-schost-2 在详细模式下运行的 cluster check,其中节点通过了所有检查。
phys-schost# cluster check -v -h phys-schost-1, phys-schost-2 cluster check: Requesting explorer data and node report from phys-schost-1. cluster check: Requesting explorer data and node report from phys-schost-2. cluster check: phys-schost-1: Explorer finished. cluster check: phys-schost-1: Starting single-node checks. cluster check: phys-schost-1: Single-node checks finished. cluster check: phys-schost-2: Explorer finished. cluster check: phys-schost-2: Starting single-node checks. cluster check: phys-schost-2: Single-node checks finished. cluster check: Starting multi-node checks. cluster check: Multi-node checks finished示例 1-8 列出交互式验证检查
以下示例列出了可用于在群集上运行的所有交互式检查。示例输出显示了可能的检查样例;实际的可用检查因各配置而异。
# cluster list-checks -k interactive Some checks might take a few moments to run (use -v to see progress)... I6994574 : (Moderate) Fix for GLDv3 interfaces on cluster transport vulnerability applied?示例 1-9 运行功能验证检查
以下示例首先显示了功能检查的详细列表。随后列出了检查 F6968101 的详细描述,指出该检查会中断群集服务。群集将脱离生产环境。然后将运行功能检查,且详细输出会记录到 funct.test.F6968101.12Jan2011 子目录中。示例输出显示了可能的检查样例;实际的可用检查因各配置而异。
# cluster list-checks -k functional F6968101 : (Critical) Perform resource group switchover F6984120 : (Critical) Induce cluster transport network failure - single adapter. F6984121 : (Critical) Perform cluster shutdown F6984140 : (Critical) Induce node panic # cluster list-checks -v -C F6968101 F6968101: (Critical) Perform resource group switchover Keywords: SolarisCluster3.x, functional Applicability: Applicable if multi-node cluster running live. Check Logic: Select a resource group and destination node. Perform '/usr/cluster/bin/clresourcegroup switch' on specified resource group either to specified node or to all nodes in succession. Version: 1.2 Revision Date: 12/10/10示例 1-10 检查全局群集配置并且某项检查未通过使群集脱离生产环境 # cluster list-checks -k functional -C F6968101 -o funct.test.F6968101.12Jan2011 F6968101 initializing... initializing xml output... loading auxiliary data... starting check run... pschost1, pschost2, pschost3, pschost4: F6968101.... starting: Perform resource group switchover ============================================================ >>> Functional Check 'Functional' checks exercise cluster behavior. It is recommended that you do not run this check on a cluster in production mode.' It is recommended that you have access to the system console for each cluster node and observe any output on the consoles while the check is executed. If the node running this check is brought down during execution the check must be rerun from this same node after it is rebooted into the cluster in order for the check to be completed. Select 'continue' for more details on this check. 1) continue 2) exit choice: l ============================================================ >>> Check Description <<<请按照屏幕上的说明进行操作
以下示例显示,群集 suncluster 中的节点 phys-schost-2 缺少挂载点 /global/phys-schost-1。将在输出目录 /var/cluster/logs/cluster_check/<timestamp> 中创建报告。
phys-schost# cluster check -v -h phys-schost-1, phys-schost-2 -o /var/cluster/logs/cluster_check/Dec5/ cluster check: Requesting explorer data and node report from phys-schost-1. cluster check: Requesting explorer data and node report from phys-schost-2. cluster check: phys-schost-1: Explorer finished. cluster check: phys-schost-1: Starting single-node checks. cluster check: phys-schost-1: Single-node checks finished. cluster check: phys-schost-2: Explorer finished. cluster check: phys-schost-2: Starting single-node checks. cluster check: phys-schost-2: Single-node checks finished. cluster check: Starting multi-node checks. cluster check: Multi-node checks finished. cluster check: One or more checks failed. cluster check: The greatest severity of all check failures was 3 (HIGH). cluster check: Reports are in /var/cluster/logs/cluster_check/<Dec5>. # # cat /var/cluster/logs/cluster_check/Dec5/cluster_check-results.suncluster.txt ... =================================================== = ANALYSIS DETAILS = =================================================== ------------------------------------ CHECK ID : 3065 SEVERITY : HIGH FAILURE : Global filesystem /etc/vfstab entries are not consistent across all Oracle Solaris Cluster 4.x nodes. ANALYSIS : The global filesystem /etc/vfstab entries are not consistent across all nodes in this cluster. Analysis indicates: FileSystem '/global/phys-schost-1' is on 'phys-schost-1' but missing from 'phys-schost-2'. RECOMMEND: Ensure each node has the correct /etc/vfstab entry for the filesystem(s) in question. ... #