6.1. Exporting Data via iSCSI

Virtuozzo Storage allows you to export cluster disk space to external operating systems in the form of LUN block devices over iSCSI in a SAN-like manner.

In Virtuozzo Storage, you can create and run multiple iSCSI targets per Virtuozzo Storage cluster node. In turn, each iSCSI target can have multiple LUNs (virtual disks). At any given moment, each iSCSI target runs on a single node. If a node fails, iSCSI targets hosted on it are moved to and re-launched on a healthy node.

The figure below shows a typical network configured for exporting Virtuozzo Storage disk space over iSCSI.

../_images/stor_image34.png

In this example there are three hardware nodes working in a Virtuozzo Storage cluster. Two nodes host one iSCSI target each, while the third hosts two iSCSI targets. Each node has two network connections: one internal for cluster communication and one external for iSCSI exporting. Each iSCSI target has its own static IP address assigned from the datacenter network. The iSCSI network must be properly configured to run iSCSI targets. Each iSCSI target has a unique IP address from the iSCSI subnetwork different from the host IP address. So make sure you have a range of unused IP addresses for iSCSI targets.

6.1.1. Creating iSCSI Targets

Prerequisites:

  • Each iSCSI target must be assigned at least one unique IP address from DC network’s static pool.

  • The name of each iSCSI target must be unique in the Virtuozzo Storage cluster.

  • Virtuozzo Storage iSCSI targets support persistent reservations to allow iSCSI initiators obtain exclusive access to the specified target’s LUNs.

To create and start a target, do the following:

  1. On the SERVICES > iSCSI > Targets screen, click ADD TARGET.

  2. On the Add target panel, type a name for the new target in the Name field.

    ../_images/stor_image35.png
  3. In the node drop-down list, select a node on which the target will be located. The node must have the iSCSI role assigned to one of its network interfaces to appear in the list.

    Note

    Assigning the network role ISCSI automatically enables high availability for virtual machines, containers, and iSCSI targets on this node. For detailed information on high availability, refer to Managing High Availability Clusters.

  4. If necessary, check the Enable CHAP box and select an iSCSI user in the corresponding drop-down list (For more information on CHAP users, see Managing iSCSI Users).

  5. Click Add to specify one or more IP addresses for the target.

  6. If necessary, enable and specify IOPS and bandwidth limits for the target. If both limits are set, the first one that is hit is applied. Setting a limit value to zero disables the limit.

  7. Click Done to create the target.

The ISCSI target will be automatically started after creation and the initiators will be able to access the target via the specified IP address.

6.1.1.1. Performance Tips

  • Spread iSCSI targets evenly across nodes in the cluster. For example, ten nodes with one iSCSI target per each will perform better than a single node with ten iSCSI targets on it.

  • Fewer LUNs per more iSCSI targets will perform better than more LUNs per fewer iSCSI targets.

6.1.2. Listing, Stopping, and Deleting iSCSI Targets

On the iSCSI targets screen, you can list and manage all iSCSI targets and their LUNs, and display detailed information about specific iSCSI targets registered on a node.

To stop or delete an iSCSI target, select it on the iSCSI targets screen and click Stop or Delete, respectively. Doing so will disconnect the iSCSI initiator from the target. However, breaking the connection in such a way may result in I/O errors on the iSCSI initiator’s side.

6.1.3. Configuring iSCSI Targets

To configure an iSCSI target, do the following:

  1. On the SERVICES > iSCSI > Targets screen, select the necessary target and click Configure.

  2. On the Configure target screen, specify the necessary parameters.

    ../_images/stor_image36.png
  3. Click Done.

6.1.3.1. Listing LUNs

In Virtuozzo Storage, each iSCSI target can have multiple LUNs (virtual disks or volumes). You can list the LUNs of a target and iSCSI initiators that are currently connected.

To list the LUNs, open the SERVICES > iSCSI > Targets screen, select a target and click a link in the LUNs column.

To list the initiators that are currently connected to iSCSI targets, open the INITIATORS tab on the same screen.

6.1.3.2. Adding LUNs

To add a LUN to an iSCSI target, do the following:

  1. On the SERVICES > iSCSI > Targets screen, select the necessary target and click a link in the LUNs column.

    ../_images/stor_image37.png
  2. To add a new LUN to the list, click ADD LUN.

    ../_images/stor_image38.png
  3. On the Add LUN screen, select the LUN’s number from the drop-down list.

  4. In the LUN Size field, specify the size of the LUN in GB; select a tier from the drop-down list to the right. For more information on tiers, see Understanding Storage Tiers.

  5. From the Failure domain drop-down list, choose a placement policy for replicas. For more details, see Understanding Failure Domains.

  6. Choose a data redundancy mode. For more details, see Understanding Data Redundancy.

  7. Click Done.

6.1.3.3. Configuring LUNs

To configure a LUN of an iSCSI target, do the following:

  1. On the SERVICES > iSCSI > Targets screen, stop the target to which the LUN belongs.

  2. Click a link in the target’s LUNs column.

  3. On the Configure LUN screen, specify the LUN size in the corresponding field.

  4. Click Done.

6.1.3.4. Deleting LUNs

To delete a LUN, do the following:

  1. On the SERVICES > iSCSI > Targets screen, select the necessary target and click a link in the LUNs column.

  2. Select the necessary LUN in the list and click Delete.

6.1.4. Managing iSCSI Users

6.1.4.1. Creating CHAP Accounts for iSCSI Targets

To create a CHAP account, do the following:

  1. On the SERVICES > iSCSI Users screen, click Add user.

  2. Specify login, password, and, if necessary, a description for the account. The password should be 12 to 16 characters long for Windows clients to be able to establish connections.

    ../_images/stor_image39.png
  3. Click Done.

The newly created CHAP user account will be listed on the iSCSI Users screen.

6.1.4.2. Creating iSCSI Targets Bound to CHAP Accounts

To create a Virtuozzo Storage iSCSI target bound to a CHAP account, do the following:

  1. On the SERVICES > iSCSI > Targets screen, select an iSCSI target and click Configure.

  2. On the Configure target screen, check Enable CHAP and/or Enable mutual CHAP and select users in the corresponding drop-down lists. If you enable CHAP, the target will authenticate the initiator. If you enable mutual CHAP, the initiator will authenticate the target. These options can be enabled in any combination.

    ../_images/stor_image40.png
  3. Click Done.

6.1.4.3. Changing CHAP Account Passwords

To change the password of a CHAP account, do the following:

  1. On the SERVICES > iSCSI Users screen, select a user and click Configure.

  2. In the Password section on the Configure user screen, click change.

    ../_images/stor_image41.png
  3. Type a new password in the corresponding field and click Done. The password should be 12 to 16 characters long for Windows clients to be able to establish connection.

The new password will become active after target reboot.