QNAP Systems, Inc. - Network Attached Storage (NAS)

Language

Support

How to link iSCSI targets to VMs of Virtualization Station?

What is iSCSI?
iSCSI is an internet protocol-based storage networking standard for connecting data storage devices and computers by using IP network transferring SCSI commands. iSCSI can be used to transfer data and remote storage over long distances in an intranet. iSCSI can also be used to transmit data in local area networks ( LANs ) and wide area networks ( WANs ). (Wikipedia. iSCSI. Available: http://en.wikipedia.org/wiki/ISCSI. Last accessed 17th April 2014.)

What is iSCSI target?
iSCSI target can be treated as a network-connected storage space and transmits data by using iSCSI protocol. From the perspective of a local computer, it can be accessed as a normal disk storage device.

Linking Virtual Machines (VM) with iSCSI targets of a QNAP Turbo NAS can be a comprehensive solution, with the high scalability and low-cost deployment of a NAS. For most small-to-medium enterprises that have limited budgets, it not only reduces the cost of deploying physical hardware, but also enlarges the usage scope of a QNAP Turbo NAS by utilizing iSCSI target to extend storage space for VMs.

Create an iSCSI target

Between computer and storage facility, your computer (VM) is named “Initiator” while the storage facility is called “Target”. (Note: please do not associate two iSCSI initiators within the same iSCSI target to avoid crashing data.)

1. From Storage Manager in QTS

Log in to your QNAP Turbo NAS and go to “Storage Manager”.

Select “iSCSI Storage” and click [OK] to launch the Quick Configuration Wizard.

Check “iSCSI target with a mapped LUN” and click [Next].

Click [Next] to enter the Quick Configuration Wizard.

Please give a name for the iSCSI target and check CRC/Checksum if necessary (optional). After finishing this, please click [Next].

Check “Use CHAP authentication” if necessary to set a username & password to the iSCSI target. Afterwards, please click [Next].

According to your needs, you can choose either “Thin Provisioning” or “Instant Allocation”. With “Thin Provisioning” you can optimize the usage of the storage capacity by allocating an amount of storage space equal to that actually used. On the other hand, if you would like to have fixed storage space, please select “Instant Allocation”. Follow up by whether you need to check “File-based” for iSCSI target (the default setting is Block-based.) Finally, give the storage capacity size to the iSCSI target and click [Next].

Please confirm the settings of the iSCSI target and click [Next].

You will have created the iSCSI target successfully and now you can click [Finish].

A new iSCSI target will be on the list and enabled.

2. From Storage Plug & Connect in Qfinder Pro

You can download QNAP Qfinder Pro on the QNAP website:
www.qnap.com/i/cz/product/app_page.php?block=1. Qfinder Pro is a utility available for Windows, Mac, and Linux that allows you to quickly find & access your Turbo NAS over LAN. Please select your Turbo NAS, right-click on it, and select “Storage Plug & Connect”.

Please insert your Turbo NAS username and password.

Please click [Create a Virtual Disk (iSCSI)].

Please give a name, check either “Block-based” or “File-based” based on your needs, and give a storage capacity size to the iSCSI target. If setting a username & password to the iSCSI target is necessary, you can check “Use CHAP authentication” to set them up. Afterwards, please click [OK].

After configuration, a new iSCSI target will be shown on the window.

Linking iSCSI target in VMs

1. With Windows OS, using Microsoft iSCSI Initiator to connect iSCSI target

Using Windows 7 as an example, please enter the “Control Panel” and click “System and Security”.

Please click “Administrative Tools”.

Please open “iSCSI Initiator”.

Choose the “Discovery” tab and click [Discover Portal…]. Please insert the Turbo NAS IP address where the iSCSI target was created, and click [OK].

Please choose the “Targets” tab and an iSCSI target will be found. Select it and click [Connect]. If you set a username & password to the iSCSI target, please click [Advanced…] to insert them and then click [OK].


After finishing these steps, Windows 7 will notify you of a new disk added. You can enter “Disk Management” to check it out.

2. With Ubuntu distribution, using Open-iSCSI Initiator to connect iSCSI target

Linux Open-iSCSI Initiator is built-in to Ubuntu 8.04 LTS and later versions. You can use commands to add an iSCSI target via the shell prompt. For more information on Ubuntu, please visit: http://www.ubuntu.com/ and for more information on Open-iSCSI: http://www.open-iscsi.org/

Please install the open-iscsi component first (Linux Open-iSCSI Initiator):

# sudo apt-get install open-iscsi

Please refer the steps below to use the Open-iSCSI Initiator to link an iSCSI target (QNAP Turbo NAS). If your iSCSI target needs CHAP information to login, you need to modify iscsid.conf such as “node.session.auth.username” and “node.session.auth.password”.

# vi /etc/iscsi/iscsid.conf

Please save iscsid.conf file and close it, then restart open-iscsi service.

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

Look for iSCSI targets (QNAP Turbo NAS). For example, NAS IP: 172.17.28.69, port: 3260.

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

Linux terminal will pop up the message below:
172.17.28.69:3260, 1 iqn.2004-4.com.qnap:NAS:iscsi.test.db531f


Please select an iSCSI node to link.

# iscsiadm -m node -T THE_TARGET_iqn --login

The Linux terminal will display the below message:
Login to [iface: default, target: iqn.2004-04.com.qnap: NAS:iscsi.test.db531f, portal: 172.17.28.69,3260] successful.


This command can be used to delete unnecessary iSCSI nodes:

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

This command can be used to check the status of iSCSI targets:

# dmesg | tail

Please use this command to create a partition and the iSCSI target will be associated with /dev/sdb. (“sdb” is the first added storage device. It will be different based on the amount of your storage devices.)

# fdisk /dev/sdb

Please use this command to format /dev/sdb1:

# mkfs.ext3 /dev/sdb1

Please use those commands to mount /dev/sdb1:

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

Afterwards, you can use the command below to test the I/O transfer rate of the iSCSI target on Linux:

# hdparm -tT /dev/sdb1

There are some commands regarding to “scsiadm”:

This command can be used to find iSCSI targets in a certain host by using the host’s IP address:

# iscsiadm -m discovery --type sendtargets --portal HOST_IP

This command can be used to login to the iSCSI target:

# iscsiadm –m node --targetname THE_TARGET_IQN --login

This command can be used to logout of the iSCSI target:

# iscsiadm –m node --targetname THE_TARGET_IQN --logout

This command can be used to delete the iSCSI target:

# iscsiadm –m node --op delete --targetname THE_TARGET_IQN
Datum vydání: 2014-04-28
Bylo to pro vás to užitečné?
Děkujeme vám za vaši zpětnou vazbu.
Děkujeme vám za vaši zpětnou vazbu. Máte-li nějaké dotazy, kontaktujte prosím adresu support@qnap.com
100% lidí si myslí, že to pomáhá.