ESX and the iSCSI IQN
Being both a Norwegian, and a newbie when it comes to iSCSI and ESX(i), it shoudn’t come as a surprise that I had my fair share of problems getting iSCSI on ESX to work. As for those of you who doesn’t know Norwegians, we are pretty much known for completely ignoring every piece of documentation related to a new gadget. This might pose some problems when the specifications have strict requirements on for exmaple the format of strings. As I discovered after quite some time debugging with tcpdump, debug mode of ietd and a massive amount of retries, ESX have some requirements for the iSCSI Qualified Name (IQN). The iQN should be in the following format according to RFC 3720:
Format: iqn.yyyy-mm.{reversed domain name} (e.g. iqn.2001-04.com.acme:storage.tape.sys1.xyz)
As I was pretty eager to get things up and running, I just constructed my own IQN:
iqn.2008.06.biz.frode:storage.vmware
As you can verify, this IQN is valid. I also tried to connect and mount this target with open-iscsi on my linux host. It worked.
So, the next challenge was to get ESX to recognize this target. After sorting out the firewall issues and reading some changelogs for ietd to verify that ESX actually acepted this software target (it does) I added my iSCSI server to ESX’ iSCSI software adapter. As I soon discovered, it did not work.
After checking with tcpdump, I saw that packets were flowing back and forth between my ESX host and the iSCSI server. But, there were no targets showing up in the ESX configuration. A bit frustrating since I had no idea about what was wrong. ESX did not help me either since it did not return a single error message, not even when I tried to scan the host from the ESX console. Since the same target worked as a charm in Linux, I was even more puzzled.
After quite some time trying different options in ietd and rescanning my iSCSI server while duming the network traffic, I tried to change the IQN on the target from iqn.2008.06.biz.frode:storage.vmware to iqn.2007.04.biz.frode:storage.vmware. Voilà! Suddently my targets and LUNs came up in ESX!
As you can see, the only difference in the IQN is the date. As specified in RFC 3720 – Internet Small Computer Systems Interface section 3.2.6.3.1, the IQN date should reflect a date when the naming authority owned the domain name. The RFC says nothing about what happens if you aquire the domain less than a month before you create the target and therefore sets the date to the same month and year as you are currently in as dictated by the RFC. Linux and Open-iSCSI didn’t care about the date being the same as the current one and happily connected to it. ESX on the other hand rejected it without saying a word as the current month and year was June 2008 (2008.06) when I tried it. Maybe a bug in the implementation of iSCSI used in ESX? I don’t know, I’m still a bit puzzled :-)
But, the lesson learned from this story is simple: Don’t use the same month and year as you are currently in if you want ESX to see your targets :-)
Posted: July 26th, 2008 under Storage, VMware by Frode.
Comments: none
Write a comment