I have one LUN disk connected over FC with linux server ( with centos) and esxi server with VM in Centos. (Two machines work in different LAN's.) In both machines i see this disk. In VM i created the partition and format in ext4 file system(ext3 i tried too). Then i mounted him to the system. In other machine i saw this LUN disk and also mounted it. So when i then create some file or directory in disk from one machine, i can't see thess from another while i remount from this disk. There is not some info in /var/log/messages. iptables off selinux = disabled. Any ideas?
1 Answers
So you have a single FC LUN presented to both a physical machine and to a VM and you want to use ext3 - is that right?
If so then you need to learn about the difference between block-level and file-level sharing - and quickly, as you've irretrievably corrupted this LUN already.
You have two machines (whether they're physicals or VMs is irrelevant) that both think they have exclusive access to the block system of the LUN, they have no idea that you want to share them so will just happily write away on their own - corrupting everything, including the underlying file system - it's toast already.
What you need to do is use a cluster-aware file system (such as OCFS2), this way the servers will be aware that others have access to the same storage and will arbitrate between them to maintain a coherent file system. This is how clusters work.
NAS's doing really need to worry about this problem because you're simply reading or writing to whole files and the NAS does the arbitration. This may sound much better than SANs but SANs, when setup correctly :), offer a great number of additional benefits of NAS boxes.
Anyway, get looking for a cluster-aware file-system and implement it properly - you're best deleting the existing LUN before doing so - it's not worth trying to save.
Hope this helps.

- 101,299
- 9
- 108
- 239