Connecting a VMware ESXi host to StorPool iSCSI

When a StorPool volume needs to be accessed by hosts which cannot run the StorPool client service (e.g., VMware hypervisors), it may be exported using the iSCSI protocol.

1. Short Overview of iSCSI

The iSCSI remote block device access protocol is a client-server protocol allowing clients (referred to as “initiators” or “hosts”) to read and write data to logical disks (referred to as “targets”) exported by iSCSI servers. The iSCSI servers listen on portals (TCP ports, usually 3260, on specific IP addresses); these portals can be grouped into the so-called portal groups (also identified by a TCP port and IP address) to provide fine-grained access control or load balancing for the iSCSI connections.

A short summary of the terms:

  • IQN - unique text identifier, used by initiators and targets;

  • Initiator - a client for the iSCSI protocol, identified by an IQN;

  • Target - a logical SCSI storage device, which provides one or more LUNs;

  • Portal - iSCSI network endpoint for targets, identified by IQN, IP address and TCP port;

  • Portal group - iSCSI network endpoint that handles the load-balancing and access-control to the portals, identified by IQN, IP address and TCP port;

The StorPool implementation of iSCSI provides portal groups to the initiators. The configuration is done via StorPool’s CLI and is described in the configuration chapter down below.

2. How does iSCSI function in StorPool

The StorPool implementation of iSCSI:

  • provides a way to mark StorPool volumes as accessible to iSCSI initiators;

  • defines iSCSI portals where the nodes running the StorPool iSCSI service listen for connections from initiators;

  • defines portal groups over these portals;

  • exports StorPool volumes (iSCSI targets) to iSCSI initiators in the portal groups.

To simplify the configuration of the iSCSI initiators, and also to provide load balancing and failover, each portal group has at least one floating IP address that is automatically brought up on only a single StorPool node at a given moment; the initiators are configured to connect to this floating address, authenticating if necessary, and then are redirected to the portal of the StorPool node that actually exports the target (volume) that they need to access.

In the simplest setup, there is a single portal group with a floating IP address and a single portal for each StorPool node that runs the iSCSI service. All the initiators connect to the floating IP address and are redirected to the correct node. For quality of service or fine-grained access control, more portal groups may be defined and some volumes may be exported via more than one portal group.

3. Configuring the StorPool iSCSI target

For a detailed configuration of StorPool iSCSI, please refer to the 10.15.  iSCSI section of our User Guide.

3.1. Configuring a VMware ESXi host

Once the StorPool iSCSI target volume has been exported, it is time to connect the initiator. This action needs special privilege and iSCSI connectivity configured.

More details in the official VMware Docs

Login to VMware vSphere web-client as administrator.

Procedure:

  1. Browse to the host in the vSphere Web Client navigator.

  2. Click the ConfigureStorage Adapters → select vmhba# and configure.

  3. Under Adapter Details, click the Targets tab.

  4. Configure the Dynamic Discovery method. Dynamic DiscoveryAdd.. → enter IP address or DNS name of the Storpool iSCSI system and click OKRescan the iSCSI adapter

Note

If the iSCSI target is not visible under iSCSI Server Location, check the connectivity between the VMware ESXi host and the StorPool iSCSI portal.

After the iSCSI Server Location is visible under Dynamic Discovery, close the window, navigate to datastoreSelect Storage → click new datastore.

  1. Select Type as VMFS → Next

  2. Name and device selection → enter datastore name and select the host → Select the LUN to proceed → Next.

  3. Select the VMFS version (Select latest version unless you specific reason to select the older one) → Next.

  4. Partition configuration Use whole disk and go with default block size → Next.

  5. Click Finish to create the new datastore.

Note

Once a Datastore is available, virtual hard disks of VMs may be stored on it, thus utilizing the StorPool iSCSI service.

Note

After a new datastore has been created, some time is required before it comes online and becomes active.