Oracle® Solaris Cluster 系统管理指南

退出打印视图

更新时间: 2015 年 10 月
 
 

如何验证基本群集配置

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 命令,以显示进度信息。


注 -  在执行可能导致设备、卷管理组件或 Oracle Solaris Cluster 的配置发生更改的管理过程之后,应运行 cluster check

在全局群集节点上运行 clzonecluster(1CL) 命令时,会运行一组检查,以验证区域群集正常工作所需的配置。如果所有检查都通过,clzonecluster verify 将返回到 shell 提示符,您可以放心地安装该区域群集。如果某项检查失败,则 clzonecluster verify 将报告检验失败的全局群集节点。如果对多个节点运行 clzonecluster verify,将针对每个节点和多个节点的检查分别生成一个报告。不允许在区域群集内部运行 verify 子命令。

  1. 在全局群集的某个活动成员节点上承担 root 角色。
    phys-schost# su

    从全局群集的节点执行此过程中的所有步骤。

  2. 确保您具有最新的检查。
    1. 转到 My Oracle Support 的 "Patches & Updates"(修补程序和更新)选项卡。
    2. 在 "Advanced Search"(高级搜索)中,选择 Solaris Cluster 作为 "Product"(产品),并在 "Description"(描述)字段中键入 check

      该搜索查找包含检查的 Oracle Solaris Cluster 软件更新。

    3. 应用任何尚未安装在群集上的软件更新。
  3. 运行基本验证检查。
    phys-schost# cluster check -v -o outputdir
    –v

    详细模式

    –o outputdir

    将输出重定向到 outputdir 子目录。

    该命令会运行所有可用的基本检查。不会影响任何群集功能。

  4. 运行交互式验证检查。
    phys-schost# cluster check -v -k interactive -o outputdir
    –k interactive

    指定运行交互式验证检查。

    该命令会运行所有可用的交互式检查并提示您提供所需的群集相关信息。不会影响任何群集功能。

  5. 运行功能验证检查。
    1. 以非详细模式列出所有可用的功能检查。
      phys-schost# cluster list-checks -k functional
    2. 确定哪些功能检查执行的操作会干扰生产环境中的群集可用性或服务。

      例如,功能检查可能会引起节点出现紧急情况或故障转移到其他节点。

      phys-schost# cluster list-checks -v -C check-ID
      –C check-ID

      指定特定检查。

    3. 如果要执行的功能检查可能会中断群集的正常工作,请确保群集不在生产环境中。
    4. 启动功能检查。
      phys-schost# cluster check -v -k functional -C check-ID -o outputdir
      –k functional

      指定运行功能验证检查。

      响应来自检查的提示,确认应运行该检查以及必须执行的任何信息或操作。

    5. 对于要运行的其余每个功能检查,重复执行步骤 c 和步骤 d。

      注 -  为了进行记录,请为所运行的每个检查指定唯一 outputdir 子目录名称。如果重用 outputdir 名称,则新检查的输出将覆盖重用的 outputdir 子目录的现有内容。
  6. 如果配置了区域群集,请检验区域群集的配置以了解是否可以安装区域群集。
    phys-schost# clzonecluster verify zoneclustername
  7. 记录群集配置以供将来诊断使用。

    请参见Oracle Solaris Cluster 软件安装指南 中的如何记录群集配置的诊断数据

示例 1-7  检查全局群集配置并且所有基本检查均通过

以下示例显示了针对节点 phys-schost-1phys-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 

使群集脱离生产环境

# 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 <<<

请按照屏幕上的说明进行操作
示例 1-10  检查全局群集配置并且某项检查未通过

以下示例显示,群集 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.
...
#