Can CTDB be used to create HA NAS reexporting NFS via Samba?
ronnie sahlberg
ronniesahlberg at gmail.com
Wed Jan 14 06:02:31 GMT 2009
Hi Alexander,
You can do this with CTDB and a ctdb-ified version of samba.
But there are practical restrictions.
CTDB requires a filesystem that provides a coherent view of the
filesystem across the nodes that has it mounted.
NFS has no provisioning of coherence at all, not even across multiple
clients attached to a single server, and its actually surprising what
kind of stuff they (the NFS folks) get away with and why there is not
a lot more data corruption than actually occurs with nfs.
The only way to workaround these coherency issues within NFS is to
limit yourself to only use CTDB/Samba to build a pure ip failover kind
of cluster.
I.e. Two nodes both mapping the same "backend cluster filesystem" as
an NFS share off a backend NFS server
then a two node CTDB/Samba cluster which has one single "public ip"
defined. And then re-export the share through samba.
All clients attached to the public ip only so that only one of the
nodes are serving data/metadata at a time.
Only one of the two nodes would host that specific public ip at a time
and you would essentially have a active/passive failover solution.
CTDB/Samba would be a bit overkill for this situation and you would
probably be better off using heartbeat or something similar instead to
build your active/passive failover "cluster".
In short, its technically possible to use NFS as the backend
filesystem for CTDB/Samba but you dont want to do it.
Why dont you try one of the available cluster filesystems that comes
with linux instead and build a proper cluster?
Something like GFS, GFS2, PVFS, ... you name them they are too many to count...
For production use, there are commercial offerings available too.
On Tue, Jan 13, 2009 at 11:57 PM, Alexander <forsmbg at googlemail.com> wrote:
> Well, ok, I get it, thanks for the clarification, Volker.
> But I think that anyway it sounds good enough to try it out, how much of the
> availability it can bring.
>
> Have you anything to say about the main question, NFS being reexported in
> this setup? Will it work or it's hard to say or something?
>
> Thanks,
> Alexander
>
>
> On Tue, Jan 13, 2009 at 3:52 PM, Volker Lendecke
> <Volker.Lendecke at sernet.de>wrote:
>
>> On Tue, Jan 13, 2009 at 03:34:35PM +0300, Alexander wrote:
>> > potential for production use. And looking at its features like that
>> gentle
>> > TCP session takeover and everything - it looks like a solution for a
>> [kind
>> > of] true non-stop fileserver.
>>
>> No. Ctdb can't do TCP session failover. Ctdb has
>> capabilities to trigger the client to very quickly reconnect
>> under all circumstances. But the client will be able to tell
>> that a node failed.
>>
>> With SMB2 there will be support for so-called durable file
>> handles which make the client OS completely hide a failover
>> from the client applications. But that's not there yet in
>> Samba.
>>
>> Volker
>>
>
More information about the samba-technical
mailing list