ISCSI Target

From ArchWiki
Revision as of 00:03, 10 October 2011 by JonnyJD (Talk | contribs) (put LIO up front (IET is old and unsupported, LIO is the new standard))

Jump to: navigation, search
Summary help replacing me
How to set up an iSCSI Target using different tools.
iSCSI Target
iSCSI Initator
iSCSI Boot

With Wikipedia:iSCSI you can access storage over an IP-based network.

The exported storage entity is the target and the importing entity is the initiator.

There are different modules available to set up the target. The Target Framework (STGT) was the standard before linux 2.6.38. The current standard is the target. Enterprise Target (IET) is an old implementation and Target Subsystem (SCST) is the successor of IET and was a possible candidate for kernel inclusion before the decision fell for LIO.

Setup with LIO

Using targetcli

Using (plain) LIO utils

Setup with iSCSI Enterprise Target

You will need Template:Package AUR and Template:Package AUR from AUR, make sure you've got the dependencies.

Create the Target

Modify /etc/iet/ietd.conf accordingly

Hard Drive Target

Target iqn.2010-06.ServerName:desc
Lun 0 Path=/dev/sdX,Type=blockio

File based Target

Use "dd" to create a file of the required size, this example is 10GB.

dd if=/dev/zero of=/root/os.img bs=1G count=10
Target iqn.2010-06.ServerName:desc
Lun 0 Path=/root/os.img,Type=fileio

Start server services

rc.d start iscsi-target

Also you can "iscsi-target" to DAEMONS in /etc/rc.conf so that it starts up during boot.

See also

  • iSCSI Boot Booting Arch Linux with / on an iSCSI target.