25
CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World Europe 2011 Michael Adam [email protected] Samba Team / SerNet 2011-11-03

CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

  • Upload
    phamtu

  • View
    227

  • Download
    7

Embed Size (px)

Citation preview

Page 1: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

CTDB + Samba:Scalable Network Storage For The Cloud

Storage Networking World Europe 2011

Michael Adam

[email protected]

Samba Team / SerNet

2011-11-03

Page 2: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

Introduction

Page 3: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

about:Samba

Since 1992:

I The open source SMB/CIFS/SMB2 file server

I high performance

I production proven and reliable

I used in many products/appliances

I Windows AD domain member

I some 15− 20 core developers

Michael Adam CTDB + Samba (3 / 25)

Page 4: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

about:SerNet

I OpenSource/Linux centric company in Germany

I founded 1996

I today: 40-50 employees

I Samba department: 5 Samba core team membersincluding the release manager

I Samba development and consulting as a service

Michael Adam CTDB + Samba (4 / 25)

Page 5: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

Around 2005/2006, it started...

Page 6: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World
Page 7: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

Goal

Create a clustered NAS (CIFS/NFS):

I all-active

I available

I scalable

I good performance

Michael Adam CTDB + Samba (7 / 25)

Page 8: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

Since 2007 ...

... with CTDB ,

Michael Adam CTDB + Samba (8 / 25)

Page 9: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

CTDB

Page 10: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

Clustering Samba - Challenges And Chances

I Prerequisite: a distributed/clustered file system (POSIX)

I Requirement: No client changes! (Windows...)

I all-active ⇒ all nodes act as one CIFS server

I Samba’s process model ⇒ clustering is imaginable

I IPC: messaging

I IPC: sessions, connections, open files, locks, ...

I Persistent data: secrets, registry, id-map, ...

Michael Adam CTDB + Samba (10 / 25)

Page 11: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

Clustering Samba - TDB

I all that stuff is stored in TDB databases

I TDB (trivial database):small, fast, key-value database with record locks and memory mapping

I ⇒ we essentially need: a clustered TDB implementation(plus messaging)

I available general purpose clustered databases not sufficient(performance, scalability)

Michael Adam CTDB + Samba (11 / 25)

Page 12: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

CTDB ...

I is a very special clustered database implementation(may lose data...)

I is an inter-node-IPC implementation for Samba (messaging)

I is also a simple cluster service management software

I makes Samba on a file system cluster appear as a singleCIFS/SMB/SMB2 server

I does not require any client changes to access the Samba cluster

Michael Adam CTDB + Samba (12 / 25)

Page 13: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

How CTDB Works

Michael Adam CTDB + Samba (13 / 25)

Page 14: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

CTDB - History

I first prototypes: 2006 (Volker Lendecke, Andrew Tridgell)

I first usable version: 2007 (non-persistent DBs only)

I today: Ronnie Sahlberg maintainer

I developers: Ronnie Sahlberg, Rusty Russell, Martin Schwenke,Michael Adam, Stefan Metzmacher, Volker Lendecke, ...

Michael Adam CTDB + Samba (14 / 25)

Page 15: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

CTDB - Community

I http://ctdb.samba.org/

I mailinglist: [email protected]

I irc: freenode.org, channels #ctdb and #samba-technical

I code: git://git.samba.org/ctdb.git

I branches: master, 1.2, 1.0.114, ...

Michael Adam CTDB + Samba (15 / 25)

Page 16: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

Cluster Filesystems

I GPFS

I GFS2

I OCFS2

I GlusterFS

I Ceph (soon)

I ...

Michael Adam CTDB + Samba (16 / 25)

Page 17: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

Recent And Current Projects

Page 18: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

Recent Improvements

I vacuuming

I persistent transactions

I samba persistent db performance tuning

I tools

Michael Adam CTDB + Samba (18 / 25)

Page 19: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

Current and Future Projects

I CTDB client library (libctdb)

I read-only record copies (ongoing)

I smb 2.0: durable handles

I smb 2.1: multi-credit, resilient handles, leasing, ...

I smb 2.2: multi-channel, persistent handles, RDMA, cluster features

Michael Adam CTDB + Samba (19 / 25)

Page 20: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

SMB 2.2

I presented by Microsoft at the SNIA Storage Developer Conference(September 2011)

I Microsoft embraces CIFS clustering

I client changes: much of the failover logic in the client

I multi-channel (client side channel bonding)

I SMB direct (SMB over RDMA): infiniband transport etc

I intended to replace NFS and SAN use cases

I preview docs and OS images available

I Samba Team started to work on design and implementation

Michael Adam CTDB + Samba (20 / 25)

Page 21: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

Management and Integration

Page 22: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

CTDB as cluster manager

I manages services (samba/winbind/nfs/apache/...):start/stop/monitor

I pluggable extensible event script architecture(/etc/ctdb/events.d/)

I handles IP (re)allocation on public network: fail-over/fail-back

I tickles clients to reconnect in case of fail-over

I When this was created, Linux cluster stack did not have all-active.

I But nowadays, pacemaker is getting more popular in distributions.

I All of the above CTDB features are optional.

Michael Adam CTDB + Samba (22 / 25)

Page 23: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

Integrating CTDB and Samba

Two choices:

Independently of Linux cluster stack

I CTDB manages samba

I CTDB manages winbindd

I CTDB manges public IP addresses

As managed resources

I CTDB does not manage samba, winbind nor public IPs

I CTDB only provides clustered TDB services

I Linux cluster suite (pacemaker) manages CTDB and Samba andWinbind

I Resource dependency: Cluster FS ⇒ CTDB ⇒ winbindd ⇒ samba

Michael Adam CTDB + Samba (23 / 25)

Page 24: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

Integration: Status Quo

I Red HatI starts using pacemakerI currently (RHEL 6) CTDB is run as system service managing Samba,

not as a cluster resourceI Samba+CTDB+GFS howto (on wiki.samba.org)I RHEL 7 will use pacemaker

I SuSEI pacemaker is used (SLES 11)I CTDB runs as managed cluster resource, but...I currently CTDB manages samba and winbindd /I but there is a mode for CTDB to run as clustered TDB only ,I matching resource agents for samba and winbindd still needed ...

Michael Adam CTDB + Samba (24 / 25)

Page 25: CTDB + Samba: Scalable Network Storage For The Cloud ...obnox/presentations/snweurope-2011/snw... · CTDB + Samba: Scalable Network Storage For The Cloud Storage Networking World

Thank you very much!