To Get iSCSI Initiator run on linux install
apt-get install open-iscsi
and
iscsiadm -m discovery -t sendtargets -p <iSCSI Targethost> #<iSCSI Targethost> = IP of the iSCSI Target
This will discover the target such as
192.168.1.10:3260,1 iqn.2006-01.com.openfiler:tsn.c0e878a1bece
To login use:
iscsiadm --mode node --targetname iqn.2006-01.com.openfiler:tsn.c0e878a1bece --portal 192.168.1.10:3260 --login
Automtically load target after reboot system (replaces previus command!)
iscsiadm -m node -T iqn.2006-01.com.openfiler:scsi.linux3-data-1 -p 192.168.2.195 --op update -n node.startup -v automatic
Finally run
/etc/init.d/open-iscsi restart
and there should be a new device such as /dev/sdX
which you can format with fdisk, make filesystem (mkfs.extX) and mount
/etc/iscsi/nodes/vl2.drive0.00304835c6d0.524/192.168.254.15,3260,1/default
node.name = iqn.2006-01.com.openfiler:tsn.c0e878a1bece node.tpgt = 1 node.startup = manual #change to "automatic" if target shall load after reboot iface.hwaddress = default iface.iscsi_ifacename = default iface.net_ifacename = default iface.transport_name = tcp node.discovery_address = 10.6.7.10 node.discovery_port = 3260 node.discovery_type = send_targets node.session.initial_cmdsn = 0 node.session.initial_login_retry_max = 4 node.session.cmds_max = 128 node.session.queue_depth = 32 node.session.auth.authmethod = None node.session.timeo.replacement_timeout = 120 node.session.err_timeo.abort_timeout = 10 node.session.err_timeo.reset_timeout = 30 node.session.iscsi.InitialR2T = No node.session.iscsi.ImmediateData = Yes node.session.iscsi.FirstBurstLength = 262144 node.session.iscsi.MaxBurstLength = 16776192 node.session.iscsi.DefaultTime2Retain = 0 node.session.iscsi.DefaultTime2Wait = 0 node.session.iscsi.MaxConnections = 1 node.session.iscsi.MaxOutstandingR2T = 1 node.session.iscsi.ERL = 0 node.conn[0].address = 10.6.7.10 node.conn[0].port = 3260 node.conn[0].startup = automatic node.conn[0].tcp.window_size = 524288 node.conn[0].tcp.type_of_service = 0 node.conn[0].timeo.logout_timeout = 15 node.conn[0].timeo.login_timeout = 15 node.conn[0].timeo.auth_timeout = 45 node.conn[0].timeo.active_timeout = 5 node.conn[0].timeo.idle_timeout = 60 node.conn[0].timeo.ping_timeout = 5 node.conn[0].timeo.noop_out_interval = 10 node.conn[0].timeo.noop_out_timeout = 15 node.conn[0].iscsi.MaxRecvDataSegmentLength = 131072 node.conn[0].iscsi.HeaderDigest = None,CRC32C node.conn[0].iscsi.DataDigest = None node.conn[0].iscsi.IFMarker = No node.conn[0].iscsi.OFMarker = No
See also on:
http://www.howtoforge.com/using-iscsi-on-ubuntu-9.04-initiator-and-target
http://www.cyberciti.biz/faq/howto-setup-debian-ubuntu-linux-iscsi-initiator/
Access: