What are the pros and cons of OCFS2 and GFS2 filesystems versus NFS?
We need to set up a SAN accessible from a bunch of computers, both virtualized and real. We have an iSCSI SAN and I need to ponder some of the options.
- What are the differences between GFS2 and OCFS2 ?
- Are they production-ready ?
- And how they compare to NFS ? (I can use it with that SAN)
Solution 1:
There seem to be some confusion between NFS and iSCSI/FC in general (not necessarily you, edomaur), so a little explanation first:
In the old days, a disk had to be "owned" by a particular server, since it had to be physically attached to it. This is now know as DAS - Directly Attached Storage. The disk then had to be formatted to be used by said computer, and it required a filesystem as well. On top of all this, you can add NFS, which takes local resources of a computer and shares them. Another thing to consider is that NFS behaves like a filesystem, and the basic storage unit is the file. A dedicated fileserver accessed via NFS (of CIFS) is usually referred as NAS, Network Attached Storage.
With the introduction of SANs (Storage Area Network), the disk now is not necessarily local to a particular computer, but it can be shared with multiple machines, via FibreChannel, iSCSI, FCoE,... However, the server will still assume the disk is local, and a normal filesystem will behave as if the disk is a DAS. This is not an issue if the disk is shared only for, say, High Availability, i.e. one server uses the SAN disk, and the other server will use it only if the primary goes down. All sort of bad things can happen, however, if there are issues with the HA setup, like Split-Brain, which may corrupt all your data.
If you instead want to have the SAN disk shared (like Oracle RAC), then your filesystem has to be aware that the "disk" is shared by a cluster of computers, in order to correctly coordinate access and locking to the physical disk and keep the filsystem cache coherent among all members of the cluster.
Now for the actual answers:
I do not have much expertise with either and I have never used them in production, but OCFS2 is developed by Oracle and it is used for RAC, so I guess it is production ready. I do not know much about GFS2 (other than it is derived from SGI' GFS and is developed by RedHat), but I think it is considered production ready as well. Maybe someone else will fill this gap.
As for NFS, I think you should go with that unless you have a very specific reason not to, mainly because it is a "simpler" and better understood technology.
Hope this helps.