跳过导航链接 | |
退出打印视图 | |
Oracle Solaris Cluster 系统管理指南 Oracle Solaris Cluster 4.0 (简体中文) |
1. Oracle Solaris Cluster 管理简介
记录 Oracle Solaris Cluster 的硬件配置
表 1-2 提供了管理群集的起点。
表 1-2 Oracle Solaris Cluster 管理工具
|
可以从命令行使用 Parallel Console Access pconsole 实用程序远程登录到群集。pconsole 实用程序是 Oracle Solaris terminal/pconsole 软件包的一部分。可以通过执行 pkg install terminal/pconsole 来安装该软件包。pconsole 实用程序会为您在命令行上指定的每个远程主机创建一个主机终端窗口。该实用程序还会打开一个中央(或主)控制台窗口,该窗口将您在其中输入的内容传播到每个您打开的连接。
pconsole 实用程序可以从 X Windows 内运行,也可以在控制台模式下运行。在要用作群集的管理控制台的计算机上安装 pconsole。如果您的终端服务器允许连接到服务器 IP 地址上的特定端口号;除了指定主机名和 IP 地址外,您还可以指定端口号,如下所示:terminal-server:portnumber。
有关更多信息,请参见 pconsole(1) 手册页。
如果您的终端集中器或系统控制器支持 ssh,则可使用 pconsole 实用程序连接到这些系统的控制台。pconsole 实用程序是 Oracle Solaris terminal/pconsole 软件包的一部分,是在安装该软件包时安装的。pconsole 实用程序会为您在命令行上指定的每个远程主机创建一个主机终端窗口。该实用程序还会打开一个中央(或主)控制台窗口,该窗口将您在其中输入的内容传播到每个您打开的连接。有关更多信息,请参见 pconsole(1) 手册页。
使用 clsetup 实用程序,可以通过交互方式为全局群集配置法定、资源组、群集传输、专用主机名、设备组和新节点选项。clzonecluster 实用程序可对区域群集执行类似的配置任务。有关更多信息,请参见 clsetup(1CL) 和 clzonecluster(1CL) 手册页。
phys-schost# 提示符表示全局群集提示符。此操作过程适用于全局群集。
此过程提供了 Oracle Solaris Cluster 命令的长格式。此外,大多数命令还有短形式。这些命令除了名称长短的不同以外,其功能都是相同的。
从全局群集的节点执行此过程中的所有步骤。
phys-schost# clsetup
phys-schost# clsetup
这时将显示主菜单。
phys-schost# clzonecluster configure sczone
您可以使用以下选项查看该实用程序中的可用操作:
clzc:sczone> ?
按照屏幕上的说明完成任务。有关详细信息,请参见《Oracle Solaris Cluster 软件安装指南》中的"配置区域群集"中的说明。
另请参见
有关更多信息,请参见 clsetup 或 clzonecluster 联机帮助。
您无需以超级用户的身份登录即可执行此过程。从全局群集的节点执行此过程中的所有步骤。
phys-schost# 提示符表示全局群集提示符。此操作过程适用于全局群集。
此过程提供了 Oracle Solaris Cluster 命令的长格式。此外,大多数命令还有短形式。这些命令除了名称长短的不同以外,其功能都是相同的。
phys-schost# clnode show-rev -v -node
该命令显示了 Oracle Solaris Cluster 的发行版本号和所有 Oracle Solaris Cluster 软件包的版本字符串。
示例 1-1 显示 Oracle Solaris Cluster 发行版本信息和版本信息
以下示例显示了群集的发行版本信息以及随 Oracle Solaris Cluster 4.0 提供的软件包的版本信息。
phys-schost# clnode show-rev 4.0 phys-schost#% clnode show-rev -v Oracle Solaris Cluster 4.0 for Solaris 11 sparc ha-cluster/data-service/apache :4.0.0-0.21 ha-cluster/data-service/dhcp :4.0.0-0.21 ha-cluster/data-service/dns :4.0.0-0.21 ha-cluster/data-service/ha-ldom :4.0.0-0.21 ha-cluster/data-service/ha-zones :4.0.0-0.21 ha-cluster/data-service/nfs :4.0.0-0.21 ha-cluster/data-service/oracle-database :4.0.0-0.21 ha-cluster/data-service/tomcat :4.0.0-0.21 ha-cluster/data-service/weblogic :4.0.0-0.21 ha-cluster/developer/agent-builder :4.0.0-0.21 ha-cluster/developer/api :4.0.0-0.21 ha-cluster/geo/geo-framework :4.0.0-0.21 ha-cluster/geo/manual :4.0.0-0.21 ha-cluster/geo/replication/availability-suite :4.0.0-0.21 ha-cluster/geo/replication/data-guard :4.0.0-0.21 ha-cluster/geo/replication/sbp :4.0.0-0.21 ha-cluster/geo/replication/srdf :4.0.0-0.21 ha-cluster/group-package/ha-cluster-data-services-full :4.0.0-0.21 ha-cluster/group-package/ha-cluster-framework-full :4.0.0-0.21 ha-cluster/group-package/ha-cluster-framework-l10n :4.0.0-0.21 ha-cluster/group-package/ha-cluster-framework-minimal :4.0.0-0.21 ha-cluster/group-package/ha-cluster-framework-scm :4.0.0-0.21 ha-cluster/group-package/ha-cluster-framework-slm :4.0.0-0.21 ha-cluster/group-package/ha-cluster-full :4.0.0-0.21 ha-cluster/group-package/ha-cluster-geo-full :4.0.0-0.21 ha-cluster/group-package/ha-cluster-geo-incorporation :4.0.0-0.21 ha-cluster/group-package/ha-cluster-incorporation :4.0.0-0.21 ha-cluster/group-package/ha-cluster-minimal :4.0.0-0.21 ha-cluster/group-package/ha-cluster-quorum-server-full :4.0.0-0.21 ha-cluster/group-package/ha-cluster-quorum-server-l10n :4.0.0-0.21 ha-cluster/ha-service/derby :4.0.0-0.21 ha-cluster/ha-service/gds :4.0.0-0.21 ha-cluster/ha-service/logical-hostname :4.0.0-0.21 ha-cluster/ha-service/smf-proxy :4.0.0-0.21 ha-cluster/ha-service/telemetry :4.0.0-0.21 ha-cluster/library/cacao :4.0.0-0.21 ha-cluster/library/ucmm :4.0.0-0.21 ha-cluster/locale :4.0.0-0.21 ha-cluster/release/name :4.0.0-0.21 ha-cluster/service/management :4.0.0-0.21 ha-cluster/service/management/slm :4.0.0-0.21 ha-cluster/service/quorum-server :4.0.0-0.21 ha-cluster/service/quorum-server/locale :4.0.0-0.21 ha-cluster/service/quorum-server/manual/locale :4.0.0-0.21 ha-cluster/storage/svm-mediator :4.0.0-0.21 ha-cluster/system/cfgchk :4.0.0-0.21 ha-cluster/system/core :4.0.0-0.21 ha-cluster/system/dsconfig-wizard :4.0.0-0.21 ha-cluster/system/install :4.0.0-0.21 ha-cluster/system/manual :4.0.0-0.21 ha-cluster/system/manual/data-services :4.0.0-0.21 ha-cluster/system/manual/locale :4.0.0-0.21
phys-schost# 提示符表示全局群集提示符。此操作过程适用于全局群集。
此过程提供了 Oracle Solaris Cluster 命令的长格式。此外,大多数命令还有短形式。这些命令除了名称长短的不同以外,其功能都是相同的。
开始之前
超级用户以外的用户需要具有 solaris.cluster.read RBAC 授权才能使用该子命令。
phys-schost# cluster show -t resource,resourcetype,resourcegroup
从全局群集的节点执行此过程中的所有步骤。要获取各个资源、资源组和资源类型的信息,请将 show 子命令与下列命令之一配合使用:
resource
resource group
resourcetype
示例 1-2 显示已配置的资源类型、资源组和资源
以下示例显示了为群集 schost 配置的资源类型 (RT Name)、资源组 (RG Name) 和资源 (RS Name)。
phys-schost# cluster show -t resource,resourcetype,resourcegroup === Registered Resource Types === Resource Type: SUNW.sctelemetry RT_description: sctelemetry service for Oracle Solaris 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: <NULL> RT_system: True Global_zone: True === Resource Groups and Resources === Resource Group: tel-rg RG_description: <NULL> RG_mode: Failover RG_state: Managed Failback: False Nodelist: phys-schost-2 phys-schost-1 --- Resources for Group tel-rg --- Resource: tel-res Type: SUNW.sctelemetry Type_version: 4.0 Group: tel-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
phys-schost# 提示符表示全局群集提示符。此操作过程适用于全局群集。
此过程提供了 Oracle Solaris Cluster 命令的长格式。此外,大多数命令还有短形式。这些命令除了名称长短的不同以外,其功能都是相同的。
开始之前
超级用户以外的用户需要具有 solaris.cluster.read RBAC 授权才能使用 status 子命令。
示例 1-3 检查群集组件的状态
以下示例提供了 cluster status 命令返回的群集组件状态信息的样例。
phys-schost# 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:nge1 phys-schost-4:nge1 Path online phys-schost-1:e1000g1 phys-schost-4:e1000g1 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 === Zone Clusters === --- Zone Cluster Status --- Name Node Name Zone HostName Status Zone Status ---- --------- ------------- ------ ----------- sczone schost-1 sczone-1 Online Running schost-2 sczone-2 Online Running
phys-schost# 提示符表示全局群集提示符。此操作过程适用于全局群集。
此过程提供了 Oracle Solaris Cluster 命令的长格式。此外,大多数命令还有短形式。这些命令除了名称长短的不同以外,其功能都是相同的。
要检查 IP 网络多路径组的状态,请将该命令与 clnode status 命令一起使用。
开始之前
超级用户以外的用户需要具有 solaris.cluster.read RBAC 授权才能使用该子命令。
phys-schost# clnode status -m
从全局群集的节点执行此过程中的所有步骤。
示例 1-4 检查公共网络状态
以下示例提供了 clnode status 命令返回的群集组件状态信息的样例。
% clnode status -m --- Node IPMP Group Status --- Node Name Group Name Status Adapter Status --------- ---------- ------ ------- ------ phys-schost-1 test-rg Online nge2 Online phys-schost-2 test-rg Online nge3 Online
phys-schost# 提示符表示全局群集提示符。此操作过程适用于全局群集。
此过程提供了 Oracle Solaris Cluster 命令的长格式。此外,大多数命令还有短形式。这些命令除了名称长短的不同以外,其功能都是相同的。
开始之前
超级用户以外的用户需要具有 solaris.cluster.read RBAC 授权才能使用 status 子命令。
% cluster show
从全局群集的节点执行此过程中的所有步骤。
从全局群集投票节点运行 cluster show 命令可显示有关群集的详细配置信息以及区域群集的信息(如果已配置这些群集)。
您还可以使用 clzonecluster show 命令仅查看区域群集的配置信息。区域群集的属性包括区域群集名称、IP 类型、自动引导和区域路径。show 子命令在区域群集内部运行,并且仅适用于该特定区域群集。从区域群集节点运行 clzonecluster show 命令时,将仅检索有关对该特定区域群集可见的对象的状态。
要显示有关 cluster 命令的更多信息,请使用详细 (verbose) 选项。有关详细信息,请参见 cluster(1CL) 手册页。有关 clzonecluster 的更多信息,请参见 clzonecluster(1CL) 手册页。
示例 1-5 查看全局群集配置
以下示例列出了有关全局群集的配置信息。如果您配置了区域群集,则也会列出相应的信息。
phys-schost# cluster show
=== Cluster === Cluster Name: cluster-1 clusterid: 0x4DA2C888 installmode: disabled heartbeat_timeout: 10000 heartbeat_quantum: 1000 private_netaddr: 172.11.0.0 private_netmask: 255.255.248.0 max_nodes: 64 max_privatenets: 10 num_zoneclusters: 12 udp_session_timeout: 480 concentrate_load: False global_fencing: prefer3 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 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: net1, net3 --- Transport Adapters for phys-schost-1 --- Transport Adapter: net1 Adapter State: Enabled Adapter Transport Type: dlpi Adapter Property(device_name): net Adapter Property(device_instance): 1 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: net3 Adapter State: Enabled Adapter Transport Type: dlpi Adapter Property(device_name): net Adapter Property(device_instance): 3 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: e1000g1, nge1 --- Transport Adapters for phys-schost-2 --- Transport Adapter: e1000g1 Adapter State: Enabled Adapter Transport Type: dlpi Adapter Property(device_name): e1000g Adapter Property(device_instance): 2 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: nge1 Adapter State: Enabled Adapter Transport Type: dlpi Adapter Property(device_name): nge 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:e1000g1,switch2@1 Cable Endpoint1: phys-schost-1:e1000g1 Cable Endpoint2: switch2@1 Cable State: Enabled Transport Cable: phys-schost-1:nge1,switch1@1 Cable Endpoint1: phys-schost-1:nge1 Cable Endpoint2: switch1@1 Cable State: Enabled Transport Cable: phys-schost-2:nge1,switch1@2 Cable Endpoint1: phys-schost-2:nge1 Cable Endpoint2: switch1@2 Cable State: Enabled Transport Cable: phys-schost-2:e1000g1,switch2@2 Cable Endpoint1: phys-schost-2:e1000g1 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: shared_disk Access Mode: scsi3 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: 4 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: <NULL> RT_system: True Global_zone: 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: <NULL> RT_system: True Global_zone: 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: <NULL> RT_system: True Global_zone: True Resource Type: SUNW.haderby RT_description: haderby server for Oracle Solaris 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: <NULL> RT_system: True Global_zone: True Resource Type: SUNW.sctelemetry RT_description: sctelemetry service for Oracle Solaris 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: <NULL> RT_system: True Global_zone: True === 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: sun_uss nodeIPs{phys-schost-2}: 10.134.112.112 nodeIPs{phys-schost-1 10.134.112.113 User ID: root
示例 1-6 查看区域群集配置
% clzonecluster show === Zone Clusters === Zone Cluster Name: sczone zonename: sczone zonepath: /zones/sczone autoboot: TRUE ip-type: shared enable_priv_net: TRUE --- Solaris Resources for sczone --- Resource Name: net address: 172.16.0.1 physical: auto Resource Name: net address: 172.16.0.2 physical: auto Resource Name: fs dir: /local/ufs-1 special: /dev/md/ds1/dsk/d0 raw: /dev/md/ds1/rdsk/d0 type: ufs options: [logging] --- Zone Cluster Nodes for sczone --- Node Name: sczone-1 physical-host: sczone-1 hostname: lzzone-1 Node Name: sczone-2 physical-host: sczone-2 hostname: lzzone-2
您还可以使用 clnasdevice show 子命令查看为全局群集或区域群集配置的 NAS 设备。有关更多信息,请参见 clnasdevice(1CL) 手册页。
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 子命令。
phys-schost# su
从全局群集的节点执行此过程中的所有步骤。
该搜索将找到包含 check 的 Oracle Solaris Cluster 软件更新。
# cluster check -v -o outputdir
详细模式。
将输出重定向到 outputdir 子目录。
该命令会运行所有可用的基本检查。不会影响任何群集功能。
# cluster check -v -k interactive -o outputdir
指定运行交互式验证检查
该命令会运行所有可用的交互式检查并提示您提供所需的群集相关信息。不会影响任何群集功能。
# cluster list-checks -k functional
例如,功能检查可能会引起节点出现紧急情况或故障转移到其他节点。
# cluster list-checks -v -C check-ID
指定特定检查。
# cluster check -v -k functional -C check-ID -o outputdir
指定运行功能验证检查
响应来自检查的提示,确认应运行该检查以及必须执行的任何信息或操作。
注 - 为了进行记录,请为所运行的每个检查指定唯一 outputdir 子目录名称。如果重用 outputdir 名称,则新检查的输出将覆写重用的 outputdir 子目录的现有内容。
phys-schost# clzonecluster verify zoneclustername
示例 1-7 检查全局群集配置并且所有基本检查均通过
以下示例显示了针对节点 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 Take the cluster out of production # cluster check -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: 1 ============================================================ >>> Check Description <<< … Follow onscreen directions
示例 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. ... #
cluster 命令会执行多项检查,以确定 /etc/vfstab 文件中是否存在与群集文件系统及其全局挂载点有关的配置错误。有关更多信息,请参见 cluster(1CL) 手册页。
注 - 在进行了影响到设备或卷管理组件的群集配置更改后,请运行 cluster check。
示例 1-11 检查全局挂载点
以下示例显示,群集 suncluster 中的节点 phys-schost-2 缺少挂载点 /global/schost-1。报告将发送到输出目录 /var/cluster/logs/cluster_check/<timestamp>/。
phys-schost# cluster check -v1 -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. ... # # cat /var/cluster/logs/cluster_check/Dec5/cluster_check-results.phys-schost-1.txt ... =================================================== = ANALYSIS DETAILS = =================================================== ------------------------------------ CHECK ID : 1398 SEVERITY : HIGH FAILURE : An unsupported server is being used as an Oracle Solaris Cluster 4.x node. ANALYSIS : This server may not been qualified to be used as an Oracle Solaris Cluster 4.x node. Only servers that have been qualified with Oracle Solaris Cluster 4.0 are supported as Oracle Solaris Cluster 4.x nodes. RECOMMEND: Because the list of supported servers is always being updated, check with your Oracle representative to get the latest information on what servers are currently supported and only use a server that is supported with Oracle Solaris Cluster 4.x. ... #
/var/cluster/logs/commandlog ASCII 文本文件包含在群集中执行的选定 Oracle Solaris Cluster 命令的记录。一旦设置群集,系统会自动启动对命令的日志记录,并在您关闭群集时结束。在所有已启动并以群集模式引导的节点上,系统都会记录命令。
不在该文件中记录的命令包括那些显示群集配置和当前状态的命令。
在该文件中记录的命令包括那些配置和更改群集当前状态的命令:
claccess
cldevice
cldevicegroup
clinterconnect
clnasdevice
clnode
clquorum
clreslogicalhostname
clresource
clresourcegroup
clresourcetype
clressharedaddress
clsetup
clsnmphost
clsnmpmib
clnsmpuser
cltelemetryattribute
cluster
clzonecluster
scdidadm
commandlog 文件中的记录可包含下列元素:
日期和时间戳
发出命令的主机的名称
命令的进程 ID
执行命令的用户的登录名
用户已执行的命令,包括所有选项和操作对象
注 - 命令选项在 commandlog 文件中用引号括起,这样您就可以轻松找到它们,然后复制粘贴到 shell 中并在 shell 中执行。
已执行命令的退出状态
注 - 如果命令异常中止并产生未知结果,则 Oracle Solaris Cluster 软件不会在 commandlog 文件中显示退出状态。
默认情况下,系统每周定期对 commandlog 文件进行一次归档。要更改 commandlog 文件的归档策略,请在群集的每个节点上运行 crontab 命令。有关更多信息,请参见 crontab(1) 手册页。
在任意给定时刻,Oracle Solaris Cluster 软件最多可在每个群集节点上维护八个先前归档的 commandlog 文件。当周的 commandlog 文件名为 commandlog。时间最近的完整的周归档文件名为 commandlog.0。时间最早的完整的周归档文件名为 commandlog.7。
phys-schost# more /var/cluster/logs/commandlog
示例 1-12 查看 Oracle Solaris Cluster 命令日志的内容
以下示例显示了通过执行 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