Open-iSCSI

From My Admin Page
Jump to: navigation, search

Links

(then do) service iscsi restart

REDHAT DOCS


NOTE: Configure the iSCSI cards like any other network card first...

1. CONFIGURE iSCSI

  • Open /etc/iscsi/iscsid.conf with vi text editor and setup CHAP username and password if used:
node.session.auth.username = <My_ISCSI_USR_NAME>
node.session.auth.password = <MyPassword>
discovery.sendtargets.auth.username = <My_ISCSI_USR_NAME>
discovery.sendtargets.auth.password = <MyPassword>
Where :
node.session.* is used to set a CHAP username and password for initiator authentication by the target(s).
discovery.sendtargets.* is used to set a discovery session CHAP username and password for the initiator authentication by the target(s)
  • You may also need to tweak and set other options. Refer to man page for more information. Now start the iscsi service:
/etc/init.d/iscsi start
For REDHAT:
chkconfig iscsid on ; service iscsid start
chkconfig iscsi on ; service iscsi start

2. CREATE ISCSI INTERFACES

  • Create an iscsi interface for each physical interface. Assuming there's two, you'd do
iscsiadm -m iface -I iface0 -o new
iscsiadm -m iface -I iface1 -o new
  • To show all the iSCSI interfaces just do iscsiadm -m iface (or you can do -I <interface> to look at a particular one)
After this is done, bind the iSCSI interfaces to the physical ones :
iscsiadm -m iface -o update -I iface0 -n iface.net_ifacename -v eth2
iscsiadm -m iface -o update -I iface1 -n iface.net_ifacename -v eth3

3. TARGETS

  • Once the iscsid service is running and the initiators are configured, you can discover available targets.
iscsiadm -m discovery -t st -p <iSCSI_target_IP>
  • Next you can log into the target: iscsiadm -m node -l

If you have issues you can logoff a target with: iscsiadm -m node -u ** NOTE ** the discoveries will be cached. If you need to delete them (see here for syntax)

iscsiadm -m discoverydb -t st -p <iSCSI_target_IP> --op=delete