≡ Menu

Accessing A Single iSCSI LUN From Multiple Linux Systems

Q. I’d like to share iSCSI storage with our 3 node web server cluster. How can multiple systems access a single iSCSI LUN under Linux operating system? Can I connect multiple servers to a single iSCSI LUN?

A. Short answer – no it is not possible.

Long answer – It is possible to access a single iSCSI LUN using cluster aware file system such as GFS or OCFS2. You can also use NFS or Samba for sharing file system. iSCSI provides no file locking. This may result into serious data corruption. To share LUN simply use cluster aware file system.

Share this tutorial on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:

{ 4 comments… add one }
  • Aaron Conaway April 21, 2008, 12:18 pm

    Using NFS or Samba will allow all the hosts to access the same file system, but that solution comes with a single point of failure in the NFS or SMB server. Even the iSCSI server is a single point of failure as well. Storage on a highly-available SAN with multiple paths to the end nodes has proven to be an effective solution for this scenario.

  • Casey Kirkruff August 25, 2008, 10:40 pm

    To alleviate the single point of error in an iscsi SAN, it’s best to, as mentioned above, use multiple paths, but also to use DRBD to mirror files from one storage box to another, and heartbeat to make sure that a working machine is placed at the fore. There’s a couple of good faqs on how to do that too. Even better, both DRBD and Heartbeat are in yum.

  • Thomas Chapon July 10, 2009, 11:15 pm

    I have been using an iSCSI SAN in production for over a year with open-iscsi, heartbeat, and samba. The way I look at it is that you need to go with the simplest solution possible. I have used DRBD and OCFS2, and to be quite honest I think that those solutions have too many moving parts. With DRBD in particular, I have had several issues including complete breakage during host upgrades, resulting in many hours lost recovering from backups. By comparison, samba has had a relatively clean upgrade process for me over the past several years. I’m also not sure how DRBD addresses the situation described in the original question. It sounds like the scenario involves a single iSCSI storage device. Though with multiple storage devices, DRBD could be applicable for synchronization.

    With the open-iscsi, heartbeat, and samba solution, you simply use open-iscsi to make the SAN available to the servers, heartbeat to manage the SAN mountpoint and samba daemon startup, and samba to provide file-level access to the cluster. Block-level access via OCFS2 is a killer feature, but it comes at the cost of added configuration complexity and runtime overhead.

    Multipathing is completely different. If you need maximum uptime, then add the additional hardware (Ethernet cards and switch) and configure, e.g. device bonding. I suppose there’s also a marginal throughput benefit to this approach depending on many factors, such as the RAID type, disc partitioning, file system, I/O, etc., and requires block-level access (cluster file system) to the shared LUN.

  • hemant September 19, 2013, 9:55 am

    IS there any way we can use iscsi to muliple system.

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , , , , , , , , , ,