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
}
Enable Multipathing for discovered devices:
CLI
[15:09 XenMain ~]# xe host-list
uuid ( RO) : 0437721f-5a26-4e3d-a677-8300a803c667
name-label ( RW): XenMain
name-description ( RW): Default install
[15:29 XenMain ~]# xe host-param-set uuid=0437721f-5a26-4e3d-a677-8300a803c667 multipathing=true
GUI
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
Adding iSCSI Storage from Storone
As of the creation of this document XCP-ng's latest version is 8.3. There has been information stating that block volumes utilizing 4k sector sizes would be supported in this release but our testing has shown some problems with using 4k sector size volumes. As a result it is recommended that you create volumes using a 512b sector size much as is required by VMware.
StorONE Configuration
Information on creation volumes is detailed on our documentation site. Some of the pages such as: StorONE 3.8 - Create Volumes or contained within StorONE 3.8 Documentation - Web Application Interface
Some of the key details you will need are the initiator IQN from the XCP-ng server. This will either be the alias you created before or you can locate the information from the server using the following commands:
[15:08 XenMain ~]# xe host-list
uuid ( RO) : 0437721f-5a26-4e3d-a677-8300a803c667
name-label ( RW): XenMain
name-description ( RW): Default install
[15:09 XenMain ~]# xe host-param-get uuid=0437721f-5a26-4e3d-a677-8300a803c667 param-name=other-config
agent_start_time: 1736278074.; boot_time: 1736278002.; rpm_patch_installation_time: 1736261703.129; iscsi_iqn: iqn.2025-01.XenMain
In the above example you are using the UUID
of the host to query the "other-config
" to display the IQN. This is what you will use for configuring the IQN in the HOST section of the StorONE software.
GUI
As seen above: Under Application/Volumes -> Hosts -> Create provide the name of your server and the IQN we discovered earlier.
if you hit tab or leave the IQN field to hit submit the other two fields will be removed from the screen. Just hit submit to create the HOSTS entry
Now you can use create the volume using the Volume Creation Wizard at the top of the UI
And when it comes time to Map the volume you can use the new host you just created and provide a LUN ID.
CLI
From the s1cli we can create the hosts entry and the volume by doing the following:
Mini01> hosts create XenMain --iqn iqn.2025-01.XenMain
Mini01> applications volumes create --application XenServer --volume SRexample --capacity 250G --n 2 --k 1 --pool SSD
Mini01> applications mappings add --application XenServer --volumes SRexample --hosts XenMain --lunIds 7
You should now have a LUN available to mount on the XCP-ng Server