Frequently Asked Question

Storage: How to create and use the iSCSI target service on a QNAP Turbo NAS?
Last Updated 9 years ago

"A quick, efficient and cheap method of implementing network storage solutions"


What is iSCSI and its benefits?

image
iSCSI (Internet Small Computer System Interface) is an IP-based (Internet Protocol) storage networking standard for linking data storage facilities. By carrying SCSI commands over IP networks, iSCSI is used to facilitate data transfer over intranets and to manage storage over long distances. iSCSI can be used to transmit data over LAN (Local Area Networks), WAN (Wide Area Networks) or the Internet and can enable location-independent data storage and retrieval. (quoted from Wikipedia)

When designing their storage infrastructure, SMBs (Small to Medium Businesses) tend to seek a budget-friendly, all-in-one storage solution that can be easily expanded. With the iSCSI service on a QNAP Turbo NAS it can instantly serve as your storage expansion or backup destination for application servers (such as database server, mail server, or for backups). This article demonstrates how you can use the iSCSI target service on Turbo NAS for storage expansion by using different operating systems.
 image

Things to know before starting

In this document, your computer is called an "initiator" because it initiates the connection to the device, which is called a "target".

image Please note: It is NOT recommended to connect to the same iSCSI target using two different clients (iSCSI Initiators) at the same time. This may lead to data loss or damage to the disk.

Create an iSCSI target volume

Log in to your Turbo NAS, go to "iSCSI" > "iSCSI Storage" > "Create" to create a new iSCSI target.
 image

Refer to the below images to input the required information to create the iSCSI target.
 image

 image
Enter a name for your target.
 image
This is an optional step to enable authentication. Using authentication is strongly recommended if the Turbo NAS uses a public or open network.
 image

Choose to create an image file on a volume or to allocate space from a storage pool for the iSCSI LUN. The former offers greater flexibility and dynamic allocation, and the latter provides better performance.
 image

Specify the capacity needed.
 image

Confirm the settings.
 image

The iSCSI will be created successfully.
  image
image *Allocating the disk space ensures that an iSCSI Target has enough disk space as specified. However, the disk will take longer to create (depending on its given size) and there must be enough space on the physical disk.

Upon successfully creating the iSCSI target, it will be listed on the "iSCSI Target" page with "Ready" status.
 image
 
image Advantages of Thin Provisioning on Turbo NAS
With thin provisioning, the system administrator can flexibly allocate disk space (on the iSCSI Target) to server applications to expand the storage capacity anytime regardless of the current storage size. The addition of the storage space on the servers can be easily done on different operating systems by the iSCSI initiator. Thin provisioning allows efficient storage management as the system administrator has to only monitor the storage capacity of one single server (Turbo NAS) rather than extra hard drives or tapes on other sub-storage systems. Over-allocation is allowed as the storage capacity of the Turbo NAS can be expanded using Online RAID Capacity Expansion.

To connect to the iSCSI target we've just created the tab representing the operating system you are using.

Connect to iSCSI targets using Microsoft iSCSI initiator on Windows

This shows you how to use the iSCSI initiator on Windows to add the iSCSI target (Turbo NAS) as an extra partition. Before you start using the iSCSI target service, ensure you have created an iSCSI target on the Turbo NAS in "Device Configuration" > "iSCSI Target" and installed the correct iSCSI initiator for your OS.

iSCSI Initiator on Windows
The Microsoft iSCSI Software Initiator v2.07 is an official application for Windows Server 2003, XP, and 2000 that allows users to implement an external iSCSI storage array over a network. If you are using Windows Vista, 7, 8 or Windows Server 2008 or 2012, the Microsoft iSCSI Software Initiator is included by default. For more information (including download links) go to:
http://www.microsoft.com/downloads/details.aspx?familyid=12cb3c1a-15d6-4585-b385-befd1319f825&displaylang=en

Start the iSCSI initiator from "Control Panel" > "Administrative Tools". Under the "Discovery" tab click on "Add Portal". Enter the Turbo NAS IP address and the port number of the iSCSI service.
 image

The available iSCSI targets and their status will then be shown under the "Targets" tab. Select the target you wish to connect to and click "Connect ".
 image

You can click "Advanced" to specify extra connection settings (including authentication) otherwise click "OK" to continue.
 image

The status of the target should now display "Connected".
 image
 
After the target has been connected Windows will detect its presence and treat it as if a new hard drive has been added which needs to be initialized and formatted before use. Right-click on "My Computer" > "Manage" to open the "Computer Management" window. Go to "Disk Management" and a window should pop-up asking whether you want to initialize the newly-found hard drive. Click "OK" then format this drive as normally you would when adding a new disk.
 image

After disk initialization & formatting, the new drive will be attached to your PC. You can now use this iSCSI target as a regular disk partition.

Connect to iSCSI targets using iSCSI initiator on Mac OS

Before you start using the iSCSI target service, ensure you have created an iSCSI target on the Turbo NAS in "Device Configuration" > "iSCSI Target" and installed the correct iSCSI initiator for your OS.

