[Ocfs2-users] mailcluster advice?

jmoseley at corp.xanadoo.com jmoseley at corp.xanadoo.com
Mon Jan 5 22:14:23 PST 2009






jmoseley at corp.xanadoo.com wrote:
>> Of course they are not.  I'm simply trying to understand the
capabilities
>> and limitations of the Oracle cluster filesystem.  With an NFS mounted
>> filesystem, you can have two servers mount the same volume and perform
>> simultaneous reads/writes while the NFS mechanism takes care of locking,
>> etc.  This scenario works fine for a mailserver.

>Really? What kind of locking are you referring to here? As in,
>explicit unix locking, flock() or lockf() or something more.

>> My question is can two non-clustered servers, or two non-clustered
>> applications, mount the same OFCS2 volume and perform simultaneous
>> reads/writes without fear of data corruption on the volume?

>If that application spawns multiple processes, ocfs2 will allow
>them to run on different nodes and access the same files. Now
>as far as data sanity goes, it depends on how the application
>serializes the access. Standard unix mechanisms are flock()
>and/or lockf(). OCFS2 has support for clustered flock() in OCFS2
>1.4 and in mainline kernels, 2.6.26 and higher. While support for
>lockf() has been added in 2.6.27, the user space cluster stack
>support required is still a work in progress.

>So the answer is, it depends on the application. Specifically, it
>depends on how the application serializes access to the data.

I am definitely far from an expert on various file locking schemes, whether
they be part of the OS, application, or the filesystem layer.  Other than
standard Linux flock() or application locking, I had always assumed that
with NFS, the NFS lock daemon kept two different NFS clients from writing
to the same file inode concurrently.

In the setup I am wondering about, I would running Postfix and Courier-IMAP
on two different Linux boxes, each being a node of an OCFS2-mounted
filesystem.  The applications would be cluster-unaware, but have their own
file locking capabilities (flock for Postfix and lockfile, a courier
locking utility).

The question, therefore, is what kind of file locking does the OCFS2
locking manager provide on it's own, especially in the case of two
applications (that utilize no file locking of their own) that are
cluster-unaware running on two different OCFS2 nodes?

Many folks, including myself, have administered multi-server mail setups
where each mail server is running sendmail/postfix with a courier-imap/pop3
backend in an NFS environment with very good success.  That is to say, they
all mount and read/write to the same NFS mounted filesystem where the mail
spools are located.  The NFS server can either be a Linux box or a high-end
Network Appliance.

Another way to put the question is would the above setup work with an OFCS2
filesystem, or does OCFS2 depend on the applications running on each node
to be cluster-aware or at least attempt to do their own file locking?





More information about the Ocfs2-users mailing list