VSA iSCSI Configuration

From OSNEXUS Online Documentation Site
Jump to: navigation, search

This section outlines how to setup QuantaStor as a virtual machine a.k.a. Virtual Storage System (VSS) so that you can deliver dedicated virtual systems to your internal customers. VSS's can get their storage from DAS in the server where the VM is running or via NAS or SAN storage. In this section we'll go over how to configure a VSS to get storage over iSCSI which it can then utilize to create a pool of storage for sharing out over SAN/NAS protocols.

Configuring Your SAN for the VSS

You can use SAN storage from any physical storage system (QuantaStor, EqualLogic, etc) with your VSS and the configuration steps will vary according to the vendor. Also, for the purposes of this article we'll call the physical storage system (PSA) that's delivering storage to the VSS a physical storage system or PSA for short.

Configuration Summary

Assuming you're using QuantaStor for your PSA you'll need to create a Storage Volume, add a Host entry for the VSS and then assign the storage to the IQN of the VSS. Within the VSS we'll also need to setup the iSCSI initiator software, configure it, then set it up to automatically login to your QuantaStor PSA at boot time.

Installing the iSCSI Initiator service on the VSS

We're assuming that you have a VSS setup and booted at this point but have not yet created any storage pools because there's no storage yet delivered from the PSA to the VSS. So the first step is to install the open-iscsi initiator tools like so:

sudo apt-get install open-iscsi

Next you'll need to check to see what the IQN is for your VSS by running this command:

more /etc/iscsi/initiatorname.iscsi

The IQN will look something like this:


You can use that IQN as-is or modify this to make an IQN that better identifies your VSS system if you like but this is optional. For this example we'll use this as the VSS's initiator IQN:


Adding a Host entry for the VSS into the PSA

The IQN we set for the VSS is 'iqn.2012-01.com.quantastor:qstorvsa001' in this example and we'll need to add this to a new host entry in the PSA so that we can assign storage to the VSS from the PSA. In your QuantaStor system just select the Hosts section then right-click, choose 'Add Host' and add host with its IQN. Once the Host entry has been added for the VSS you'll need to assign a storage volume to it. We'll next use the iSCSI initiator on the VSS to login to the PSA so that the VSS can consume that storage volume.

If you're having trouble getting the PSA configured remember that within the QuantaStor web management screen there's a 'System Checklist' button in the toolbar that will walk you through all of these configuration steps.

Logging into the PSA target storage volume from the VSS

Now that the tools are installed, you've created a Storage Volume in the PSA, and assigned it to the VSS host entry in the PSA you can now login to access that storage. The easy way to do this is to run this command but substitute the IP address with the IP address of the PSA:

iscsiadm -m discovery -t st -p

This will have output that looks something like this:,1 iqn.2009-10.com.osnexus:cd4c0fb9-bddfb4774939e62a:volume0

To login to all the volumes you've assigned to the VSS you can run this simple command:

iscsiadm -m discovery -t st -p --login

The output from that command looks like this:,1 iqn.2009-10.com.osnexus:cd4c0fb9-bddfb4774939e62a:volume0
Logging in to [iface: default, target: iqn.2009-10.com.osnexus:cd4c0fb9-bddfb4774939e62a:volume0, portal:,3260]
Login to [iface: default, target: iqn.2009-10.com.osnexus:cd4c0fb9-bddfb4774939e62a:volume0, portal:,3260]: successful

You have now logged into the storage volume on the PSA and your VSS now has additional storage it can access to create storage pools from which it can in turn deliver iSCSI storage volumes, network shares and more.

Verifying that the Storage is Available

To verify that the storage is available you can run this command which will show you that your VSS now has a QuantaStor device attached:

more /proc/scsi/scsi

Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: VBOX     Model: CD-ROM           Rev: 1.0
  Type:   CD-ROM                           ANSI  SCSI revision: 05
Host: scsi4 Channel: 00 Id: 00 Lun: 00
  Vendor: OSNEXUS  Model: QUANTASTOR       Rev:  300
  Type:   Direct-Access                    ANSI  SCSI revision: 06

Importing the Storage into QuantaStor

Now that the storage has arrived to the system you'll need to use the 'Scan for Disks...' dialog within your QuantaStor VSS to make the storage appear. Once it appears you can create a storage pool out of it and start using it.

Persistent Logins / Automatic iSCSI Login after Reboot

Last but not least you'll need to setup your VSS so that it connects to the PSA automatically at system startup. The easist way to do this is to edit the /etc/iscsi/iscsid.conf file to enable automatic logins. The default is 'manual' so you'll need to change that to 'automatic' so that it looks like this:

# Startup settings

# To request that the iscsi initd scripts startup a session set to "automatic".
node.startup = automatic

Alternatively you could script a line in your /etc/rc.local file to login just as you did above to initially setup the VSS:

iscsiadm -m discovery -t st -p --login

XenServer NIC Optimization

For those using XenServer you may see a nice boost in performance by replacing the default Realtek driver with the E1000 driver which has 1GbE support. Have a look at this article over at www.netservers.co.uk which outlines the hack.


If you had problems with the above you might try restarting the iSCSI initiator service with 'service iscsi-network-interface restart'. Do not restart the 'iscsi-target' service as that's the service that's serving targets from your VSS out to the hosts consuming the VSS storage. Note also that if you restart the 'iscsi-target' service by mistake you'll need to restart the 'quantastor' service to re-expose the iSCSI targets for that system.