About globalSAN iSCSI initiator
The globalSAN initiator is a Universal Application, for Intel- and PowerPC-based Mac computers (system requirements: Mac OS X 10.4 or later.) It provides an user-friendly interface and allows users to easily connect to an iSCSI volume. For more information (including download links) go to: http://www.studionetworksolutions.com/globalsan-iscsi-initiator/

Run the iSCSI initiator in "System Preferences".
 image

Click "+" and enter the Turbo NAS IP to add a new portal.
 image

The available iSCSI targets will be displayed in "Targets". Check "Connected" on the iSCSI Target you want to connect to.
 image

Enter the login information to connect to the iSCSI Target.
 image

The first-time you connect to the iSCSI Target, a message will appear to remind you that the disk is not initialized. Click "Initialize…" to format the disk. You can also open the 'Disk Utilities' application to initialize the disk.
 image

Format the iSCSI target.
 image
 image

You can now use the iSCSI target as an external drive on your Mac
 image

About Xtend SAN iSCSI Initiator

ATTO's Xtend SAN iSCSI Initiator for Mac OS X allows Mac users to utilize and benefit from iSCSI. It is compatible with Mac OS X 10.4.x to 10.6.x. For more information go to: http://www.attotech.com/products/product.php?sku=INIT-MAC0-001

After installing the Xtend SAN iSCSI Initiator, you can find it in "Applications".
 image
In the "Discover Targets" tab, you can either choose to "Discover by DNS/IP" or "Discover by iSNS" according to the network topology. In this example, we will use the IP address to discover the iSCSI targets.
 image

Follow the instructions and enter the server address, iSCSI target port number (default: 3260), and CHAP information (if applicable). Once entered, click "Finish" to retrieve the target.
 image

The available iSCSI targets on the Turbo NAS will be displayed. Select the target you want to connect to and click "Add".
 image

You can configure the selected iSCSI target's connection properties in the "Setup" tab.
 image

Click the "Status" tab, select the target to connect to and click "Login" to proceed.
 image

Connect to iSCSI targets using Open-iSCSI Initiator on Ubuntu Linux

This article shows you how to use Linux Open-iSCSI Initiator on Ubuntu to add the iSCSI target (Turbo NAS) as an extra partition. Before you start using the iSCSI target service, ensure you have created an iSCSI target on the Turbo NAS in "Device Configuration" > "iSCSI Target" and installed the correct iSCSI initiator for your OS.

About Linux Open-iSCSI Initiator

The Linux Open-iSCSI Initiator is a built-in package in Ubuntu 8.04 LTS (and later versions). You can connect to an iSCSI volume using a shell prompt with just a few commands. You can find more information about Ubuntu at http://www.ubuntu.com/ and more information (including download links) for Open-iSCSI can be found at: http://www.open-iscsi.org/

Before you start

Install the open-iscsi package. The package is also known as the Linux Open-iSCSI Initiator.

# sudo apt-get install open-iscsi

Now follow the below steps to connect to an iSCSI target (Turbo NAS) with the Linux Open-iSCSI Initiator.
You may need to modify the iscsid.conf for CHAP information (node.session.auth.username & node.session.auth.password).

# vi /etc/iscsi/iscsid.conf
Save and close the file, then restart the open-iscsi service.

# /etc/init.d/open-iscsi restart

Discover the iSCSI targets on a specific host, e.g. 10.8.12.31 with default port 3260.

# iscsiadm -m discovery -t sendtargets -p 10.8.12.31:3260

Check the available iSCSI node(s) to connect to.
# iscsiadm -m node

** You can delete node(s) you don’t want to connect to when the service is on with the following command:

# iscsiadm -m node --op delete --targetname THE_TARGET_IQN

Restart open-iscsi to login to all of the available nodes.

# /etc/init.d/open-iscsi restart

You should be able to see the login message as below: Login session [iface: default, target: iqn.2004-04.com:NAS:iSCSI.ForUbuntu.B9281B, portal: 10.8.12.31,3260] [ OK ]
Check the device status with dmesg.

# dmesg | tail

Enter the following command to create a partition, /dev/sdb is the device name.

# fdisk /dev/sdb

Format the partition.

# mkfs.ext3 /dev/sdb1

Mount the file system.

# mkdir /mnt/iscsi
# mount /dev/sdb1 /mnt/iscsi/

That’s it! You can test the I/O speed using the following command:

# hdparm -tT /dev/sdb1

Below are some “iscsiadm” related commands.
Discover the Targets on the host:
# iscsiadm -m discovery --type sendtargets --portal HOST_IP

Login to a Target:
# iscsiadm –m node --targetname THE_TARGET_IQN --login

Logout from a Target:
# iscsiadm –m node --targetname THE_TARGET_IQN --logout

Delete a Target:
# iscsiadm –m node --op delete --targetname THE_TARGET_IQN


GTLv150224

Please Wait!

Please wait... it will take a second!