Creating target groups

Prerequisites

  • The storage cluster has at least one disk with the Storage role.

To create a target group

Admin panel

  1. Open Storage services > Block storage > Target groups, and then click Create target group. The Create target group wizard will open.
  2. On Name, enter a name for the iSCSI target group.

  3. On Nodes, select nodes to add to the target group. On these nodes, iSCSI targets will run. You can only choose nodes with network interfaces that are assigned the iSCSI traffic type. It is recommended to have at least two nodes in the target group to achieve high availability. If you plan to use multiple iSCSI initiators, you should have as many nodes in the target group. The optimal way is to create a single target per node.

    If the node network interfaces are not configured, click the cogwheel icon, select the networks as required, and then click Apply.

  4. On Targets, select iSCSI interfaces to add to the target group. You can choose from a list of network interfaces that are assigned the iSCSI traffic type. If you plan to use multiple iSCSI initiators, you should select as many interfaces per node. One interface can be added to multiple target groups, although it may reduce performance.

  5. On Volumes, select volumes to attach to target group LUNs. You can select from a list of volumes that are not attached to any target groups. If no volumes are available, you can create them on this step so they are attached to the target group automatically, or attach them manually later.

  6. On Access control, configure access to the target group. It is recommended to use CHAP or ACL in untrusted public networks. Without access control, any connections to the target group are allowed.

  7. On Summary, review the target group details. You can go back to change them if necessary. Click Create.

The created target group will appear on the Target groups tab. Its targets will start automatically.

Command-line interface

Use the following command:

vinfra service block-storage target-group create --type <type> --target <name:node:ip1,ip2...> <name>
--type <type>
Type of targets in the target group: iscsi or fc.
--target <name:node:ip1,ip2...>
Target name, node ID or hostname, and the IP addresses of the node network interfaces assigned the iSCSI traffic type
<name>
Target group name

For example, to create the target group tg1 with two iSCSI targets target1 and target2 that will run on the node node001 with the IP address 10.10.10.11 and on the node node002 with the IP address 10.10.10.12, run:

# vinfra service block-storage target-group create tg1 --type iscsi --target target1:node001:10.10.10.11 \
--target target2:node002:10.10.10.12

The created target group will appear in the vinfra service block-storage target-group list output:

# vinfra service block-storage target-group list
+--------------------------------------+------+-------+-------+---------+
| id                                   | name | type  | state | running |
+--------------------------------------+------+-------+-------+---------+
| 1b661da7-cb4d-4b81-9f09-f8ad54fa631e | tg1  | iscsi | ok    | False   |
+--------------------------------------+------+-------+-------+---------+