6

I have a web application that is distributed over 3 servers. These 3 servers need a shared storage to access files. Since iSCSI is just a protocol, not a filesystem, it will not have any implementation of locking files; so if I just connect it as it is, I will just destroy all of the data.

According to my research, I would need an actual filesystem on these LUNs in order to function as I intend to use it.

How would that work? How can I implement a file system for the LUN?

OS Used: Ubuntu 16.* or 18.*

  • Hi, We need more information, especially what OS would access it. – yagmoth555 Jul 21 at 18:16
  • @yagmoth555 sorry, added now. any other information would be useful ? – Anton Stafeyev Jul 21 at 18:18
12

You need to have some sort of either a clustered file system or distributed lock manager to avoid metadata damage done to your file system with concurrent writes.

There's a good summary of this issue on StarWind forum.

https://forums.starwindsoftware.com/viewtopic.php?f=5&t=1392

5

Generally speaking, you need a cluster in order to share storage between multiple systems (unless you want one of them to act as a file server).

I don't actually know anything about building clusters on Ubuntu, but this looks promising: http://manpages.ubuntu.com/manpages/cosmic/man7/ocfs2.7.html.

  • thanks man, thats exactly what i was lookign for – Anton Stafeyev Jul 21 at 20:51
  • it solved the problem partially, since ocfs2 allows storage up to 16TB, what would be a solution if my storage needs are about 60-80TB – Anton Stafeyev Jul 22 at 10:37
1

So after some research, I came up with few solutions that would be interesting for those who are looking to set up remote storage or a cluster.

  1. Reconsider your network and your needs. One thing that I ran into is setting up an iscsi with cluster-aware file systems is not an easy task. Additionally GFS and OCFS2 do not have well-documented troubleshooting guide available to the public. In the case of OCFS2, you would need to be Oracle's customer and have an active support account. same with GFS2. if you are Centos user, you are stuck with online tutorials and no support for it.

  2. Most likely it is out of your budget anyway. Consider using NFS for hobby-small-medium business. it is much easier to set up, it has plenty of documentation online.

  3. If you really need an iscsi LUN to be shared across multiple machines, then there are 3 solutions available out there. Oracles OCFS2, Red Hat GFS2, VMFS. all 3 are cluster-aware file systems. OCFS2 is simpler to set up but requires you to have access to oracle support which is not free, GFS2 is not as simple as OCFS2 because you would have to manually set up bits of it but it also makes it more customizable. ad VMFS which is cool to use with your ESXI server to keep your VM machines there.

I hope that helps some users in the future when deciding what you actually need for your network and storage. I personally opted for NFS as storage and dedicated iscsi to ESXI server for image booting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.