本节提供了以下过程以维护法定设备:
您可以使用 clsetup 实用程序向现有法定设备的节点列表中添加节点或从中删除节点。要修改法定设备的节点列表,必须删除该法定设备,修改节点与删除的法定设备的物理连接,然后将该法定设备重新添加到群集配置中。添加法定设备时,clquorum 命令会自动为连接到磁盘的所有节点配置节点到磁盘路径。有关更多信息,请参见 clquorum(1CL) 手册页。
phys-schost# 提示符表示全局群集提示符。此操作过程适用于全局群集。
此过程提供了 Oracle Solaris Cluster 命令的长格式。此外,大多数命令还有短形式。这些命令除了名称长短的不同以外,其功能都是相同的。
# clquorum list -v
# clsetup
这时将显示主菜单。
这时将显示 "Quorum"(法定)菜单。
请按照说明进行操作。系统将询问您要删除的磁盘的名称。
请按照说明进行操作。系统将询问您要作为法定设备使用的磁盘的名称。
# clquorum list -v
以下示例显示了如何使用 clsetup 实用程序在法定设备节点列表中添加节点或从中删除节点。在本示例中,法定设备的名称为 d2,各个过程的最终结果是向法定设备节点列表中添加了另一个节点。
[Assume the root role that provides solaris.cluster.modify RBAC authorization on any node in the cluster.] [Determine the quorum device name:] # clquorum list -v Quorum Type ------- ----- d2 shared_disk sc-phys-schost-1 node sc-phys-schost-2 node sc-phys-schost-3 node [Start the clsetup utility:] # clsetup [Type the number that corresponds with the quorum option.] . [Type the number that corresponds with the option to remove a quorum device.] . [Answer the questions when prompted.] [You will need the following information:] Information: Example: Quorum Device Name: d2 [Verify that the clquorum command completed successfully:] clquorum remove d2 Command completed successfully. [Verify that the quorum device was removed.] # clquorum list -v Quorum Type ------- ----- sc-phys-schost-1 node sc-phys-schost-2 node sc-phys-schost-3 node [Type the number that corresponds with the Quorum option.] . [Type the number that corresponds with the option to add a quorum device.] . [Answer the questions when prompted.] [You will need the following information:] Information Example: quorum device name d2 [Verify that the clquorum command was completed successfully:] clquorum add d2 Command completed successfully. Quit the clsetup utility. [Verify that the correct nodes have paths to the quorum device. In this example, note that phys-schost-3 has been added to the enabled hosts list.] # clquorum show d2 | grep Hosts === Quorum Devices === Quorum Device Name: d2 Hosts (enabled): phys-schost-1, phys-schost-2, phys-schost-3 [Verify that the modified quorum device is online.] # clquorum status d2 === Cluster Quorum === --- Quorum Votes by Device --- Device Name Present Possible Status ----------- ------- -------- ------ d2 1 1 Online
使用 clquorum 命令可将法定设备置于维护状态。有关更多信息,请参见 clquorum(1CL) 手册页。clsetup 实用程序目前没有此功能。
如果在较长的一段时间内不使用法定设备,请将其置于维护状态。这样,法定设备的法定选票计数设置为零,当设备正在维修时,将不会参与投票。在维护状态期间,法定设备的配置信息将被保留下来。
要将群集节点置于维护状态,请参见如何使节点进入维护状态。
phys-schost# 提示符表示全局群集提示符。此操作过程适用于全局群集。
此过程提供了 Oracle Solaris Cluster 命令的长格式。此外,大多数命令还有短形式。这些命令除了名称长短的不同以外,其功能都是相同的。
您还可以使用 Oracle Solaris Cluster Manager GUI 禁用法定设备以将其置于维护状态。有关登录说明,请参见如何访问 Oracle Solaris Cluster Manager。如果群集处于安装模式,则单击 "Reset Quorum Device"(复位法定设备)来退出安装模式。
# clquorum disable device
指定要更改的磁盘设备的 DID 名称,例如 d4。
处于维护状态的设备的输出应该为法定设备选票读取零。
# clquorum status device
以下示例显示了如何将法定设备置于维护状态,以及如何检验操作结果。
# clquorum disable d20 # clquorum status d20 === Cluster Quorum === --- Quorum Votes by Device --- Device Name Present Possible Status ----------- ------- -------- ------ d20 1 1 Offline
另请参见
要重新启用法定设备,请参见如何使法定设备脱离维护状态。
要将某个节点置于维护状态,请参见如何使节点进入维护状态。
如果某个法定设备处于维护状态,而您希望使该法定设备脱离维护状态并将法定选票计数重置为默认值,请运行此过程。
![]() | 注意 - 如果您既未指定 globaldev 选项,也未指定 node 选项,则会重置整个群集的法定计数。 |
配置法定设备时,Oracle Solaris Cluster 软件将 N-1 作为选票计数分配给法定设备,其中 N 是连接到法定设备的选票计数。例如,连接到两个选票计数非零的节点的法定设备的法定选票计数为一(二减一)。
要使群集节点及其相关法定设备脱离维护状态,请参见如何使节点脱离维护状态。
要了解有关法定投票计数的更多信息,请参见Oracle Solaris Cluster Concepts Guide 中的About Quorum Vote Counts。
您还可以使用 Oracle Solaris Cluster Manager GUI 启用法定设备以使其脱离维护状态。有关登录说明,请参见如何访问 Oracle Solaris Cluster Manager。
phys-schost# 提示符表示全局群集提示符。此操作过程适用于全局群集。
此过程提供了 Oracle Solaris Cluster 命令的长格式。此外,大多数命令还有短形式。这些命令除了名称长短的不同以外,其功能都是相同的。
# clquorum enable device
指定要重置的法定设备的 DID 名称,例如 d4。
# clquorum show +
以下示例将一个法定设备的法定计数重置为默认值并检验操作结果。
# clquorum enable d20 # clquorum show + === Cluster Nodes === Node Name: phys-schost-2 Node ID: 1 Quorum Vote Count: 1 Reservation Key: 0x43BAC41300000001 Node Name: phys-schost-3 Node ID: 2 Quorum Vote Count: 1 Reservation Key: 0x43BAC41300000002 === Quorum Devices === Quorum Device Name: d3 Enabled: yes Votes: 1 Global Name: /dev/did/rdsk/d20s2 Type: shared_disk Access Mode: scsi3 Hosts (enabled): phys-schost-2, phys-schost-3
您无需成为 root 角色即可列出法定配置。您可以承担任何可提供 solaris.cluster.read RBAC 授权的角色。
phys-schost# 提示符表示全局群集提示符。此操作过程适用于全局群集。
此过程提供了 Oracle Solaris Cluster 命令的长格式。此外,大多数命令还有短形式。这些命令除了名称长短的不同以外,其功能都是相同的。
您还可以使用 Oracle Solaris Cluster Manager GUI 查看法定配置。有关 GUI 登录说明,请参见如何访问 Oracle Solaris Cluster Manager。
示例 6-8 列出法定配置% clquorum show + === Cluster Nodes === Node Name: phys-schost-2 Node ID: 1 Quorum Vote Count: 1 Reservation Key: 0x43BAC41300000001 Node Name: phys-schost-3 Node ID: 2 Quorum Vote Count: 1 Reservation Key: 0x43BAC41300000002 === Quorum Devices === Quorum Device Name: d3 Enabled: yes Votes: 1 Global Name: /dev/did/rdsk/d20s2 Type: shared_disk Access Mode: scsi3 Hosts (enabled): phys-schost-2, phys-schost-3
phys-schost# 提示符表示全局群集提示符。此操作过程适用于全局群集。
此过程提供了 Oracle Solaris Cluster 命令的长格式。此外,大多数命令还有短形式。这些命令除了名称长短的不同以外,其功能都是相同的。
要删除作为法定设备的磁盘设备,请参见如何删除法定设备。
要更换磁盘设备,请参见硬件指南中针对磁盘盒的过程。另请参见Oracle Solaris Cluster 4.2 Hardware Administration Manual 。
要添加磁盘作为新的法定设备,请参见添加法定设备。