iSCSI Storage in VMware – A Quick Overview

Today I will be writing a very brief overview on iSCSI storage and how it fits into a VMware environment. In this example I will be referring to a small cloud I have set up using a 3 host ESXi (5.1)  cluster which connects to an Equallogic SAN using a software initiator.


What is iSCSI?

iSCSI encapsulates SCSI control and data in a TCP/IP packet which in turn is encapsulated in an Ethernet frame and sent over a LAN. It transports block-level data between two or more devices – an iSCSI initiatior (host) and an iSCSI Target (Storage) – using the IP network. Below is a simple diagram:


First of all, here are the key components of iSCSI:

iSCSI Initiator:  The iSCSI Initiator is found on the host side and can either be hardware or software based
iSCSI Target:  The iSCSI Target is SAN side and hosts the iSCSI LUNs. 
iSCSI (IQN) Qualified Name: Unique identifier of the iSCSI target, initiator or LUN. This is in iqn.yyyy-mm.naming-authority:UniqueName format. More on this coming up.
iSCSI LUN (Logical Unit): A LUN is a unique identifier for an iSCSI device.  
iSCSI Network Portal: The IP addresses used by an iSCSI Target or initiator. 

iSCSI uses TCP/IP port 3260 to communicate.


What is the difference between a LUN and a Datastore?

In this scenario a LUN is a logical section of storage which is specifically carved up on a SAN in order to be presented to one or more hosts. A datastore is a LUN which is formatted in VMware’s VMFS (Virtual Machine File System) in order to store VM configuration files, VMDKs etc. 



Let’s take a look at some output from vSphere client. In this example I have looked at the “Manage Paths” on a particular datastore. 

naa (Network Addressing Authority) identifier is the unique number allocated to a LUN. This will be presented to all connected hosts and does not change.

The Round Robin Path Selection as stated by the SAN vendor’s best practices has been chosen. There are 3 native pathing policies.

Round Robin : Uses all available paths which enables the load to be distributed over all paths

MRU : This uses one available path (decided at boot time) and will only use other paths if primary fails.

Fixed : This is the default policy in VMware. If configured, it uses a designated preferred path.  If not configured then it uses the first discovered path like the MRU policy. Other paths will only be used if the primary fails.



From this output you will see there are 3 iSCSI targets/paths. Let’s dissect the top one.

2001-05 was the year and month the naming authority was established.

naming-authority: flipped around !

Unique name:  In this example it includes “fn1” at the end which in this case is the name of the LUN on the storage device.

IP address: This is the IP address on one of the Storage Processors controllers with the port number (3260) is uses to connect.



From the diagram you will see the Runtime Names are: vmhba38:C0:T8:L0, vmhba38:C1:T8:L0 & vmhba38:C2:T8:L0. This value identifies a path to a LUN. Let’s split that up:

vmhba38 – This is the name of the storage adapter (iSCSI initiator)

C0 – This is the storage channel number.  If there are multiple paths to the same target then this number will increment (eg C1 and C2)

T8 – Target number. This is determined by the host device. Targets shared by hosts often have different target numbers.

L0 – LUN number. This is decided by the storage device. If the target has only one LUN then the number is always zero.



That was brief overview of iSCSI storage within a VMware environment along with some descriptions of the components and identifiers involved. Remember to always read the vendors Best Practices for setting up the physical and virtual elements of storage network.