Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Connecting to an iSCSI server from LinuxIMPORTANT: never stop or kill the iscsid daemon while iSCSI disks are still present!IntroductionThis 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=clientNext 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 interfaceCreating a new iSCSI interfaceiscsiadm -m iface -I iface0 -o new
Configuring an existing iSCSI interfaceiscsiadm -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 settingsUseiscsiadm -m iface -I iface0 -o show to show information about an interface (iface0 in this case).
Deleting an existing iSCSI interfaceiscsiadm -m iface -I iface0 -o delete
Set up iSCSI target discoveryadd iSCSI discovery targetUse the sendtargets method discover targets on 192.168.2.4, using the configured username / password:iscsiadm -m discovery -t sendtargets -p 192.168.2.4:3260 -I iface0
show iSCSI discovery settingsiscsiadm -m discovery -p 192.168.2.4:3260
remove iSCSI discovery targetTo 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 | ||||||||
Deleted: | ||||||||
< < | -- IvoVanGeel - 30 Dec 2011 | |||||||
\ No newline at end of file | ||||||||
Added: | ||||||||
> > | -- Ivo van Geel - 30 Dec 2011 | |||||||
\ No newline at end of file |