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. Thats it! Any iscsi target that you configure with 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

  1. No comments yet.

  1. No trackbacks yet.

RANDOM BITS FROM A LINUX ENGINEER