RHEL6 – Accessing ISCSI Disks with Iscsiadm

Pdp-8ISCSI is scsi (Small Computer System Interface) over IP. Where SCSI is the protocol and IP is the transport mechanism. This is going to be a quick and dirty overview of how to login to and mount an iscsi disk. This will not be an overview of how to share out a disk via iscsi. I may get around to writing that post, but it will not be today.

Before we get started we need to understand a few simple terms.

  • ISCSI Initiator – the client that needs access to the ISCSI disk.
  • ISCSI Target – the remote disk.
  • ISCSI Target Portal – the server that is providing the Target to the Initiator
  • IQN – The “ISCSI Qualified Name” or more simply a unique name for the Initiator and the Target

Now lets get down to business.

First on the Target you must install the ISCSI utils.

>yum -y install iscsi-initiator-utils.x86_64

Then discover the any ISCSI targets provided by the Target Portal. In this case the IP address of my target portal will be 192.168.0.55.

>iscsiadm -m discovery -t st -p 192.168.0.55.

In the example above -m puts iscsiadm is discovery mode, -t st tells iscsiadm to look for a SCSI target, and -p is the target portal. The output of the above command will be the IQN of the target disk.

For this example we will say that the IQN is

iqn.2001-05.com.equallogic:6-8a0900-5e1812101-1cf000245514a8da-disk1

Then log into the ISCSI target

>iscsiadm -m node -T iqn.2001-05.com.equallogic:6-8a0900-5e1812101-1cf000245514a8da-disk1 -p 192.168.0.55 -l

In the example above we are setting the mode to node, -T prefaces the ISCSI target, -p the portal, and -l means login.

Now you need to identify which device is the iscsi target by looking at the output of dmesg or tail the messages file.

One thought on “RHEL6 – Accessing ISCSI Disks with Iscsiadm

  1. can i get steps configure iscsi- target server. I added one extra harddik to machine on rhel 6. it is shown as /dev/sdb2. What is next steps to configure target server

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s