VMware
1 2 3 ... 5 Previous Next 63 Replies Last post: Jun 2, 2008 11:29 PM by Sumit Bharti  

iSCSI patch available for ESX 3.0 posted: Aug 28, 2006 10:06 PM

Click to view Paul Lalonde's profile Master 767 posts since
Jan 16, 2006
After extensive analysis of the ESX 3.0 iSCSI initiator and various iSCSI target products, I have developed a patch for the vmkernel iSCSI module.


If you are using a mainstream iSCSI target product and are encountering the following error message, you may wish to try this patch:



In a nutshell, here's the issue: ESX uses the code base from an older version of Cisco's iSCSI initiator for Linux (version 3.4.2). When a user goes through the "Add Storage" wizard in the VI Client, ESX goes ahead and partitions the iSCSI LUN, formats it for VMFS, and then attempts to apply a SCSI reservation on that LUN.


(The SCSI RESERVE and RELEASE commands are inherently part of any multi-initiator or cluster environment to arbitrate access to data on a shared LUN).


However, the older Cisco 3.4.2 iSCSI code arbitrarily groups the RESERVE command in with other SCSI commands like WRITE, FORMAT, COPY, etc. Because of this grouping, the RESERVE command actually gets sent to the iSCSI target with the iSCSI W-flag (Write flag) set. This implies that the initiator will be sending data (called a "data-out" phase) to the target. However, embedded in the RESERVE command packet, the initiator actually specifies that zero data bytes are to be written (called a zero data-out phase). This combination of the W-flag and expected data transfer of zero bytes confuses the iSCSI target, so the target responds with an error message (usually CHECK CONDITION).


This error message then gets passed up the stack from iSCSI to VMFS3. VMFS3 recognizes that a SCSI reservation could not be applied to the iSCSI LUN, so the error dialog (above) is displayed.


Using the vmkernel module source code supplied in the ESX 3.0 open-source package, I was successful in identifying and correcting the behaviour of the RESERVE command by ensuring that the W-flag is not set upon transmission of the iSCSI packet.


I have enabled debugging in my iscsi_mod.o patch module (which gets sent to /var/log/vmkernel) but upon continued testing, I will remove it and re-release the patch.


Since this is not an official VMware patch, I would suggest you only apply this patch for the purpose of verifying your iSCSI SAN's interoperability with ESX 3.0, and for internal testing purposes.


To apply the patch, rename the iscsi_mod.o file in the /usr/lib/vmware/vmkmod/ directory (ie. iscsi_mod.o.BAK), and copy my patched iscsi_mod.o in its place. Ensure that the file attributes are set correctly by issuing a chmod 444 iscsi_mod.o At that point, reboot your ESX server and test connectivity to your IP SAN.


Please note that this patch may not work for all iSCSI target implementations for which the above dialog error message occurs. Even after applying this patch, I have discovered that some iSCSI target implementations simply do not respect the RESERVE and RELEASE commands. For example, Novell NetWare 6.5's iSCSI target does not support RESERVE / RELEASE at all.


You can download the patch from here


I will be following this thread... let me know how it works for you!


Regards, Paul.

Re: iSCSI patch available for ESX 3.0

2. Aug 31, 2006 4:55 PM in response to: Paul Lalonde
Click to view virtuality's profile Lurker 1 posts since
Jul 5, 2005
Paul,

Thanks for this information. For clarity, where would one expect to see such an error popup displayed in your problem description? Is this displayed within an instance of a Virtual Machine or does this come from the ESX 3.0 console itself?

Thanks

Re: iSCSI patch available for ESX 3.0

6. Sep 1, 2006 10:35 AM in response to: Paul Lalonde
Click to view shospes's profile Lurker 1 posts since
Sep 1, 2006
Paul,

Thanks for all the info on this problem. We are currently playing with the Nimbus Data MX4 and having no luck at all. Anyone else have any luck with this platform or are we out of luck?

Re: iSCSI patch available for ESX 3.0

8. Sep 2, 2006 12:04 AM in response to: Paul Lalonde
Click to view KaZaN's profile Enthusiast 107 posts since
Apr 15, 2006
Man, this patch really helps me to connect to OpenFiler iSCSI .... thank good and that gold hands that create this good patch...

Re: iSCSI patch available for ESX 3.0

9. Sep 5, 2006 3:43 AM in response to: Paul Lalonde
Click to view archetrix's profile Novice 15 posts since
Mar 14, 2006
Hi Paul,

since we still have a problem with our iSCSI even after applying your patch it seems we have to go and tweak the sources like you did.

Could we have a look at the sources of your patch, to see what has changed?

Regards Andreas

Re: iSCSI patch available for ESX 3.0

12. Sep 6, 2006 8:02 AM in response to: Paul Lalonde
Click to view archetrix's profile Novice 15 posts since
Mar 14, 2006
We are using a Sun StorEdge 5310.

It seems that this is a Netapp Storage in Sun disguise.

Re: iSCSI patch available for ESX 3.0

13. Sep 13, 2006 8:11 AM in response to: archetrix
Click to view donbaek's profile Enthusiast VMware Employees 107 posts since
Jul 25, 2005
In that case it should work out of the box - could you try the following:

1. Can you do a 'ping <target>' and a 'vmkping <target>' and let me know which ones works. They should both work...

2. If the above works, do a 'cat /proc/scsi/vmkiscsi/*' and see if there are any lines here. If there are any questionmarks, please dump the output in the forum.

We can take it from there.

/Thor

Re: iSCSI patch available for ESX 3.0

14. Sep 14, 2006 6:31 AM in response to: Paul Lalonde
Click to view cansinoo's profile Lurker 1 posts since
Jun 22, 2006
Paul, what if we can successfully add the storage (SAN Melody server) but when we attempt to clone or migrate the VM from local hard drive to iSCSI we are getting this error message? what would be our problem, thanks.

olga
1 2 3 ... 5 Previous Next Go to original post

VMware Beta Programs

Want to be Considered for Future Beta Programs?

Learn More

VMware Developer

Download SDKs, APIs, videos,
training, and more in the Developer community.

Learn More

Developer
Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld
Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

Only VMware ... Delivers Nexus 1000V

Ensure consistent, policy-based network capabilities to virtual machines across your data center.

Learn More

Communities