Professional Documents
Culture Documents
x
What is iSCSI? iSCSI is a network storage protocol above TCP/IP suite. iSCSI protocol encapsulates SCSI data into TCP packets. It allows a host to connect to a storage array via a simple Ethernet connection. This solution is quite cheaper than the Fibre Channel SAN as Fibre Channel HBAs and switches are pretty expensive. The user of the client system sees the storage arrays LUNs like a local disk. iSCSI devices should not be confused with NAS (Network Attached Storage) devices e.g. NFS (Network File System). Note: The most important difference is that NFS volumes can be accessed by multiple hosts, but one iSCSI volume should be accessed by one host. iSCSI Terminology Initiator: Its the name of the iSCSI client. The iSCSI client has a block level access to the iSCSI devices, which can be a disk, tape drive or CD/DVD writer. One client can use multiple iSCSI devices. Target: Its the iSCSI Server. It offers the devices like disks, tape drives, cd/dvd drives to the clients. One device can be accessed by one client. Discovery: Its the process which shows the targets for the initiator. Naming Rule [ iqn.year-month.domain:anyname ] iSCSI Target can be used to Setup stateless server/client (used in diskless setup) Share disks and tape drives with remote client over LAN, WAN or the Internet. Setup SAN Storage Array etc
Test Environment In my test setup, I am using two virtual hosts viz., server1 (192.168.150.140) and station1 (192.168.150.142) and both runs RHEL 6.3 64-bit. Here, server1 will be my iSCSI target and station1 will be the iSCSI initiator.
Page 1
Now, we need to install the package which will provide the iSCSI utils for our setup. # yum install scsi-target-utils Add the following at the end of the file: /etc/tgt/targets.conf <target iqn.2013-02.com.example:target1> backing-store /dev/target/target_01 initiator-address 192.168.150.142 </target>
Page 2
Page 3
So far so good! Confirm status after discovery # iscsiadm -m node -o show Login to target
Confirm session
Page 4
You can see that a new block device /dev/sdc has been added to the system. Success! Now the target is enabled to be accessed upon reboots (persistent) and it's added to a node database in /var/lib/iscsi. The iscsid service will access this database upon system startup and re-attach your iSCSI Targets. To disconnect the iSCSI Target, you will need to log out: # iscsiadm -m node -T iqn.2013-02.com.example:target1 -p server1 u
You could also log out of all attached targets by using this command: # iscsiadm -m node -U all
Page 5
Page 6