Configuring iSCSI in XenServer
- Check that related software has been installed in the host system.
By default, iSCSI software is automatically installed during XenServer installation. You can confirm by running the following command:
[root@xenserver-gvvkoyew ~]# rpm -qa|grep iscsi open-iscsi-2.0.871-0.20.3.xs743 [root@xenserver-gvvkoyew ~]#
Currently, the XenServer installation CD/DVD-ROM does not provide the independent iSCSI software package.
- Configure the IP address for the storage system.
The supported IP protocols vary with the storage system version. Specify the IP protocol based on the actual storage system version and application scenario.
Observe the following rules when configuring IP addresses for the iSCSI ports of the storage system:
- The IP address of the iSCSI host port cannot reside on the same network segment as the IP address of the management network port.
- The IP address of the iSCSI host port cannot reside on the same network segment as the IP address of the heartbeat network port.
- The IP addresses of the iSCSI host ports of the same controller must reside on different network segments. In some storage systems of the latest versions, IP addresses of iSCSI host ports on the same controller can reside on the same network segment. However, this configuration is not recommended.
Read-only users cannot modify the IP addresses of iSCSI host ports.
Modifying an IP address will interrupt services running on the host port.
The following describes how to configure the IPv4 address for a storage system:
- Configure the IP address on a host.
- View the XenCenter network configuration.
In the left navigation tree of XenCenter, select the server to be configured, and click Networking on the right pane.
Figure 4-342 shows the existing network configuration.
Determine the network port for connecting to the storage system, for example, Network 2 shown in Figure 4-342.
- Configure the IP address of the network port.
In the window shown in Figure 4-342, click Configure. The IP address configuration dialog box shown in Figure 4-342 is displayed.
Figure 4-343 IP address configuration dialog boxBy default, only IP address information of the XenServer management network port is displayed. Click Add IP address in the left pane to display the IP address configuration page.
The following describes the meanings and configurations of the parameters shown in Figure 4-344.
- Name: indicates the network name, which can be set based on the usage of the network port.
- Network: indicates the network port. Select the network port for which you want to set the IP address. Refer to the names shown in Figure 4-342.
- IP address: indicates the IP address of the network port. Enter a value based on the actual situation.
- Subnet mask: indicates the subnet mask of the network port. Enter a value based on the actual situation.
- Gateway: indicates the gateway of the network port. Enter a value based on the actual situation.
After setting the parameters, click OK. Figure 4-345 shows an example of the configured information.
The IP address configuration for the host system is complete.
- View the XenCenter network configuration.
- Discover and use LUNs.
Before proceeding, ensure that network connectivity between the host and storage systems is normal.
The following describes how to discover storage targets from the host system. Ensure that the storage system can also discover the initiator on the host.
The following operations apply to XenServer 6.0 and later versions and differ slightly from those on earlier versions.
Log in to XenCenter and perform the following in sequence:
- Add a storage resource.
Click New Storage.
Figure 4-346 New Storage - Select a connection mode.
Select a mode for the connection between the host and storage systems.
Figure 4-347 Selecting an iSCSI connection mode - Name the storage repository.
Name the storage to be obtained by this connection.
Figure 4-348 Naming the storage repositoryThis example uses "storage model + connection mode + LUN ID" as the naming format.
Click Next.
- Discover targets.
Enter the IP address configured on the storage system. If the storage system uses CHAP, you also need to configure CHAP information. In addition, CHAP information also needs to be configured on the storage system (see the next step).
Figure 4-349 Configuring storage system information on the hostXenServer 6.0 and later versions support input of multiple target host IP addresses, which are separated by comma.
However, even if multiple IP addresses are entered, only one connection will be established in the end. The result is the same as entering a single IP address.
Therefore, entering a single IP address is recommended.
Confirm the input and click Discover IQNs. The host starts discovering targets on storage systems.
The formats of the targets found may be incorrect.
Ensure that the format is "Target name (IP address:3260)" or "* (IP address:3260)".
Sometimes the format is displayed as "Target name:Port number:IP address (IP address:3260)", which may cause the host to fail to discover LUNs on the storage. If the format is incorrect, click Discover IQNs until the displayed format is correct.
- Configure host information on the storage system.
After the preceding operations are complete, the storage management software will display the host initiator information.
Perform the following steps to configure host information on the storage management software. The operations include:
1. Create a host group.
2. Create a host. The host type is XenServer.
3. Create a LUN and assign it to the created host.
4. Add the discovered initiator to the host. See Figure 4-351.
If multiple paths are used and the storage system supports ALUA, enable ALUA.
If only a single path is used or the storage system does not support ALUA, you do not need to enable ALUA.
If CHAP authentication is required between the host and storage systems, perform the operations described in section 7.4. Otherwise, proceed with the next step.
- Discover LUNs in the storage system.
In the window shown in Figure 4-350, click Discover LUNs. The host discovers LUNs mapped from the storage system.
Figure 4-352 Discovered LUNs - Select a LUN.
Select the LUN to be used, for example, LUN 0. Click Finish. In the displayed dialog box shown in Figure 4-353, click Yes.
LUN discovery and configuration are complete.
- Add a storage resource.
- Configure CHAP information in the storage system.