Objective 3.2 – Configure iSCSI SAN Storage
Identify iSCSI SAN hardware components
The hardware components of an iSCSI SAN are very similar to the FC SAN; the only exceptions are:
- fibre channel HBAs are replaced by iSCSI HBAs; HBAs are either 1Gb or 10Gb.
- the iSCSI initator can be software or hardware based.
- fibre channel switches are replaced by ethernet switches.
There are three main iSCSI storage systems:
Active/Active – all ports are active
Active/Passive – only one storage port is active at any one time.
Virtual Port – this systems masks an active/active array from the ESX/ESXi host; virtual port handles storage port failure transparently.
Determine use cases for hardware vs. software iSCSI initiators
The factors which usually determine the use of one initator over another are cost and performance; a hardware initator will generally perform better because the hardware initator packages the SCSI data, encapsulates the packets and frames and then transmits the data. The software initator with a generic network card will package the SCSI data and encapulsate the TCP and IP packets; if the software initator can utilise an offload engine then encapsulation is carriedout by the NIC.
If ESX/ESXi requires boot from SAN and the SAN is iSCSI then you must use a hardware initiator.
Configure the iSCSI Software Initiator
The software iSCSI initator can be configured via the vSphere client or CLI.
Configuration tab > storage adapters > iSCSI Software Adapter > properties > configure > check Enabled > ok > close.
NOTE: A VMKernel port will be needed and should ideally be on the same subnet as the iSCSI targets; please note this is ideally it not a mandatory.
In order to use jumbo frames with the software iSCSI initiator you’ll need to configure the vSwitch MTU to 9000; this is accomplished via the CLI.
CLI: esxcfg-vswitch -m 9000 vSwitch#
Configure Dynamic/Static Discovery
The ESX/ESXi software iSCSI initator supports both dynamic and static discovery; dynamic discovery utilises a send target request to the iSCSI appliance; the appliance then returns a list of available target names and IP addresses and the iSCSI target registers the iSCSI qualified name. The Static discovery requires the administrator specify the iSCSI server, port and iSCSI target name.
NOTE: iSCSI uses TCP port 3260
Configure CHAP Authentication
CHAP authentication can be configured via the vSphere client.
Configuration tab > storage adapters > vmhba36 or iSCSI Software Adapter > properties > CHAP > CHAP credentials.
The CHAP credentials dialogue box allows you to configure CHAP for the target or host per initiator or per target; the default is Do not use CHAP.
The CHAP options are:
Do not use CHAP unless required by target, Use CHAP unless prohibited by target, Use CHAP. If CHAP has been enabled and now disabled a reboot of the host is required to completely disable authentication.
Configure VMkernel port binding for iSCSI Software multi-pathing
In order to configure iSCSI multipathing you need two physical adapters and two VMkernel ports. Only one physical adapter should be active per VMkernel port; any other adapter should be configured as failover adapters. In order to for the software iSCSI initator to use VMkernel ports you need to bind them; running the following command does just that:
esxcli swiscsi nic add -n vmk0 -d vmhba36
esxcli swiscsi nic add -n vmk1 -d vmhba36
to verify the configuration run the following command:
esxcli swiscsi nic list -d vmhba36
Rescan the software iSCSI initator to display the new paths.
By default ESX/ESXi will scan for LUNs on each reboot; scanning from LUN ID 0 to LUN iD 255. To shorten the boot time you can modify the maximum number of LUNs ESX/ESXi will scan for by modifying the Disk.MaxLUN advanced setting value.
To discover new LUNs created since a reboot; rescan the storage adapter. The storage adapter rescan is initiated via the vSphere client, go to:
Configuration tab > storage adapters > rescan all or right click the storage adapter and select rescan
Identify iSCSI addressing in the context of the host
The host adapter follows a standard known as IQN (iSCSI qualified name); IQNs have a defined format they must follow e.g. iqn.1998-01.com.vmware:[hostname]-[random hexadecimal]
The standard is defined as follows:
iqn – the name format being used
1998-01 – the year and the month the naming authority was registered
Naming authority – the reverse name of the registered domain name; in this case vmware.com
Unique name – the host name and a random hexadecimal string appended.
If you were using the Microsoft iSCSI initator you would see something like this: iqn-1991-05.com.microsoft:[hostname]