Skip to main content

XCP-ng Best Practice Guide <WIP>

Summary

This Best Practice Guide will instruct users on how to do the initial configuration of the Xen Cloud Platform - Next Generation (XCP-ng) to be successful when connecting to StorONE iSCSI Block Storage.

Introduction

These instructions and procedures were created while working with StorONE 3.8.0.56 and XCP-ng 8.3

XCP-ng configuration modifications

Multipath Configuration

As with most Linux Based Initiators it is highly recommended that definitions for the StorONE block devices be added to the multipath configuration.  With XCP-ng the recommendation is to NOT change the default multipath.conf but to modify a custom configuration file that the multipathd service will employ.  

Using an editor of your choosing create the following file: /etc/multipath/conf.d/storone.conf and put the following entities in that file:

defaults {
    find_multipaths             yes
    path_selector               "round-robin 0"
    path_grouping_policy        multibus
    no_path_retry               30
    max_sectors_kb              1024
    queue_without_daemon        no
    max_fds                     max
    flush_on_last_del           yes
    log_checker_err             once
}

devices {
  device {
    vendor                      "STORONE*"
    product                     "S1*"
    detect_prio                 yes
    prio                        "alua"
    path_selector               "queue-length 0"
    path_grouping_policy        group_by_prio
    failback                    immediate
    path_checker                tur
  }

iSCSI Configuration

iSCSId modifications

StorONE recommends making the following modifications in the file /etc/iscsi/iscsid.conf :

node.session.timeo.replacement_timeout = 10
node.conn[0].timeo.noop_out_interval = 5
node.conn[0].timeo.noop_out_timeout = 10
node.session.nr_sessions = 4
node.session.queue_depth = 64
node.session.cmds_max = 256

(The above representation does not necessarily the order in the file)

Initiator IQN alias (optional)

The default is a random string of characters.  In order to make it more unique and locatable you can set an alias to use with the storage. 

xe host-param-set uuid=<your UUID> other-config:iscsi_iqn=iqn.2025-01.XenMain

(The UUID will autofill by using tab completion.  The iqn name can be whatever you want as long as it starts with iqn. )

Networking Configuration

If you are using JUMBO frames you will need to modify the MTU of the physical device.  It is also recommended that you use a dedicated interface and subnet for your iSCSI connections.  

MTU

In order to modify the MTU you need to location the network-uuid of the device you intend to use for iSCSI traffic.  Below is an example of the output showing eth7's information:

[09:10 XenMain iscsi]# xe pif-list

uuid ( RO)                  : 55f80088-f587-882a-2345-f78d782ad048
                device ( RO): eth7
                   MAC ( RO): 3c:ec:ef:da:97:15
    currently-attached ( RO): true
                  VLAN ( RO): -1
          network-uuid ( RO): 4cdc2eee-6e0b-1175-89a6-7f121779ab76
             host-uuid ( RO): 0437721f-5a26-4e3d-a677-8300a803c667

(the output has been truncated for this document)

Using the network-uuid from the output of xe pif-list you can use the following command to change the MTU to use JUMBO frames:

[09:19 XenMain iscsi]# xe network-param-set uuid=4cdc2eee-6e0b-1175-89a6-7f121779ab76 MTU=9000

You can verify this by checking with ip a or checking via the xe commands:

[09:22 XenMain iscsi]# xe network-param-get uuid=4cdc2eee-6e0b-1175-89a6-7f121779ab76 param-name=MTU
9000
Static IP for the interface:

To set the static IP on the proper device we are going to use the same output from xe pif-list that was used when we set the MTU.  This time we are going to use the UUID :

[09:23 XenMain iscsi]# xe pif-reconfigure-ip uuid=55f80088-f587-882a-2345-f78d782ad048 IP=10.10.0.121 netmask=255.255.255.0 mode=static