Storage

When is it okay to allow multiple hosts to connect to a single iSCSI array?

Scott Lowe answers a TR member's question about the wisdom of connecting multiple hosts to a single iSCSI array.

A few weeks ago, I wrote an article explaining different kinds of storage and I included a diagram that showed multiple hosts connected to a single iSCSI array. An astute TechRepublic reader raised the following question in the comments section:

"From your diagram, it appears that multiple hosts are connecting to a single iSCSI target — is this correct? Are there any complications with connecting more than one machine to a single target? If so, what is the ideal setup for having multiple hosts connect to a single target?"

The short answer to the first part of the question is yes. In the diagram, multiple hosts are, indeed, connecting to a single iSCSI array. The hosts may be connecting to different individual LUNs/targets or multiple hosts may be connecting to the same target. Both scenarios are supported in a shared storage environment.

The second part of your question is excellent. Under the wrong conditions, allowing multiple hosts access to a single target is an exceptionally bad idea. Doing so can lead to all manners of problems, including data corruption. Some iSCSI devices have a configuration option on new targets, which won't allow multiple hosts to connect simultaneously.

The reason: iSCSI itself doesn't do anything in the way of file locking. It's simply a block-level protocol that enables storage data transmission over the network. iSCSI itself doesn't know what a file is. Think of it like Ethernet. Ethernet doesn't know what HTTP is... that's the job of higher level protocols; Ethernet's job is to just carry whatever is encapsulated inside Ethernet packets and then hand that data off to connected devices for further processing. If a real world scenario is more to your taste, think of iSCSI as your mailman. Your mailman doesn't know what's in your mail; he just places items into your mail... unless you have an unscrupulous mailman. Asking iSCSI to handle file locking would be like asking your mailman to pay your bills.

By the way, this doesn't pertain to just iSCSI. It's true for any storage transport protocol, including Fibre Channel, AoE and more. The transport protocol itself is not responsible for locking.

But, in some cases, you want multiple hosts to access the target. For example, if you're deploying VMware or a Microsoft cluster, shared storage is part of the design. But, you still need a way for multiple hosts to safely access the data stored on the volume. This is the job of the file system that you choose to deploy into this raw space. Some examples of file systems that support strong locking are VMFS - used by VMware - and NFS, used by a variety of operating systems. These kinds of file systems are designed to support multi-host access to the stored data.

The last part of your question is tougher to answer since it needs additional context. Honestly, the "best" solution depends on what you're trying to do. If you're deploying vSphere, for example, use VMFS or NFS. If, however, you're running a Microsoft workload and need cluster services, VMFS would be a very poor choice. Here, your best bet is to turn to your solution provider for whatever solution you're implementing in order to get appropriate guidance and make sure that you're using a file system suitable to the task.

Summary

I hope that this answers your remaining questions about iSCSI and how it works!

About

Since 1994, Scott Lowe has been providing technology solutions to a variety of organizations. After spending 10 years in multiple CIO roles, Scott is now an independent consultant, blogger, author, owner of The 1610 Group, and a Senior IT Executive w...

Editor's Picks