Wednesday, May 12, 2010

How to attach or search a iscsi target device to a Linux machine

Sponsored Links
 To attach or search a iscsi target your machine should be configured as an iscsi initiator. There is a software in linux called iscsi-initiator-utils. You can either use rpm or compile the source to install it.

 #rpm -ivh iscsi-initiator-utils-

 After installing iscsi-initiator-utils package, start the iscsid service. And set the chkconfig entry so that it will automatically start at the next reboot.

 # service iscsid start
 Turning off network shutdown. Starting iSCSI daemon: [ OK ]
 [ OK ]

 # chkconfig iscsid on
# chkconfig iscsi on

Searching the iscsi target:

# iscsiadm -m discovery -t sendtargets -p
You can also use port number if you want. As follows

# iscsiadm -m discovery -t sendtargets -p,1

You will get the scanned result as the line above.

Loging in to the iscsi target:

# iscsiadm -m node -T,1 -p -l

#fdisk -l
will list the iscsi targets now.

Best Reads:
1.  iSCSI: The Universal Storage Connection: The Universal Storage Connection
2.  Storage Networks Explained: Basics and Application of Fibre Channel SAN, NAS, iSCSI, InfiniBand and FCoE
Sponsored Links

No comments:

Post a Comment

Be nice. That's all.