iscsi-target, open-iscsi and Debian

This wasnt incredibly difficult to figure out, but if you have a Debian etch system with iscsi-target compiled from source (as I regularly do) getting both open-iscsi and iscsi-target to play nice together takes a small amount of fiddling.

First of all, install open-iscsi

dpkg -i open-iscsi_2.0.869.2-2_i386.deb

Now compile and install iscsi-target

tar -xzvf iscsitarget-0.4.16.tar.gz
cd iscsitarget-0.4.16
make
make install

And now the important bits. iscsi-target needs to be added to the sysv init scripts in the correct places, which a source install obviously doesnt do:

update-rc.d iscsi-target start 44 S . stop 82 0 6 .

That will make it start just before open-iscsi and stop just after it. Now configure your open-iscsi conf file to auto login to iscsi targets that have their connection mode set to automatic:

sed -i ’s/^# node.startup = automatic$/node.startup = automatic/’ /etc/iscsi/iscsid.conf
sed -i ’s/^node.startup = manual$/# node.startup = manual/’ /etc/iscsi/iscsid.conf

And thats it! Any iscsi target that you log into with the “automatic” option should be correctly connected to during bootup

iscsiadm -m node -T iqn.2008-01.net.pixelchaos:mytarget –op update -n node.conn[0].startup -v automatic

0 Responses to “iscsi-target, open-iscsi and Debian”


  1. No Comments

Leave a Reply