"A quick, efficient and cheap method of implementing network storage solutions"
- Create an iSCSI target volume
- Connect to iSCSI targets using Microsoft iSCSI initiator on Windows
- Connecting to iSCSI targets using globalSAN iSCSI initiator on Mac OS
- Connect to iSCSI targets using Open-iSCSI Initiator on Ubuntu Linux
What is iSCSI and its benefits?
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.
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".
|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.|
Log in to your Turbo NAS, go to "iSCSI" > "iSCSI Storage" > "Create" to create a new iSCSI target.
Refer to the below images to input the required information to create the iSCSI target.
Enter a name for your target.
This is an optional step to enable authentication. Using authentication is strongly recommended if the Turbo NAS uses a public or open network.
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.
Specify the capacity needed.
Confirm the settings.
The iSCSI will be created successfully.
|*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.
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.
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:
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.
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 ".
You can click "Advanced" to specify extra connection settings (including authentication) otherwise click "OK" to continue.
The status of the target should now display "Connected".
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.
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.
- Ensure that there is an iSCSI target on the QNAP NAS in “Main Menu” > “Storage Manager” > “iSCSI Storage”.
- Download and install “globalSAN iSCSI Initiator” on your Mac. http://www.studionetworksolutions.com/globalsan-iscsi-initiator/
Run “globalSAN and Xtarget” in "System Preferences".
Click lock icon to unlock and allow for changes. Select “+” > “Portal/Group”.
Enter the IP address or domain name of the NAS. Click “Add”.
Select an iSCSI Target in the left list box, then select “iSCSI Options”.
Select “Always send “Session Type” when connecting”, then select “Done”.
Optional: If CHAP authentication is used, select “Authentication”.
Select “Challenge Handshake Auchentication (CHAP)” to enter name and secret fields. Click “OK”.
Select the connection for the iSCSI target in the right list box. Select “Connect”.
The iSCSI connection will now appear as “Connected” in the left list box.
If the iSCSI target is not readable by the Mac, a dialog box will prompt the user to initialize the iSCSI target.
Follow the steps below to initialize the iSCSI target:
Right-click on the iSCSI target under “External” and select “Erase…”. Note that all of the data on the target will be erased.
Enter the drive name and select the format. Select “Erase”.
There will be a iSCSI target icon on the desktop and the target can now be used as an external drive on your Mac.
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".
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.
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.
The available iSCSI targets on the Turbo NAS will be displayed. Select the target you want to connect to and click "Add".
You can configure the selected iSCSI target's connection properties in the "Setup" tab.
Click the "Status" tab, select the target to connect to and click "Login" to proceed.
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|