Sun Cluster 系统管理指南(适用于 Solaris OS)

Procedure如何添加 Sun NAS 法定设备

要完成此过程,请使用磁盘驱动器的设备 ID (Device ID, DID) 来标识该设备(设备 ID 由节点共享)。使用 cldevice show 命令可查看 DID 名称列表。有关其他信息,请参阅 cldevice(1CL) 手册页。


注 –

Sun Cluster 仅支持双节点群集配置中的 Sun NAS 法定设备。


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

此过程提供了 Sun Cluster 命令的长格式。此外,大多数命令还有简短格式。这些命令除了名称长短的不同以外,其功能都是相同的。有关命令及其简短格式的列表,请参见附录 B

  1. 使用 Sun NAS GUI 设置 Sun NAS 文件管理器上的 iSCSI 设备。

    1. 创建一个大小约为 50 MB 的文件卷。


      File Volume Operations -> Create File Volume
    2. 对于每个节点,创建一个 iSCSI 访问列表。


      iSCSI Configuration -> Configure Access List
      1. 将群集的名称用作 iSCSI 访问列表的名称。

      2. 将每个群集节点的启动器节点名称添加到访问列表中。无需 CHAP 和 IQN。

    3. 配置 iSCSI LUN


      iSCSI Configuration -> Configure iSCSI LUN

      可以将后备文件卷的名称用作 LUN 的名称。将每个节点的访问列表添加到 LUN 中。

  2. 在每个群集节点上,搜索 iSCSI LUN 并将 iSCSI 访问列表设置为静态配置。


    # iscsiadm modify discovery -s enable
    
    	# iscsiadm list discovery
    	Discovery:
    	        Static: enabled
    	        Send Targets: disabled
    	        iSNS: disabled
    
    	#  iscsiadm add static-config iqn.LUNName,IPAddress_of_NASDevice
    # devfsadm -i iscsi
    # cldevice refresh
    
  3. 从一个群集节点上,为 iSCSI LUN 配置 DID。


    # /usr/cluster/bin/scgdevs
  4. 在群集的任意一个节点上,成为超级用户或使用一个可提供 solaris.cluster.modify RBAC 授权的角色。

  5. 启动 clsetup 实用程序。


    # clsetup
    

    屏幕上将显示 clsetup 主菜单。

  6. 键入与 "Quorum" 选项对应的编号。

    将显示 "Quorum" 菜单。

  7. 键入与添加法定设备的选项对应的编号,然后在 clsetup 实用程序提示您确认要添加的法定设备时键入 yes

    clsetup 实用程序将询问您要添加哪种类型的法定设备。

  8. 键入与共享磁盘法定设备选项对应的编号。

    clsetup 实用程序将询问您要使用哪个全局设备。

  9. 键入您正在使用的全局设备。

    clsetup 实用程序将提示您确认将新的法定设备添加到指定的全局设备中。

  10. 键入 yes 继续执行添加新法定设备的操作。

    如果成功添加了新的法定设备,clsetup 实用程序会为此显示一条相应的消息。

  11. 检验是否已添加法定设备。


    # clquorum list -v
    

示例 6–2 添加 Sun NAS 法定设备

以下示例显示了当 clsetup 添加 Sun NAS 法定设备时所生成的 clquorum 命令和检验步骤。


Add an iSCSI device on the Sun NAS filer.
Use the Sun NAS GUI to create a file volume that is approximately 50mb in size.
File Volume Operations -> Create File Volume
For each node, create an iSCSI access list.
iSCSI Configuration -> Configure Access List
Add the initiator node name of each cluster node to the access list.
*** Need GUI or command syntax for this step. ***
Configure the iSCSI LUN
iSCSI Configuration -> Configure iSCSI LUN
On each of the cluster nodes, discover the iSCSI LUN and set the iSCSI access list to static configuration.
iscsiadm modify discovery -s enable
iscsiadm list discovery
Discovery:
   Static: disable
   Send Targets: enables
   iSNS: disabled
iscsiadm add status-config
iqn.1986-03.com.sun0-1:000e0c66efe8.4604DE16.thinquorum,10.11.160.20
devsadm -i iscsi
From one cluster node, configure the DID devices for the iSCSI LUN.
/usr/cluster/bin/scgdevs
/usr/cluster/bin/scgdevs
Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on any cluster node.

[Start the clsetup utility:]
# clsetup
[Select Quorum>Add a quorum device]
[Answer the questions when prompted.]
[You will need the following information.]
  [Information:                           Example:]
  [Directly attached shared disk device   shared_disk]
  [Global device		                      d20

[Verify that the clquorum command was completed successfully:]
 clquorum add d20
 
    Command completed successfully.
[Quit the clsetup Quorum Menu and Main Menu.]
[Verify that the quorum device is added:]
# clquorum list -v
 
Quorum         Type
-------         ----
d20             shared_disk
scphyshost-1    node
scphyshost-2    node