StarWind Resource Library

StarWind iSCSI SAN & NAS: Providing HA Shared Storage for XenServer

Published: June 8, 2013

INTRODUCTION

 

CONFIGURING SHARED STORAGE

To configure shared storage:

1. Launch StarWind Management Console: Start -> All Programs -> StarWind Software -> StarWind.

Note: The StarWind Console icon appears in the system tray when the Console is running. To open StarWind Management Console, double-click the icon or right-click it and then select Start Management Console from the shortcut menu.

2. Select the server you want to provide with the iSCSI device from the Console tree. Double-click the host to connect.

Note: If you are prompted to enter login and password, specify “root” and “starwind”, relatively. These are the default login and password, but you can always change them later.

3. After connecting to StarWind Service, you can create devices and targets on the server. Open Add Device Wizard by one of the following ways:

• Select Add Device from the Target menu.

• Select Add Device from the Devices shortcut menu (right-click to open it).

4. Add Device Wizard appears. Please, follow the wizard’s steps to complete creation of a new HA device.

5. Select High Availability Device.

6. Click Next to continue.

7. Click Add to add a new host.

8. Specify partner server parameters. Enter the server IP-address in the Host text field. If needed, specify a username and password for StarWind Service in the corresponding text fields. Click OK.

9. Click Next to continue.

10. Specify the appropriate information in the Target Alias and Target Name text fields.

Note: The name must be unique. Under this name the device is declared to iSCSI initiators that are connected to StarWind Service over an IP network.

11. Click to specify a name and location of an HA virtual disk on the server. If you want to create a new virtual disk, select the Create New checkbox.

12. Click Next to continue.

13. Specify target and virtual disk parameters of the second node.

14. Click Next to continue.

15. Configure data synchronization and heartbeat channel parameters.

16. Click Next to continue.

Note: At least one Heartbeat channel must be separated from a Synchronization channel due to the availability considerations.

17. Specify cache parameters of the HA device.

18. Click Next to continue.

19. Select an initialization method of the HA device. Click Next to continue.

20. Check whether device parameters are correct. Click Back to make any changes.

21. Click Next to continue.

22. Click Finish to close the wizard.

 

CONFIGURING XENSERVER HOSTS

Creating a Pool

To create a pool:

1. Launch XenCenter.

2. Click New Pool. The Create New Pool window appears.

3. Specify name and description of the pool and click Add New Server.

4. In the Add New Server window specify the first XenServer host to be added to the pool as well as a user name and password.

5. Click Add.

6. Take the previous steps to add the second XenServer host to the pool.

7. Specify the Master.

8. Click Create Pool.

9. The XenCenter window should look as shown in the screenshot below.

 

Configuring Network Settings

To configure dedicated iSCSI networks:

1. Select the first XenServer host. Switch to the Networking tab.

2. Click Configure.

3. In the Management Interfaces window click Add IP address to add networks.

4. Configure IP address.

5. Click OK.

6. The window should look as shown in the screenshot below.

7. Select the second XenServer host. Switch to the Networking tab.

8. Click Configure.

9. In the Configure IP Addresses window click Add IP address to add networks.

10. Configure IP address.

11. Click OK. The window should look as shown on the screenshot below.

 

Applying Multipathing

To apply multipathing take the following actions for each XenServer in the pool:

1. Insert the following block into the defaults section of the /etc/multipath.conf:
defaults {
polling_interval 10
max_fds 8192
}

2. Insert the following block into the devices section of the /etc/multipath.conf:
device {
vendor “ROCKET”
product “IMAGEFILE”
path_selector “round-robin 0”
path_grouping_policy multibus
getuid_callout “/sbin/scsi_id -g -u -s /block/%n”
prio_callout none
path_checker readsector0
rr_min_io 100
rr_weight priorities
failback immediate
no_path_retry 5
}

3. Restart the multipath service:
service multipathd restart

4. Switch the XenServer host to Maintenance Mode: right-click the XenServer and select Enter Maintenance Mode from the shortcut menu.

5. Right-click the XenServer and select Properties from the shortcut menu.

6. Click Multipathing in the left pane. Select the Enable multipathing on this server checkbox.

7. Click OK.

8. Turn off the Maintenance Mode: right-click the XenServer and select Exit Maintenance Mode from the shortcut menu.

 

Configuring iSCSI Initiator

Perform the following actions on each XenServer :

1. Edit the /etc/iscsi/iscsid.conf file.
Set the following values:
node.session.iscsi.FirstBurstLength = 262144
node.session.iscsi.MaxBurstLength = 524288
node.conn[0].tcp.window_size = 524288
node.conn[0].startup = automatic

2. Restart the software iSCSI service:
service open-iscsi restart

3. Set the open-iscsi service to start the iSCSI Initiator automatically when you start XenServer:
chkconfig open-iscsi on

 

Adding Shared Storage

If you use XenServer 6.0 or its older versions, connect storage in the iSCSI Initiator before adding it:

1. Select а XenServer host. Switch to the Console tab in XenCenter.

2. Before creating the SR in XenCenter, connect the iSCSI targets through the console.
iscsiadm -m discovery -t st -p <SAN1IP:3260> | iscsiadm -m discovery -t st -p <SAN2IP:3260>
Example:
iscsiadm -m discovery -t st -p 172.16.1.58
iscsiadm -m discovery -t st -p 172.16.1.59
iscsiadm -m discovery -t st -p 172.16.2.58
iscsiadm -m discovery -t st -p 172.16.2.59

3. Connect the targets using their IQNs found by discovery:
iscsiadm -m node –loginall=all
iscsiadm -m node -T <iqn…> -p <IP:3260> -l,
Example:
iscsiadm -m node -T iqn.2008-08.com.starwindsoftware:172.16.1.58-xenstorage -p 172.16.1.58 -l
iscsiadm -m node -T iqn.2008-08.com.starwindsoftware:172.16.2.58-xenstorage -p 172.16.2.58 -l
iscsiadm -m node -T iqn.2008-08.com.starwindsoftware:172.16.1.59-xenstoragesecondnode -p 172.16.1.59 -l
iscsiadm -m node -T iqn.2008-08.com.starwindsoftware:172.16.2.59-xenstoragesecondnode -p 172.16.2.59 -l

4. Perform the 1-3 steps for the second XenServer host.

 

If you use XenServer 6.1, connect iSCSI targets while creating the SR:

1. Click New Storage on the Quick Launch panel in XenCenter.

2. In the New Storage Repository wizard select Software iSCSI as a type of storage to set up.

3. Click Next to continue.

4. Specify the name of the storage you are setting up.

5. Click Next to continue.

6. Perform the following steps:
1) Enter IP addresses of the StarWind servers (enter IP addresses with a comma and without spaces).
2) Click Discover IQNs.
3) In the Target IQN list select the item marked by an asterisk.
4) Click Discover LUNs.
5) Specify the necessary LUN.

7. Click Finish to add new storage repository.

8. XenServer will start storage repository (SR) scanning. When prompted to format the storage, click Yes to confirm. After formatting is complete and the SR is created, the storage will be added.