表 1–1 提供了有关群集管理的入门知识。
表 1–1 Sun Cluster 3.2 管理工具
任务 |
工具 |
指导 |
---|---|---|
远程登录群集 |
使用 ccp 命令来启动群集控制面板 (CCP)。接着,选择以下图标之一:cconsolecrlogin、cssh 或 ctelnet。 | |
以交互方式配置群集 |
启动 clsetup(1CL) 实用程序。 | |
显示 Sun Cluster 发行版本号和版本信息 |
将 clnode(1CL) 命令与 show-rev --v -node 子命令和选项配合使用。 | |
显示已安装的资源、资源组和资源类型 |
使用以下命令显示资源信息: | |
以图形方式监视群集组件 |
使用 Sun Cluster Manager。 |
参见联机帮助 |
以图形方式管理某些群集组件 |
使用 Sun Cluster Manager 或 Sun Management Center 的 Sun Cluster 模块(Sun Management Center 仅可在基于 SPARC 系统上与 Sun Cluster 一起使用)。 |
有关 Sun Cluster Manager 的信息,请参见联机帮助 有关 Sun Management Center 的信息,请参见 Sun Management Center 相关文档 |
检查群集组件状态 |
使用 cluster(1CL) 命令和 status 子命令。 | |
检查公共网络上 IP 网络多路径 (IPMP) 组的状态 |
使用 clnode(1CL) status 命令和 -m 选项。 | |
查看群集配置 |
使用 cluster(1CL) 命令和 show 子命令。 | |
检查全局挂载点 |
使用 sccheck(1M) 命令。 | |
查看 Sun Cluster 命令日志的内容 |
检查 /var/cluster/logs/commandlog 文件。 | |
查看 Sun Cluster 系统消息 |
检查 /var/adm/messages 文件。 |
《System Administration Guide: Advanced Administration》中的“Viewing System Messages” |
监视 Solstice DiskSuite 的状态 |
使用 metastat 命令。 |
Solaris Volume Manager文档 |
在运行 Solaris 9 或 Solaris 10 时监视 Solaris Volume Manager 的状态 |
使用 metastat 命令。 |
群集控制面板 (Cluster Control Panel, CCP) 可作为 cconsole、 crlogin、 cssh 和 ctelnet 工具的启动板。所有工具均会启动一个多窗口连接以连接到一组指定的节点。这个多窗口连接由指定的每个节点的主窗口和一个公共窗口组成。输入到公共窗口中的信息会被发送到每一个主窗口,从而可在群集的所有节点上同时运行命令。
您还可以从命令行启动 cconsole、crlogin、cssh 或 ctelnet 会话。
默认情况下,cconsole 实用程序会通过 telnet 连接到节点控制台。要与控制台建立安全的 Shell 连接,请在 cconsole 窗口的 "Options"(选项)菜单中选中 "Use SSH"(使用 SSH)复选框。或者,在执行 ccp 或 cconsole 命令时指定 -s 选项。
有关更多信息,请参见 ccp(1M) 和 cconsole(1M) 手册页。
此过程提供了 Sun Cluster 命令的长格式。此外,大多数命令还有简短格式。这些命令除了名称长短的不同以外,其功能都是相同的。有关命令及其简短格式的列表,请参见附录 A,Sun Cluster 面向对象的命令。
启动 CCP 前,请验证是否满足以下前提条件:
在管理控制台上安装 SUNWccon 软件包。
确保管理控制台上的 PATH 变量包含 Sun Cluster 工具目录:/opt/SUNWcluster/bin 和 /usr/cluster/bin。可以通过设置 $CLUSTER_HOME 环境变量为工具目录另指定一个位置。
如果使用终端集中器,请配置 clusters 文件、serialports 文件和 nsswitch.conf 文件。这些文件既可以是 /etc 文件,也可以是 NIS 或 NIS+ 数据库。有关更多信息,请参见 clusters(4) 和 serialports(4) 手册页。
如果您使用的是 Sun Enterprise 10000 服务器平台,请登录系统服务处理器 (System Service Processor, SSP)。
从管理控制台启动 CCP 启动板。
# ccp clustername |
显示 CCP 启动板。
要启动与群集的远程会话,请单击 CCP 启动板中的 cconsole、crlogin、cssh 或 ctelnet 图标。
执行以下操作过程可与群集节点控制台建立安全的 Shell 连接。
如果您使用了终端集中器,请配置 clusters 文件、serialports 文件和 nsswitch.conf 文件。这些文件既可以是 /etc 文件,也可以是 NIS 或 NIS+ 数据库。
在 serialports 文件中,请使用可用来与每个控制台访问设备建立安全连接的端口号。用于安全 Shell 连接的默认端口号是 22。
有关更多信息,请参见 clusters(4) 和 serialports(4) 手册页。
成为管理控制台上的超级用户。
使用安全模式启动 cconsole 实用程序。
# cconsole -s [-l username] [-p ssh-port] |
启用安全 shell 连接。
指定用于远程连接的用户名。如果未指定 -l 选项,系统会使用启动 cconsole 实用程序的用户名。
指定要使用的安全 Shell 端口号。如果未指定 -p 选项,系统会使用默认端口号 22 进行安全连接。
clsetup(1CL) 实用程序供您用来以交互方式为群集配置法定、资源组、群集传输、专用主机名、设备组和新节点选项。
此过程提供了 Sun Cluster 命令的长格式。此外,大多数命令还有简短格式。这些命令除了名称长短的不同以外,其功能都是相同的。有关命令及其简短格式的列表,请参见附录 A,Sun Cluster 面向对象的命令。
有关更多信息,请参见 clsetup 联机帮助。
此过程提供了 Sun Cluster 命令的长格式。此外,大多数命令还有简短格式。这些命令除了名称长短的不同以外,其功能都是相同的。有关命令及其简短格式的列表,请参见附录 A,Sun Cluster 面向对象的命令。
以下示例显示了有关修补程序 110648-05 的信息。
# showrev -p | grep 110648 Patch: 110648-05 Obsoletes: Requires: Incompatibles: Packages: |
此过程提供了 Sun Cluster 命令的长格式。此外,大多数命令还有简短格式。这些命令除了名称长短的不同以外,其功能都是相同的。有关命令及其简短格式的列表,请参见附录 A,Sun Cluster 面向对象的命令。
显示 Sun Cluster 发行版本信息和版本信息:
# clnode show-rev -v -node |
该命令显示了 Sun Cluster 的发行版本号和所有 Sun Cluster 软件包的版本字符串。
以下示例显示了群集的发行版本信息和所有软件包的版本信息。
# clnode show-rev 3.2 #% clnode show-rev -v Sun Cluster 3.2 for Solaris 9 sparc SUNWscr: 3.2.0,REV=2006.02.17.18.11 SUNWscu: 3.2.0,REV=2006.02.17.18.11 SUNWsczu: 3.2.0,REV=2006.02.17.18.11 SUNWscsck: 3.2.0,REV=2006.02.17.18.11 SUNWscnm: 3.2.0,REV=2006.02.17.18.11 SUNWscdev: 3.2.0,REV=2006.02.17.18.11 SUNWscgds: 3.2.0,REV=2006.02.17.18.11 SUNWscman: 3.2.0,REV=2005.10.18.08.42 SUNWscsal: 3.2.0,REV=2006.02.17.18.11 SUNWscsam: 3.2.0,REV=2006.02.17.18.11 SUNWscvm: 3.2.0,REV=2006.02.17.18.11 SUNWmdm: 3.2.0,REV=2006.02.17.18.11 SUNWscmasa: 3.2.0,REV=2006.02.17.18.11 SUNWscmautil: 3.2.0,REV=2006.02.17.18.11 SUNWscmautilr: 3.2.0,REV=2006.02.17.18.11 SUNWjfreechart: 3.2.0,REV=2006.02.17.18.11 SUNWscva: 3.2.0,REV=2006.02.17.18.11 SUNWscspm: 3.2.0,REV=2006.02.17.18.11 SUNWscspmu: 3.2.0,REV=2006.02.17.18.11 SUNWscspmr: 3.2.0,REV=2006.02.17.18.11 SUNWscderby: 3.2.0,REV=2006.02.17.18.11 SUNWsctelemetry: 3.2.0,REV=2006.02.17.18.11 SUNWscrsm: 3.2.0,REV=2006.02.17.18.11 SUNWcsc: 3.2.0,REV=2006.02.21.10.16 SUNWcscspm: 3.2.0,REV=2006.02.21.10.16 SUNWcscspmu: 3.2.0,REV=2006.02.21.10.16 SUNWdsc: 3.2.0,REV=2006.02.21.10.09 SUNWdscspm: 3.2.0,REV=2006.02.21.10.09 SUNWdscspmu: 3.2.0,REV=2006.02.21.10.09 SUNWesc: 3.2.0,REV=2006.02.21.10.11 SUNWescspm: 3.2.0,REV=2006.02.21.10.11 SUNWescspmu: 3.2.0,REV=2006.02.21.10.11 SUNWfsc: 3.2.0,REV=2006.02.21.10.06 SUNWfscspm: 3.2.0,REV=2006.02.21.10.06 SUNWfscspmu: 3.2.0,REV=2006.02.21.10.06 SUNWhsc: 3.2.0,REV=2006.02.21.10.20 SUNWhscspm: 3.2.0,REV=2006.02.21.10.20 SUNWhscspmu: 3.2.0,REV=2006.02.21.10.20 SUNWjsc: 3.2.0,REV=2006.02.21.10.22 SUNWjscman: 3.2.0,REV=2006.02.21.10.22 SUNWjscspm: 3.2.0,REV=2006.02.21.10.22 SUNWjscspmu: 3.2.0,REV=2006.02.21.10.22 SUNWksc: 3.2.0,REV=2006.02.21.10.14 SUNWkscspm: 3.2.0,REV=2006.02.21.10.14 SUNWkscspmu: 3.2.0,REV=2006.02.21.10.14 |
您还可以使用 Sun Cluster Manager GUI 来完成此过程。有关更多信息,请参阅第 12 章,使用图形用户界面管理 Sun Cluster 或 Sun Cluster Manager 联机帮助。
此过程提供了 Sun Cluster 命令的长格式。此外,大多数命令还有简短格式。这些命令除了名称长短的不同以外,其功能都是相同的。有关命令及其简短格式的列表,请参见附录 A,Sun Cluster 面向对象的命令。
超级用户以外的用户需要具有 solaris.cluster.read RBAC 授权才能使用该子命令。
显示群集的已配置资源类型、资源组和资源。
% cluster show -t resource,resourcetype,resourcegroup |
要获取各个资源、资源组和资源类型的信息,请将 show 子命令用于以下命令之一:
resource
resource group
resourcetype
以下示例显示了为群集 schost 配置的资源类型 (RT Name)、资源组 (RG Name) 和资源 (RS Name)。
% cluster show -t resource,resourcetype,resourcegroup === Registered Resource Types === Resource Type: SUNW.qfs RT_description: SAM-QFS Agent on SunCluster RT_version: 3.1 API_version: 3 RT_basedir: /opt/SUNWsamfs/sc/bin Single_instance: False Proxy: False Init_nodes: All potential masters Installed_nodes: <All> Failover: True Pkglist: <NULL> RT_system: False === Resource Groups and Resources === Resource Group: qfs-rg RG_description: <NULL> RG_mode: Failover RG_state: Managed Failback: False Nodelist: phys-schost-2 phys-schost-1 --- Resources for Group qfs-rg --- Resource: qfs-res Type: SUNW.qfs Type_version: 3.1 Group: qfs-rg R_description: Resource_project_name: default Enabled{phys-schost-2}: True Enabled{phys-schost-1}: True Monitored{phys-schost-2}: True Monitored{phys-schost-1}: True |
您还可以使用 Sun Cluster Manager GUI 来完成此过程。有关详细信息,请参见 Sun Cluster Manager 联机帮助。
此过程提供了 Sun Cluster 命令的长格式。此外,大多数命令还有简短格式。这些命令除了名称长短的不同以外,其功能都是相同的。有关命令及其简短格式的列表,请参见附录 A,Sun Cluster 面向对象的命令。
超级用户以外的用户需要具有 solaris.cluster.read RBAC 授权才能使用 status 子命令。
以下示例提供了一个由 cluster(1CL) status 命令所返回的群集组件状态信息的样例。
% cluster status === Cluster Nodes === --- Node Status --- Node Name Status --------- ------ phys-schost-1 Online phys-schost-2 Online === Cluster Transport Paths === Endpoint1 Endpoint2 Status --------- --------- ------ phys-schost-1:qfe1 phys-schost-4:qfe1 Path online phys-schost-1:hme1 phys-schost-4:hme1 Path online === Cluster Quorum === --- Quorum Votes Summary --- Needed Present Possible ------ ------- -------- 3 3 4 --- Quorum Votes by Node --- Node Name Present Possible Status --------- ------- -------- ------ phys-schost-1 1 1 Online phys-schost-2 1 1 Online --- Quorum Votes by Device --- Device Name Present Possible Status ----------- ------- -------- ------ /dev/did/rdsk/d2s2 1 1 Online /dev/did/rdsk/d8s2 0 1 Offline === Cluster Device Groups === --- Device Group Status --- Device Group Name Primary Secondary Status ----------------- ------- --------- ------ schost-2 phys-schost-2 - Degraded --- Spare, Inactive, and In Transition Nodes --- Device Group Name Spare Nodes Inactive Nodes In Transistion Nodes ----------------- ----------- -------------- -------------------- schost-2 - - - === Cluster Resource Groups === Group Name Node Name Suspended Status ---------- --------- --------- ------ test-rg phys-schost-1 No Offline phys-schost-2 No Online test-rg phys-schost-1 No Offline phys-schost-2 No Error--stop failed test-rg phys-schost-1 No Online phys-schost-2 No Online === Cluster Resources === Resource Name Node Name Status Message ------------- --------- ------ ------- test_1 phys-schost-1 Offline Offline phys-schost-2 Online Online test_1 phys-schost-1 Offline Offline phys-schost-2 Stop failed Faulted test_1 phys-schost-1 Online Online phys-schost-2 Online Online Device Instance Node Status --------------- ---- ------ /dev/did/rdsk/d2 phys-schost-1 Ok /dev/did/rdsk/d3 phys-schost-1 Ok phys-schost-2 Ok /dev/did/rdsk/d4 phys-schost-1 Ok phys-schost-2 Ok /dev/did/rdsk/d6 phys-schost-2 Ok |
您还可以使用 Sun Cluster Manager GUI 来完成此过程。有关详细信息,请参见 Sun Cluster Manager 联机帮助。
此过程提供了 Sun Cluster 命令的长格式。此外,大多数命令还有简短格式。这些命令除了名称长短的不同以外,其功能都是相同的。有关命令及其简短格式的列表,请参见附录 A,Sun Cluster 面向对象的命令。
要查看 IP 网络多路径组的状态,请将 clnode(1CL) 命令与 status 子命令配合使用。
超级用户以外的用户需要具有 solaris.cluster.read RBAC 授权才能使用该子命令。
以下示例提供了一个由 clnode status 命令返回的群集组件状态信息范例。
% clnode status -m --- Node IPMP Group Status --- Node Name Group Name Status Adapter Status --------- ---------- ------ ------- ------ phys-schost-1 test-rg Online qfe1 Online phys-schost-2 test-rg Online qfe1 Online |
您还可以使用 Sun Cluster Manager GUI 来完成此过程。有关详细信息,请参见 Sun Cluster Manager 联机帮助。
此过程提供了 Sun Cluster 命令的长格式。此外,大多数命令还有简短格式。这些命令除了名称长短的不同以外,其功能都是相同的。有关命令及其简短格式的列表,请参见附录 A,Sun Cluster 面向对象的命令。
超级用户以外的用户需要具有 solaris.cluster.read RBAC 授权才能使用 status 子命令。
查看群集配置。
% cluster show |
要使用 cluster 命令显示更多信息,请使用 verbose 选项。有关详细信息,请参见 cluster(1CL) 手册页。
以下示例列出了群集配置。
% cluster show |
=== Cluster === Cluster Name: cluster-1 installmode: disabled heartbeat_timeout: 10000 heartbeat_quantum: 1000 private_netaddr: 172.16.0.0 private_netmask: 255.255.248.0 max_nodes: 64 max_privatenets: 10 global_fencing: Unknown Node List: phys-schost-1 Node Zones: phys_schost-2:za === Host Access Control === Cluster name: clustser-1 Allowed hosts: phys-schost-1, phys-schost-2:za Authentication Protocol: sys === Cluster Nodes === Node Name: phys-schost-1 Node ID: 1 Type: cluster Enabled: yes privatehostname: clusternode1-priv reboot_on_path_failure: disabled globalzoneshares: 3 defaultpsetmin: 1 quorum_vote: 1 quorum_defaultvote: 1 quorum_resv_key: 0x43CB1E1800000001 Transport Adapter List: qfe3, hme0 --- Transport Adapters for phys-schost-1 --- Transport Adapter: qfe3 Adapter State: Enabled Adapter Transport Type: dlpi Adapter Property(device_name): qfe Adapter Property(device_instance): 3 Adapter Property(lazy_free): 1 Adapter Property(dlpi_heartbeat_timeout): 10000 Adapter Property(dlpi_heartbeat_quantum): 1000 Adapter Property(nw_bandwidth): 80 Adapter Property(bandwidth): 10 Adapter Property(ip_address): 172.16.1.1 Adapter Property(netmask): 255.255.255.128 Adapter Port Names: 0 Adapter Port State(0): Enabled Transport Adapter: hme0 Adapter State: Enabled Adapter Transport Type: dlpi Adapter Property(device_name): hme Adapter Property(device_instance): 0 Adapter Property(lazy_free): 0 Adapter Property(dlpi_heartbeat_timeout): 10000 Adapter Property(dlpi_heartbeat_quantum): 1000 Adapter Property(nw_bandwidth): 80 Adapter Property(bandwidth): 10 Adapter Property(ip_address): 172.16.0.129 Adapter Property(netmask): 255.255.255.128 Adapter Port Names: 0 Adapter Port State(0): Enabled --- SNMP MIB Configuration on phys-schost-1 --- SNMP MIB Name: Event State: Disabled Protocol: SNMPv2 --- SNMP Host Configuration on phys-schost-1 --- --- SNMP User Configuration on phys-schost-1 --- SNMP User Name: foo Authentication Protocol: MD5 Default User: No Node Name: phys-schost-2:za Node ID: 2 Type: cluster Enabled: yes privatehostname: clusternode2-priv reboot_on_path_failure: disabled globalzoneshares: 1 defaultpsetmin: 2 quorum_vote: 1 quorum_defaultvote: 1 quorum_resv_key: 0x43CB1E1800000002 Transport Adapter List: hme0, qfe3 --- Transport Adapters for phys-schost-2 --- Transport Adapter: hme0 Adapter State: Enabled Adapter Transport Type: dlpi Adapter Property(device_name): hme Adapter Property(device_instance): 0 Adapter Property(lazy_free): 0 Adapter Property(dlpi_heartbeat_timeout): 10000 Adapter Property(dlpi_heartbeat_quantum): 1000 Adapter Property(nw_bandwidth): 80 Adapter Property(bandwidth): 10 Adapter Property(ip_address): 172.16.0.130 Adapter Property(netmask): 255.255.255.128 Adapter Port Names: 0 Adapter Port State(0): Enabled Transport Adapter: qfe3 Adapter State: Enabled Adapter Transport Type: dlpi Adapter Property(device_name): qfe Adapter Property(device_instance): 3 Adapter Property(lazy_free): 1 Adapter Property(dlpi_heartbeat_timeout): 10000 Adapter Property(dlpi_heartbeat_quantum): 1000 Adapter Property(nw_bandwidth): 80 Adapter Property(bandwidth): 10 Adapter Property(ip_address): 172.16.1.2 Adapter Property(netmask): 255.255.255.128 Adapter Port Names: 0 Adapter Port State(0): Enabled --- SNMP MIB Configuration on phys-schost-2 --- SNMP MIB Name: Event State: Disabled Protocol: SNMPv2 --- SNMP Host Configuration on phys-schost-2 --- --- SNMP User Configuration on phys-schost-2 --- === Transport Cables === Transport Cable: phys-schost-1:qfe3,switch2@1 Cable Endpoint1: phys-schost-1:qfe3 Cable Endpoint2: switch2@1 Cable State: Enabled Transport Cable: phys-schost-1:hme0,switch1@1 Cable Endpoint1: phys-schost-1:hme0 Cable Endpoint2: switch1@1 Cable State: Enabled Transport Cable: phys-schost-2:hme0,switch1@2 Cable Endpoint1: phys-schost-2:hme0 Cable Endpoint2: switch1@2 Cable State: Enabled Transport Cable: phys-schost-2:qfe3,switch2@2 Cable Endpoint1: phys-schost-2:qfe3 Cable Endpoint2: switch2@2 Cable State: Enabled === Transport Switches === Transport Switch: switch2 Switch State: Enabled Switch Type: switch Switch Port Names: 1 2 Switch Port State(1): Enabled Switch Port State(2): Enabled Transport Switch: switch1 Switch State: Enabled Switch Type: switch Switch Port Names: 1 2 Switch Port State(1): Enabled Switch Port State(2): Enabled === Quorum Devices === Quorum Device Name: d3 Enabled: yes Votes: 1 Global Name: /dev/did/rdsk/d3s2 Type: scsi Access Mode: scsi2 Hosts (enabled): phys-schost-1, phys-schost-2 Quorum Device Name: qs1 Enabled: yes Votes: 1 Global Name: qs1 Type: quorum_server Hosts (enabled): phys-schost-1, phys-schost-2 Quorum Server Host: 10.11.114.83 Port: 9000 === Device Groups === Device Group Name: testdg3 Type: SVM failback: no Node List: phys-schost-1, phys-schost-2 preferenced: yes numsecondaries: 1 diskset name: testdg3 === Registered Resource Types === Resource Type: SUNW.LogicalHostname:2 RT_description: Logical Hostname Resource Type RT_version: 2 API_version: 2 RT_basedir: /usr/cluster/lib/rgm/rt/hafoip Single_instance: False Proxy: False Init_nodes: All potential masters Installed_nodes: <All> Failover: True Pkglist: SUNWscu RT_system: True Resource Type: SUNW.SharedAddress:2 RT_description: HA Shared Address Resource Type RT_version: 2 API_version: 2 RT_basedir: /usr/cluster/lib/rgm/rt/hascip Single_instance: False Proxy: False Init_nodes: <Unknown> Installed_nodes: <All> Failover: True Pkglist: SUNWscu RT_system: True Resource Type: SUNW.HAStoragePlus:4 RT_description: HA Storage Plus RT_version: 4 API_version: 2 RT_basedir: /usr/cluster/lib/rgm/rt/hastorageplus Single_instance: False Proxy: False Init_nodes: All potential masters Installed_nodes: <All> Failover: False Pkglist: SUNWscu RT_system: False Resource Type: SUNW.haderby RT_description: haderby server for Sun Cluster RT_version: 1 API_version: 7 RT_basedir: /usr/cluster/lib/rgm/rt/haderby Single_instance: False Proxy: False Init_nodes: All potential masters Installed_nodes: <All> Failover: False Pkglist: SUNWscderby RT_system: False Resource Type: SUNW.sctelemetry RT_description: sctelemetry service for Sun Cluster RT_version: 1 API_version: 7 RT_basedir: /usr/cluster/lib/rgm/rt/sctelemetry Single_instance: True Proxy: False Init_nodes: All potential masters Installed_nodes: <All> Failover: False Pkglist: SUNWsctelemetry RT_system: False === Resource Groups and Resources === Resource Group: HA_RG RG_description: <Null> RG_mode: Failover RG_state: Managed Failback: False Nodelist: phys-schost-1 phys-schost-2 --- Resources for Group HA_RG --- Resource: HA_R Type: SUNW.HAStoragePlus:4 Type_version: 4 Group: HA_RG R_description: Resource_project_name: SCSLM_HA_RG Enabled{phys-schost-1}: True Enabled{phys-schost-2}: True Monitored{phys-schost-1}: True Monitored{phys-schost-2}: True Resource Group: cl-db-rg RG_description: <Null> RG_mode: Failover RG_state: Managed Failback: False Nodelist: phys-schost-1 phys-schost-2 --- Resources for Group cl-db-rg --- Resource: cl-db-rs Type: SUNW.haderby Type_version: 1 Group: cl-db-rg R_description: Resource_project_name: default Enabled{phys-schost-1}: True Enabled{phys-schost-2}: True Monitored{phys-schost-1}: True Monitored{phys-schost-2}: True Resource Group: cl-tlmtry-rg RG_description: <Null> RG_mode: Scalable RG_state: Managed Failback: False Nodelist: phys-schost-1 phys-schost-2 --- Resources for Group cl-tlmtry-rg --- Resource: cl-tlmtry-rs Type: SUNW.sctelemetry Type_version: 1 Group: cl-tlmtry-rg R_description: Resource_project_name: default Enabled{phys-schost-1}: True Enabled{phys-schost-2}: True Monitored{phys-schost-1}: True Monitored{phys-schost-2}: True === DID Device Instances === DID Device Name: /dev/did/rdsk/d1 Full Device Path: phys-schost-1:/dev/rdsk/c0t2d0 Replication: none default_fencing: global DID Device Name: /dev/did/rdsk/d2 Full Device Path: phys-schost-1:/dev/rdsk/c1t0d0 Replication: none default_fencing: global DID Device Name: /dev/did/rdsk/d3 Full Device Path: phys-schost-2:/dev/rdsk/c2t1d0 Full Device Path: phys-schost-1:/dev/rdsk/c2t1d0 Replication: none default_fencing: global DID Device Name: /dev/did/rdsk/d4 Full Device Path: phys-schost-2:/dev/rdsk/c2t2d0 Full Device Path: phys-schost-1:/dev/rdsk/c2t2d0 Replication: none default_fencing: global DID Device Name: /dev/did/rdsk/d5 Full Device Path: phys-schost-2:/dev/rdsk/c0t2d0 Replication: none default_fencing: global DID Device Name: /dev/did/rdsk/d6 Full Device Path: phys-schost-2:/dev/rdsk/c1t0d0 Replication: none default_fencing: global === NAS Devices === Nas Device: nas_filer1 Type: netapp User ID: root Nas Device: nas2 Type: netapp User ID: llai |
sccheck(1M) 命令可执行一组检查,来验证群集正常运行时所需的基本配置。如果所有检查均未失败,sccheck 将返回到 shell 提示符。如果某项检查失败,sccheck 将在指定输出目录或默认输出目录中生成报告。如果对多个节点运行 sccheck,sccheck 将为每个节点和多个节点的检查分别生成一个报告。
sccheck 命令按以下两个步骤运行:数据收集和数据分析。数据收集可能会耗费较长的时间,具体时间取决于系统配置。您可以在详细 (verbose) 模式下运行 sccheck 并使用 -v1 标志来打印进度消息。此外,您还可以使用 -v2 标志以超详细模式运行 sccheck,从而打印更加详细的进度消息(尤其是在数据收集过程中)。
在执行可能导致设备、卷管理组件或 Sun Cluster 的配置发生更改的管理过程之后,都应运行 sccheck。
以下示例显示了针对节点 phys-schost-1 和 phys-schost-2 在详细模式下运行的 sccheck,其中节点通过了所有检查。
# sccheck -v1 -h phys-schost-1,phys-schost-2 sccheck: Requesting explorer data and node report from phys-schost-1. sccheck: Requesting explorer data and node report from phys-schost-2. sccheck: phys-schost-1: Explorer finished. sccheck: phys-schost-1: Starting single-node checks. sccheck: phys-schost-1: Single-node checks finished. sccheck: phys-schost-2: Explorer finished. sccheck: phys-schost-2: Starting single-node checks. sccheck: phys-schost-2: Single-node checks finished. sccheck: Starting multi-node checks. sccheck: Multi-node checks finished # |
以下示例显示,群集 suncluster 中的节点 phys-schost-2 缺少挂载点 /global/phys-schost-1。报告是在输出目录 /var/cluster/sccheck/myReports/ 中创建的。
# sccheck -v1 -h phys-schost-1,phys-schost-2 -o /var/cluster/sccheck/myReports sccheck: Requesting explorer data and node report from phys-schost-1. sccheck: Requesting explorer data and node report from phys-schost-2. sccheck: phys-schost-1: Explorer finished. sccheck: phys-schost-1: Starting single-node checks. sccheck: phys-schost-1: Single-node checks finished. sccheck: phys-schost-2: Explorer finished. sccheck: phys-schost-2: Starting single-node checks. sccheck: phys-schost-2: Single-node checks finished. sccheck: Starting multi-node checks. sccheck: Multi-node checks finished. sccheck: One or more checks failed. sccheck: The greatest severity of all check failures was 3 (HIGH). sccheck: Reports are in /var/cluster/sccheck/myReports. # # cat /var/cluster/sccheck/myReports/sccheck-results.suncluster.txt ... =================================================== = ANALYSIS DETAILS = =================================================== ------------------------------------ CHECK ID : 3065 SEVERITY : HIGH FAILURE : Global filesystem /etc/vfstab entries are not consistent across all Sun Cluster 3.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. ... # |
sccheck(1M) 命令会执行多项检查,以检测 /etc/vfstab 文件中是否存在与群集文件系统及其全局挂载点有关的配置错误。
在进行了影响到设备或卷管理组件的群集配置更改后,请运行 sccheck。
以下示例显示,群集 suncluster 中的节点 phys-schost-2 缺少挂载点 /global/schost-1。报告将发送至输出目录 /var/cluster/sccheck/myReports/ 中。
# sccheck -v1 -h phys-schost-1,phys-schost-2 -o /var/cluster/sccheck/myReports sccheck: Requesting explorer data and node report from phys-schost-1. sccheck: Requesting explorer data and node report from phys-schost-2. sccheck: phys-schost-1: Explorer finished. sccheck: phys-schost-1: Starting single-node checks. sccheck: phys-schost-1: Single-node checks finished. sccheck: phys-schost-2: Explorer finished. sccheck: phys-schost-2: Starting single-node checks. sccheck: phys-schost-2: Single-node checks finished. sccheck: Starting multi-node checks. sccheck: Multi-node checks finished. sccheck: One or more checks failed. sccheck: The greatest severity of all check failures was 3 (HIGH). sccheck: Reports are in /var/cluster/sccheck/myReports. # # cat /var/cluster/sccheck/myReports/sccheck-results.suncluster.txt ... =================================================== = ANALYSIS DETAILS = =================================================== ------------------------------------ CHECK ID : 3065 SEVERITY : HIGH FAILURE : Global filesystem /etc/vfstab entries are not consistent across all Sun Cluster 3.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. ... # # cat /var/cluster/sccheck/myReports/sccheck-results.phys-schost-1.txt ... =================================================== = ANALYSIS DETAILS = =================================================== ------------------------------------ CHECK ID : 1398 SEVERITY : HIGH FAILURE : An unsupported server is being used as a Sun Cluster 3.x node. ANALYSIS : This server may not been qualified to be used as a Sun Cluster 3.x node. Only servers that have been qualified with Sun Cluster 3.x are supported as Sun Cluster 3.x nodes. RECOMMEND: Because the list of supported servers is always being updated, check with your Sun Microsystems representative to get the latest information on what servers are currently supported and only use a server that is supported with Sun Cluster 3.x. ... # |
/var/cluster/logs/commandlog ASCII 文本文件包含在群集中执行的选定 Sun Cluster 命令的记录。一旦设置群集,系统会自动启动对命令的日志记录,并在您关闭群集时结束。在所有已启动并以群集模式引导的节点上,系统都会记录命令。
不在该日志文件中记录的命令包括那些显示群集配置和当前状态的命令。
在该文件中记录的命令包括那些配置和更改群集当前状态的命令:
claccess
cldevice
cldevicegroup
clinterconnect
clnasdevice
clnode
clquorum
clreslogicalhostname
clresource
clresourcegroup
clresourcetype
clressharedaddress
clsetup
clsnmphost
clsnmpmib
clnsmpuser
cltelemetryattribute
cluster
scconf
scdidadm
scdpm
scgdevs
scrgadm
scsetup
scshutdown
scswitch
commandlog 文件中的记录包含以下元素:
日期和时间戳
发出命令的主机的名称
命令的进程 ID
执行命令的用户的登录名
用户已执行的命令,包括所有选项和操作对象
命令选项在 commandlog 文件中的引号内,这样您就可以轻松找到它们,然后复制粘贴到 shell 中并在 shell 中执行。
已执行命令的退出状态
如果命令异常中止并产生未知结果,则 Sun Cluster 软件不会在 commandlog 文件中显示退出状态。
默认情况下,系统每周对 commandlog 文件进行一次归档。要更改 commandlog 文件的归档策略,请在群集的每个节点上运行 crontab 命令。有关更多信息,请参见 crontab(1) 手册页。
在任意给定时刻,Sun Cluster 最多可在每个群集节点上维护八个先前归档的 commandlog 文件。当周的 commandlog 文件名为 commandlog。时间最近的完整的周归档文件名为 commandlog.0。时间最早的完整的周归档文件名为 commandlog.7。
查看当周 commandlog 文件的内容,一次一屏显示。
# more /var/cluster/logs/commandlog |
以下示例显示了通过执行 more 命令显示出的 commandlog 文件的内容。
more -lines10 /var/cluster/logs/commandlog 11/11/2006 09:42:51 phys-schost-1 5222 root START - clsetup 11/11/2006 09:43:36 phys-schost-1 5758 root START - clrg add "app-sa-1" 11/11/2006 09:43:36 phys-schost-1 5758 root END 0 11/11/2006 09:43:36 phys-schost-1 5760 root START - clrg set -y "RG_description=Department Shared Address RG" "app-sa-1" 11/11/2006 09:43:37 phys-schost-1 5760 root END 0 11/11/2006 09:44:15 phys-schost-1 5810 root START - clrg online "app-sa-1" 11/11/2006 09:44:15 phys-schost-1 5810 root END 0 11/11/2006 09:44:19 phys-schost-1 5222 root END -20988320 12/02/2006 14:37:21 phys-schost-1 5542 jbloggs START - clrg -c -g "app-sa-1" -y "RG_description=Joe Bloggs Shared Address RG" 12/02/2006 14:37:22 phys-schost-1 5542 jbloggs END 0 |