| ### How to create an iSCSI target (server) on Debian Lenny? ### | |
| First of all, we need to install the package containging the iSCSI Enterprise T… | |
| apt-get install iscsitarget | |
| Next, I had to enable iscsitarget in /etc/default/iscsitarget ("ISCSITARGET_ENA… | |
| Then, let's configure the /etc/ietd.conf configuration file. Here is a simple e… | |
| Target iqn.2010-03.com.netasq.tac:StorageDisk | |
| Lun 0 Path=/storage/testdisk.img,Type=fileio,IOMode=rw | |
| By default, the required kernel module is not installed (). Fortunately, there … | |
| apt-get install iscsitarget-modules-2.6-686 | |
| The last thing you need to do is creating the de facto disk image file. My pref… | |
| dd if=/dev/zero of=/storage/testdisk.img bs=1024 count=4194304 | |
| Now, you can finally start the iscsitarget daemon: | |
| /etc/init.d/iscsitarget restart | |
| From now on, you should have the iscsitarget daemon listening on port (use nets… | |
| Note, that in this example I used no authentication. It means that anyone can a… | |
| Warning: I used my iSCSI server as a storage for a VMWare ESX 4 server. At firs… | |