Oracle® Solaris Cluster 系统管理指南

退出打印视图

更新时间: 2015 年 10 月
 
 

维护法定设备

本节提供了以下过程以维护法定设备:

如何修改法定设备节点列表

您可以使用 clsetup 实用程序向现有法定设备的节点列表中添加节点或从中删除节点。要修改法定设备的节点列表,必须删除该法定设备,修改节点与删除的法定设备的物理连接,然后将该法定设备重新添加到群集配置中。添加法定设备时,clquorum 命令会自动为连接到磁盘的所有节点配置节点到磁盘路径。有关更多信息,请参见 clquorum(1CL) 手册页。

phys-schost# 提示符表示全局群集提示符。此操作过程适用于全局群集。

此过程提供了 Oracle Solaris Cluster 命令的长格式。此外,大多数命令还有短形式。这些命令除了名称长短的不同以外,其功能都是相同的。

  1. 在群集的任一节点上承担可提供 solaris.cluster.modify RBAC 授权的角色。
  2. 确定要修改的法定设备的名称。
    # clquorum list -v
  3. 启动 clsetup 实用程序。
    # clsetup

    这时将显示主菜单。

  4. 键入 "Quorum"(法定)选项的编号。

    这时将显示 "Quorum"(法定)菜单。

  5. 键入与删除法定设备选项对应的编号。

    请按照说明进行操作。系统将询问您要删除的磁盘的名称。

  6. 添加或删除节点与法定设备之间的连接。
  7. 键入与添加法定设备选项对应的编号。

    请按照说明进行操作。系统将询问您要作为法定设备使用的磁盘的名称。

  8. 检验是否已添加法定设备。
    # clquorum list -v
示例 6-5  修改法定设备节点列表

以下示例显示了如何使用 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 实用程序目前没有此功能。

如果在较长的一段时间内不使用法定设备,请将其置于维护状态。这样,法定设备的法定选票计数设置为零,当设备正在维修时,将不会参与投票。在维护状态期间,法定设备的配置信息将被保留下来。


注 -  所有双节点群集均要求至少配置一个法定设备。如果这是双节点群集的最后一个法定设备,则 clquorum 无法将该设备置于维护状态。

要将群集节点置于维护状态,请参见如何使节点进入维护状态

phys-schost# 提示符表示全局群集提示符。此操作过程适用于全局群集。

此过程提供了 Oracle Solaris Cluster 命令的长格式。此外,大多数命令还有短形式。这些命令除了名称长短的不同以外,其功能都是相同的。

您还可以使用 Oracle Solaris Cluster Manager GUI 禁用法定设备以将其置于维护状态。有关登录说明,请参见如何访问 Oracle Solaris Cluster Manager。如果群集处于安装模式,则单击 "Reset Quorum Device"(复位法定设备)来退出安装模式。

  1. 在群集的任一节点上承担可提供 solaris.cluster.modify RBAC 授权的角色。
  2. 将法定设备置于维护状态。
    # clquorum disable device
    device

    指定要更改的磁盘设备的 DID 名称,例如 d4

  3. 检验该法定设备当前是否处于维护状态。

    处于维护状态的设备的输出应该为法定设备选票读取零。

    # clquorum status device
示例 6-6  将法定设备置于维护状态

以下示例显示了如何将法定设备置于维护状态,以及如何检验操作结果。

# clquorum disable d20
# clquorum status d20
 
=== Cluster Quorum ===

--- Quorum Votes by Device ---

Device Name       Present      Possible      Status
-----------       -------      --------      ------
d20               1            1             Offline

另请参见

要重新启用法定设备,请参见如何使法定设备脱离维护状态

要将某个节点置于维护状态,请参见如何使节点进入维护状态

如何使法定设备脱离维护状态

如果某个法定设备处于维护状态,而您希望使该法定设备脱离维护状态并将法定选票计数重置为默认值,请运行此过程。


Caution

注意  -  如果您既未指定 globaldev 选项,也未指定 node 选项,则会重置整个群集的法定计数。


配置法定设备时,Oracle Solaris Cluster 软件将 N-1 作为选票计数分配给法定设备,其中 N 是连接到法定设备的选票计数。例如,连接到两个选票计数非零的节点的法定设备的法定选票计数为一(二减一)。

您还可以使用 Oracle Solaris Cluster Manager GUI 启用法定设备以使其脱离维护状态。有关登录说明,请参见如何访问 Oracle Solaris Cluster Manager

phys-schost# 提示符表示全局群集提示符。此操作过程适用于全局群集。

此过程提供了 Oracle Solaris Cluster 命令的长格式。此外,大多数命令还有短形式。这些命令除了名称长短的不同以外,其功能都是相同的。

  1. 在群集的任一节点上承担可提供 solaris.cluster.modify RBAC 授权的角色。
  2. 重置法定计数。
    # clquorum enable device
    device

    指定要重置的法定设备的 DID 名称,例如 d4

  3. 如果由于某个节点已处于维护状态而需要重置其法定计数,请重新引导该节点。
  4. 检验法定选票计数。
    # clquorum show +
示例 6-7  重新设置法定选票计数(法定设备)

以下示例将一个法定设备的法定计数重置为默认值并检验操作结果。

# 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

  • 使用 clquorum 命令可列出法定配置。
    % clquorum show +
示例 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 命令的长格式。此外,大多数命令还有短形式。这些命令除了名称长短的不同以外,其功能都是相同的。

  1. 删除要替换的作为法定设备的磁盘设备。

    注 - 如果要删除的设备是最后一个法定设备,则可能需要先添加另一个磁盘作为新的法定设备。此步骤可确保一旦在替换过程中出现故障,群集中仍存在有效的法定设备。有关添加新的法定设备的信息,请参见添加法定设备

    要删除作为法定设备的磁盘设备,请参见如何删除法定设备

  2. 更换磁盘设备。

    要更换磁盘设备,请参见硬件指南中针对磁盘盒的过程。另请参见Oracle Solaris Cluster 4.2 Hardware Administration Manual

  3. 将更换的磁盘添加为新的法定设备。

    要添加磁盘作为新的法定设备,请参见添加法定设备


    注 - 如果已在Step 1 中添加了其他法定设备,现在就可以放心地删除它了。要删除法定设备,请参见如何删除法定设备