Connecting remote iSCSI devices to cluster nodes

Virtuozzo Hybrid Infrastructure allows you to connect remote iSCSI devices to nodes and perceives their LUNs as storage disks. You can connect iSCSI devices to nodes at any time.

After the iSCSI device is connected to a cluster node, you need to assign the Storage disk role to all its LUNs. Even though you can assign the Metadata or Cache roles to such disks, it is only supported for single-node installations of backup storage with SAN-provided redundancy.

Limitations

  • Remote iSCSI devices are only supported for backup storage. All other services, including the compute service, do not support remote iSCSI devices.
  • iSCSI targets can only be used for storage if they have synchronous writes enabled.
  • Remote iSCSI devices cannot be attached to hosts that belong to iSCSI target groups.
  • Only one IQN can be used per node. You can connect multiple iSCSI targets by using other cluster nodes.
  • An iSCSI IQN name may contain only lowercase letters, numbers, periods, colons, and dashes. Allowed characters for iSCSI names are described in String Profile for iSCSI Names.

Prerequisites

  • If you have restricted outbound traffic in your cluster, you need to manually add a rule that will allow outbound traffic on the specified port, as described in Configuring outbound firewall rules.

To connect a remote iSCSI device to a node

Admin panel

  1. On the Infrastructure > Nodes screen, click the required node name. On the Disks tab, click iSCSI target.

  2. In the Remote iSCSI Target window:

    1. Specify the IQN of the target.
    2. In the Portal and Port fields, specify the target’s IP address and, optionally, specify a port number.
    3. To enable CHAP authentication for the target, select CHAP authentication and specify the credentials.

    4. Click Connect.

The target will be connected and all of its LUNs will be initiated. Devices of the iSCSI type will appear in the node’s Disks list.

If you add another LUN to a connected target, rescan it by running iscsiadm -m node -R in the host’s console.

Command-line interface

Use the following command:

vinfra node iscsi target add [--auth-username <auth-username>] [--auth-password <auth-password>]
                             --portal <portal> --node <node> <target-name>
--auth-username <auth-username>
User name
--auth-password <auth-password>
User password
--portal <portal>
Portal IP address in the format IP:port (this option can be specified multiple times)
--node <node>
Node ID or hostname
<target-name>
Target name

For example, to connect the iSCSI target iqn.2014-06.com.vstorage:target1 with the IP address 172.16.24.244 and port 3260 to the node node003, run:

# vinfra node iscsi target add iqn.2014-06.com.vstorage:target1 --portal 172.16.24.244:3260 --node node003

To assign disk roles to iSCSI LUNs

Admin panel

  1. Select a disk with the iSCSI type, and then click Assign.
  2. In the Choose role window, select Storage, and then click Done.
  3. Repeat the above steps for every disk with the iSCSI type.

Command-line interface

Use the following command:

vinfra node disk assign --disk <disk>:<role>[:<key=value,…>] [--node <node>]
--disk <disk>:<role> [:<key=value,…>]

Disk configuration in the format:

  • <disk>: disk device ID or name
  • <role>: disk role (cs, mds, journal, mds-journal, mds-system, cs-system, system)
  • comma-separated key=value pairs with keys (optional):
    • tier: disk tier (0, 1, 2 or 3)
    • journal-tier: journal (cache) disk tier (0, 1, 2 or 3)
    • journal-type: journal (cache) disk type (no_cache, inner_cache or external_cache)
    • journal-disk: journal (cache) disk ID or device name

    • bind-address: bind IP address for the metadata service

Example: sda:cs:tier=0,journal-type=inner_cache.
This option can be used multiple times.

--node <node>
Node ID or hostname (default: node001.vstoragedomain)

For example, to assign the storage role to the iSCSI disk sde, run:

# vinfra node disk assign --disk sde:cs:tier=0 --node node003

To remove an iSCSI target

Admin panel

  1. On the Infrastructure > Nodes screen, click the required node name. On the Disks tab, click iSCSI target.
  2. In the Remote iSCSI Target window, click Delete connection, and then click Delete to confirm.

Command-line interface

Use the following command:

vinfra node iscsi target delete --node <node> <target-name>
--node <node>
Node ID or hostname
<target-name>
Target name

For example, to disconnect the iSCSI target iqn.2014-06.com.vstorage:target1 from the node node003, run:

# vinfra node iscsi target delete iqn.2014-06.com.vstorage:target1 --node node003