On 15 Feb 2015, at 23:34, ayaka <ayaka@xxxxxxxxxxx> wrote: > > > > 在 2015年02月16日 07:24, Chris Boot 写道: >> On 15 Feb 2015, at 22:48, ayaka <ayaka@xxxxxxxxxxx> wrote: >>> >>> Hi: I have a problem with that, there are two initiators >>> connected to the same target, I copy some files(write some data) >>> into the target in a initiator, then the other initiator can't >>> know that. What is the problem? The file system is XFS. Thank >>> you >> >> Hi ayaka, >> >> The problem is that you are not using a cluster-aware filesystem. >> >> Traditional filesystems like ext2/3/4, XFS, JFS and friends are >> designed to be used by a single machine per disk - pointing two >> machines at the same disk will not work. This is because they don’t >> know about other nodes and assume they can cache data in ways that >> break down when there are more nodes. Mounting the same disk in two >> places will lead to some very nasty filesystem corruption. >> > I see, then the solution uses Linux-HA, DRBD and iscsitarget in > network seems really a bad idea, in those example, they use ext3/4. Hi ayaka, Those examples probably never mount the filesystem from more than one place at a time. It’s perfectly safe as long as you don’t mount it in two places at the same time. Many HA setups use etc2/3/4 or XFS, but that means having a slave/secondary node that doesn’t keep the filesystem mounted. >> If you really want to do this, I suggest you look at filesystems >> like GFS or ocfs2 (on Linux). Note that neither is as simple as >> running mkfs then mounting. >> >> You may also be interested in other approaches to the same problem, >> such as GlusterFS or Ceph. >> > Maybe some NAS solution is more suitable for me. > So iscsi must be used with some cluster-aware filesystem for > multi-access? Or I must limit the only one initiator could access the > same target at the same time(MaxConnection?). If you need multiple nodes accessing the same data, a NAS type solution might work or use a cluster filesystem. If you can live with just one node accessing the data, a traditional filesystem will work just fine for you. What will work best for you really depends on what you are trying to achieve. Regards, Chris -- Chris Boot bootc@xxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html