Code: Select all
$ apt-get install iscsitarget iscsitarget-dkms open-iscsi
Code: Select all
$ iscsiadm -m discovery -t st -p $HOST_IP
Information about found/known nodes is stored in: /etc/iscsi/nodes/.192.168.1.208:3260,1 iqn.2015-10.DVA-Hive:Debian_6.lun1
And can be retrieved with:
Code: Select all
$ iscsiadm -m node
In my case, I've configured the iSCSI target without any login (for testing). But in order to connect to it, you still need to "login":
Code: Select all
$ iscsiadm -m node --targetname "iqn.2015-10.DVA-Hive:Debian_6.lun1" --login
Login to [iface: default, target: iqn.2015-10.DVA-Hive:Debian_6.lun1, portal: 192.168.1.208,3260]: successful
Show new device:
Code: Select all
$ fdisk -l
Partition and format it like a normal device.
You're done!
Based on Falko Timme's HowTo: https://www.howtoforge.com/using-iscsi- ... and-target