1

I use CentOS 7.

I created simple target/initiator configuration and two acls(ACL) for two users.

However, when I mount on both users and write from the first user, write changes don't propagate to the second user.

It looks like the initiator caches all changes on the host and only submits them to target at the end of the session when he logouts.

Second user sees new changes only if first user logouts and second user unmounts and remounts LUN again. I enabled write-thru on backstore and mapped acls to LUN as rw.

I did configuration and tried on various distributions, still the problem is the same. I could attach configuration as necessary, I think it's pretty general and simple so I don't provide it first hand.


How to allow write changes to propagate to other users that are attached to the same LUN? Thanks.

It seems that it should be expected behaviour but definitive point would be appreciated.

1 Answers1

2

iSCSI doesn't do what you think it does. Most file systems are designed to be mounted by only one operating system, but you want two clients to mount the same file system in your iSCSI LUN.

Why This Doesn't Work

Imagine one hard drive that you somehow connected to two computers (or a host and its virtual machine sharing a virtual disk). This is your two iSCSI initiators (2 computers) connecting to your single LUN (1 hard drive).

When you mount the file system on the hard drive to somewhere on both computers, each computer does not have any idea that the other is also using the file system. This can lead to serious data corruption because each computer is stepping over the other's toes.

What You Can Do Instead

Don't let your initiators directly connect to the same LUN over iSCSI.

You need the server to keep track of the changes made to the shared file system. Since the clients don't know about each other's changes, a server must be employed to do that.

Two implementations of this are NFS and CIFS, which are their own file systems.

NFS or CIFS sits as a layer between the client and server's local file system so that the clients don't conflict with each other.

Resources

Basic Walk-Throughs

Above and Beyond

You can set up scalable distributed file systems fairly easily with:

Deltik
  • 19,971