Difference: ConnectingToAniSCSIServerFromLinux (1 vs. 3)

Revision 315 Jul 2017 - IvoVanGeel

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Connecting to an iSCSI server from Linux

Line: 70 to 70
 

Connecting to iSCSI target disks

Deleted:
<
<
-- IvoVanGeel - 30 Dec 2011
 \ No newline at end of file
Added:
>
>
-- Ivo van Geel - 30 Dec 2011
 \ No newline at end of file

Revision 231 Dec 2011 - IvoVanGeel

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Connecting to an iSCSI server from Linux

Line: 55 to 55
 

add iSCSI discovery target

Changed:
<
<
Use the sendtargets method discover targets on 192.168.2.4, using the configured username / password to login (-l option):
>
>
Use the sendtargets method discover targets on 192.168.2.4, using the configured username / password:
 
Changed:
<
<
iscsiadm -m discovery -t sendtargets -p 192.168.2.4:3260 -l -I iface0

The -l option might not be needed in your case, if you don't use authentication.

If everything is set up correctly, the system may have already made a connecton to the iSCSI target disk(s).

>
>
iscsiadm -m discovery -t sendtargets -p 192.168.2.4:3260 -I iface0
 

show iSCSI discovery settings

Revision 130 Dec 2011 - IvoVanGeel

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="WebHome"

Connecting to an iSCSI server from Linux

IMPORTANT: never stop or kill the iscsid daemon while iSCSI disks are still present!

Introduction

This document describes how to connection to an iSCSI server using Open-iSCSI from a Linux machine. I will asume Open-iSCSI has alread been installed

First setup the Initiator name in /etc/iscsi/initiatorname.iscsi. For example:

InitiatorName=iqn.2001-04.org.gentoo:client
InitiatorAlias=client

Next setup authenticaion options in /etc/iscsi/iscsid.conf, if needed. For example:

node.session.auth.authmethod = CHAP
node.session.auth.username = username
node.session.auth.password = password

discovery.sendtargets.auth.authmethod = CHAP
discovery.sendtargets.auth.username = username
discovery.sendtargets.auth.password = password

Setting up iSCSI interface

Creating a new iSCSI interface

iscsiadm -m iface -I iface0 -o new

Configuring an existing iSCSI interface

iscsiadm -m iface -I iface0 -o update -n iface.initiatorname -v iqn.2001-04.org.gentoo:client This configures the interface initiatorname (sets it to qn.2001-04.org.gentoo:client in this example)

iscsiadm -m iface -I iface0 -o update -n iface.ipaddress -v 192.168.2.2

This configures interface iface0 to use 192.168.2.2 as the source IP address. It also possible to use the interface name (iface.net_ifacename) or MAC address (iface.hwaddress)

Showing iSCSI interface settings

Use iscsiadm -m iface -I iface0 -o show to show information about an interface (iface0 in this case).

Deleting an existing iSCSI interface

iscsiadm -m iface -I iface0 -o delete

Set up iSCSI target discovery

add iSCSI discovery target

Use the sendtargets method discover targets on 192.168.2.4, using the configured username / password to login (-l option):

iscsiadm -m discovery -t sendtargets -p 192.168.2.4:3260 -l -I iface0

The -l option might not be needed in your case, if you don't use authentication.

If everything is set up correctly, the system may have already made a connecton to the iSCSI target disk(s).

show iSCSI discovery settings

iscsiadm -m discovery -p 192.168.2.4:3260

remove iSCSI discovery target

To disable discovery for the 192.168.2.4 target, use: iscsiadm -m discovery -o delete -p 192.168.2.4:3260

Connecting to iSCSI target disks

-- IvoVanGeel - 30 Dec 2011

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2010-2019 by LANIS