["iSCSI"] > iSCSI/DebianIscsitarget
Debian as an iSCSI Target
Remember, the target is the "server" (It's the one that actually have the disk).
iscsitarget is only available in Debian/Testing (and sid)
Quickstart
1. Install the package an module
You will need to install iscsitarget and iscsitarget-module (currently, you need to [#iscsitarget-module build the iscsitarget-module]).
2. Configure
You need to configure /etc/ietd.conf (here's a simple test page)
# Example iscsi target configuration # a first account IncomingUser jdoe YourSecurePwd1 # another one, for a windows user. IncomingUser iqn.1991-05.com.microsoft:JDOE-PC YourSecurePwd2 #If mutual CHAP shall be employed, you need OutgoingUser jack YourSecurePwd2 # The target name must be a globally unique name, the iSCSI # standard defines the "iSCSI Qualified Name" as follows: # # iqn.yyyy-mm.<reversed domain name>[:identifier] Target iqn.2007-01.org.debian.foobar:mydisk1 IncomingUser joe YourSecurePwd1 OutgoingUser jim YourSecurePwd2 #make sure the partition isn't mounted : #Lun 0 Path=/dev/sdh,Type=fileio Target iqn.2007-01.org.debian.foobar:CDs IncomingUser joe YourSecurePwd1 OutgoingUser jim YourSecurePwd2 #make sure the partition isn't mounted : Lun 0 Path=/dev/scd0,Type=fileio,IOMode=ro Lun 1 Path=/dev/scd1,Type=fileio,IOMode=ro #Lun 2 Path=/dev/hdX,Type=fileio,IOMode=ro Lun 3 Path=/srv/debian-20070313-kfreebsd-i386-install.iso,Type=fileio,IOMode=ro
You should refer to the ietd and ietd.conf manpages for more information..
3. Restart the daemon
invoke-rc.d iscsitarget restart
That's It !
?Anchor(iscsitarget-module)
Building iscsitarget-module
Due to bug 448195 , it's a little bit more complicated than it should be :
apt-get install iscsitarget iscsitarget-source wget m-a prepare m-a update m-a clean iscsitarget m-a unpack iscsitarget cd /usr/src/modules/iscsitarget/ wget -O - 'http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=20;filename=module-name.diff;att=1;bug=448195' | patch -p1 || exit m-a a-i iscsitarget --not-unpack
FAQ
- How to share an ISO file with Windows ?
- When should I use "fileio" vs "blockio" ?
See also
- the iSCSI Enterprise Target
[http://iscsitarget.sourceforge.net/] - iscsitarget Project homepage.
[http://iscsitarget.sourceforge.net/wiki/] - iscsitarget Wiki page.
[http://sourceforge.net/mailarchive/forum.php?forum_name=iscsitarget-devel] - iscsitarget (developers) mailing list.
iscsitarget is a fork of [http://www.ardistech.com/iscsi/ Ardis].
- return to the ["iSCSI"] parent page.