Clustered NAS For Everyone Clustering Samba With CTDB. NLUUG Spring Conference 2009 File Systems and Storage

Similar documents
Clustered NAS For Everyone Clustering Samba With CTDB A Tutorial At sambaxp 2009

Clustering Samba With CTDB A Tutorial At sambaxp 2010

Clustering Samba With CTDB A Tutorial At sambaxp 2010

Running And Troubleshooting A Samba/CTDB Cluster. A Tutorial At sambaxp 2011

CTDB + Samba: Scalable Network Storage For The Cloud. Storage Networking World Europe 2011

Clustered Samba Not just a hack any more

From an open storage solution to a clustered NAS appliance

Experiences in Clustering CIFS for IBM Scale Out Network Attached Storage (SONAS)

SMB2 and SMB3 in Samba: Durable File Handles and Beyond. sambaxp 2012

PLAYING NICE WITH OTHERS: Samba HA with Pacemaker

The State of Samba (June 2011) Jeremy Allison Samba Team/Google Open Source Programs Office

Clustered Samba Challenges and Directions. SDC 2016 Santa Clara

SNIA SDC 2018 Santa Clara

SerNet. Samba Status Update. SNIA SDC 2011 Santa Clara, CA. Volker Lendecke SerNet Samba Team

The CephFS Gateways Samba and NFS-Ganesha. David Disseldorp Supriti Singh

Centralized configuration management using registry tdb in a CTDB cluster

Samba in a cross protocol environment

The Samba-3: Overview, Authentication, Integration

System that permanently stores data Usually layered on top of a lower-level physical storage medium Divided into logical units called files

CIFS ON OPENVMS. Tips and Hints. Paul Bakker, Hans Hosang. Platform Integration Competency Center.

The Samba-3 Enchilada: Overview, Authentication, Integration

HANDLING PERSISTENT PROBLEMS: PERSISTENT HANDLES IN SAMBA. Ira Cooper Tech Lead / Red Hat Storage SMB Team May 20, 2015 SambaXP

SDC EMEA 2019 Tel Aviv

Network-based File Sharing (1)

Comparison of different distributed file systems for use with Samba/CTDB

Migration of NT4 to Samba-3

Shared File System Requirements for SAS Grid Manager. Table Talk #1546 Ben Smith / Brian Porter

SMB3 Multi-Channel in Samba

Samba in Business. John H Terpstra

Implementing Persistent Handles in Samba. Ralph Böhme, Samba Team, SerNet

Samba4 Progress - March Andrew Tridgell Samba Team

AutoRID module extensions to control ID generation

CTDB Remix - Dreaming the Fantasy

Samba. OpenLDAP Developer s Day. Volker Lendecke, Günther Deschner Samba Team

Samba 4 Status Report

Chapter 6: Connecting Windows Workstations

Implementing SMB2 in Samba. Opening Windows to a Wider. Jeremy Allison Samba Team/Google Open Source Programs Office

The General Parallel File System

Samba4 Status - April Andrew Tridgell Samba Team

ClearCase and Samba. A Supported Configuration. Lonnie Roscillo and Sue Meany. December 12, ClearCase Support Whitepaper

Samba and Ceph. Release the Kraken! David Disseldorp

Parallel File Systems for HPC

Emulating Windows file serving on POSIX. Jeremy Allison Samba Team

IdMap and Nss Info Interface Changes in Samba

Linux Administration

Setting Up SAMBA. And the response was: salmonberry samba sawtimber scramble. Thus, the name Samba was born.

File systems: management 1

Development Using Samba 4

The Future of Storage

February 15, 2012 FAST 2012 San Jose NFSv4.1 pnfs product community

Sharing files and printers with Microsoft Windows

Mission-Critical Lustre at Santos. Adam Fox, Lustre User Group 2016

UPDATING SAMBA-3. Chapter Introduction

CONFIGURING IBM STORWIZE. for Metadata Framework 6.3

Network-based File Sharing

Operating Systems, Fall

Towards full NTFS semantics in Samba. Andrew Tridgell

Cloud Computing CS

Step by Step Gluster Setup Table of Contents

Crossing the Chasm: Sneaking a parallel file system into Hadoop

Mission Critical Linux

Linux Clustering Technologies. Mark Spencer November 8, 2005

Sample Configuration File

Crossing the Chasm: Sneaking a parallel file system into Hadoop

Lustre A Platform for Intelligent Scale-Out Storage

SDC 2015 Santa Clara

HP OpenVMS CIFS File Security and Management

Distributed File Systems. CS 537 Lecture 15. Distributed File Systems. Transfer Model. Naming transparency 3/27/09

Distributed file systems

SIOS Protection Suite for Linux v9.0. Samba Recovery Kit Administration Guide

Implementing a Primary Domain Controller for Windows 2000 Clients using Samba

HP CIFS Server Administrator Guide version A

680 Subject Index. fake directory create times, 524 fake oplocks, 167, 524 File Naming Conventions, 162 File System, 160 case sensitivity, 161

Install and Configure Samba - CentOS 7

Red Hat Enterprise Linux Red Hat Enterprise Linux Deployment Guide

Release Date March Release Notes: Appliance Controller 2.0.x 2. New Features for Release 2.0.x 4

Open Source Storage. Ric Wheeler Architect & Senior Manager April 30, 2012

BeoLink.org. Design and build an inexpensive DFS. Fabrizio Manfredi Furuholmen. FrOSCon August 2008

HP CIFS Server Administrator's Guide Version A.03.01

SCSI Device Memory Export Protocol (DMEP) T10 Presentation

Release Date August Release Notes: Appliance Controller x 2. New Features for Controller x 4

Data Management. Parallel Filesystems. Dr David Henty HPC Training and Support

Chapter 11: File-System Interface

The WebGUI Runtime Environment. Roy Johnson Plain Black Corporation

Samba ARMed and Ready

Failover procedure for Grid core services

CIFS Geeks in Exile - or -

CS 470 Spring Distributed Web and File Systems. Mike Lam, Professor. Content taken from the following:

Samba-3: Integration and Cost Reduction

Filesharing. Jason Healy, Director of Networks and Systems

Red Hat Global File System

SMB3 and Linux Seamless POSIX file serving. Jeremy Allison Samba Team.

IBM IBM Open Systems Storage Solutions Version 4. Download Full Version :

Novell Open Enterprise Server

Around the Linux File System World in 45 minutes

EMC Unity Family EMC Unity All Flash, EMC Unity Hybrid, EMC UnityVSA

Bigtable: A Distributed Storage System for Structured Data By Fay Chang, et al. OSDI Presented by Xiang Gao

CS /15/16. Paul Krzyzanowski 1. Question 1. Distributed Systems 2016 Exam 2 Review. Question 3. Question 2. Question 5.

Oracle RAC Course Content

NFS around the world Tigran Mkrtchyan for dcache Team dcache User Workshop, Umeå, Sweden

Transcription:

Clustered NAS For Everyone Clustering Samba With CTDB NLUUG Spring Conference 2009 File Systems and Storage Michael Adam obnox@samba.org 2009-05-07 Contents 1 Cluster Challenges 2 1.1 The Ideas............................... 2 1.2 Challenges For Samba........................ 2 2 CTDB 4 2.1 The CTDB Project.......................... 4 2.2 CTDB Design............................. 4 2.3 Clustered File Systems........................ 6 2.4 Setting Up CTDB.......................... 6 3 Clustered Samba 8 3.1 Configuration Options........................ 8 3.2 Registry Configuration........................ 9 1

1 Cluster Challenges 1.1 The Ideas Basic Ideas storage tends to become too small use a SAN and volume based file systems services using the storage tend to become too slow cluster these services (all-active) this clustering makes use of a clustered file system quite common for web and database servers how about offering the file system itself via CIFS or NFS in a clustered fashion? i.e. turn your SAN in a clustered NAS... Windows servers don t offer this form of clustering Samba now does! With the help of CTDB. 1.2 Challenges For Samba About Samba open source software (GPL) started in 1992 file and print services for windows clients on unix systems makes unix host appear in the windows network neighborhood member file server in windows NT and Active Directory domains can act as NT-stype domain controller (logon server) deployed widely in production environments Samba4 (alpha): Active Directory domain controller Challenges For Samba samba daemons on cluster nodes need to act as one CIFS server: view of file ownership windows file lock coherence samba instances need to share certain persistent data: user database (passdb.tdb) join information (secrets.tdb) 2

id mapping tables (winbindd idmap.tdb) further share volatile session data: SMB sessions (sessionid.tdb) share connections (connections.tdb) share modes (locking.tdb) byte range locks (brlock.tdb) messaging TDBs And Clustering Goals most problems are about distributing TDBs in the cluster TDB: small, fast Berkeley-DB-style database with record locks and memory mapping persistent TDBs vs. normal (volatile) TDBs TDB R/W performance critical for Samba performance TDB R/W ops: excessive use of POSIX fcntl byte range locks fcntl locks are slow on cluster file systems the more nodes, the slower... naive approach of putting TDBs on cluster storage works in principle but scales very badly A more clever approach is needed. Cluster Samba So That: One node is not slower than an unclustered Samba server. n + 1 nodes are faster than n nodes. This requires a clustered TDB implementation...... and messaging solution. CTDB :-) 3

2 CTDB 2.1 The CTDB Project The CTDB Project started in 2006 first prototypes by Volker Lendecke, Andrew Tridgell,... first usable version of CTDB: April 2007 meanwhile: Ronnie Sahlberg project maintainer git://git.samba.org/sahlberg/ctdb.git http://ctdb.samba.org/packages/ (RPMs, Sources) Currently runs on Linux and AIX 2.2 CTDB Design CTDB Design one daemon ctdbd on each node smbd talks to local ctdbd for messaging and TDB access ctdbd handles metadata of TDBs via the network ctdbd keeps local TDB copy (LTDB) for fast data reads/writes persistent and normal TDBs are handled differently CTDB distributes public IPs across cluster nodes management features: Samba, NFS and other services CTDB - Basic Setup 4

persistent TDBs complete copy in LTDB on all nodes read ops directly on LTDB (fast) write ops automatically distributed to all nodes (slow) data integrity and read performance guaranteed normal TDBs some records may be lost keep only needed records in LTDB most records are only ever accessed by one node only one node has current copy of a record (data master) before accessing a record, switch data master role good R/W performance, and sufficient data integrity Performance Figures By Andrew Tridgell and Ronnie Sahlberg, Linux Conf Australia 2008 32 client smbtorture NBENCH test 1 node: 109 MBytes/sec 2 nodes: 210 MBytes/sec 3 nodes: 278 MBytes/sec 4 nodes: 308 MBytes/sec Recovery what happens when a node goes down? data master for some records will be lost one node (recovery master) performs recovery recovery master collects most recent copy of all records from all nodes at the end, the recovery master is data master for all records Recovery Election / Recovery Lock recovery master is determined by an election process election involves recovery lock file on shared storage nodes compete with POSIX fcntl byte range locks finally, the new recovery master holds lock on the recovery lock file CTDB requires POSIX fcntl lock support in the cluster FS CTDB has no split brain (other than the file system) 5

2.3 Clustered File Systems Clustered File System - Requirements file system : black box storage: fibre channel, iscsi, drbd,... simulatneous writes from all nodes coherent POSIX fcntl byte range lock support use ping pong test to verify Special File Systems General Parallel File System GPFS (IBM): OK Global File System GFS(2) (Red Hat): OK GNU Cluster File System GlusterFS: OK Lustre (Sun): OK Oracle Cluster File System OCFS(2) : not yet OK 2.4 Setting Up CTDB CTDB - Configuration central file: /etc/sysconfig/ctdb must set: CTDB RECOVERY LOCK fill /etc/ctdb/nodes with internal addresses same file on all nodes! example /etc/ctdb/nodes 10.0.0.10 10.0.0.11 10.0.0.12 10.0.0.13 CTDB - Public Addresses set CTDB PUBLIC ADDRESSES in /etc/sysconfig/ctdb typical value /etc/ctdb/public addresses example /etc/ctdb/public addresses 192.168.111.10/24 eth0 192.168.111.11/24 eth0 192.168.111.12/24 eth0 192.168.111.13/24 eth0 need not be the same on all nodes need not even be present on all nodes (management node...) 6

IP Failover healthy nodes get IP addresses from their public pool when a node goes done: public IPs moved to other nodes CTDB distributes the public IPs equally among healthy nodes with round robin DNS HA and load balancing speed up client reconnects with tickle ACKs! CTDB Toolbox ctdb control ctdbd onnode execute programs on selected nodes ctdb status ctdb ip 7

CTDB manages... CTDB can manage several services i.e. start, stop, monitor them controlled by sysconfig variables CTDB MANAGES SERVICE management performed by scripts in /etc/ctdb/events.d managed services should be removed from the runlevels CTDB manages... CTDB MANAGES SAMBA CTDB MANAGES WINBIND CTDB MANAGES NFS CTDB MANAGES VSFTPD CTDB MANAGES HTTPD 3 Clustered Samba Getting A Clustered Samba in vanilla Samba code since Samba 3.3 (January 2009) precompiled packages from http://www.enterprisesamba.org/ configure --with-cluster-support add idmap tdb2 to --with-shared-modules verify that gpfs.so is built for GPFS usage 3.1 Configuration Options Samba Configuration identical configuration on all nodes clustering = yes passdb backend = tdbsam groupdb:backend = tdb idmap backend = tdb2 vfs objects = fileid fileid:algorithm = fsid / fsname no need to change private dir 8

if CTDB MANAGES SAMBA, do not set interfaces or bind interfaces only example smb.conf [global] clustering = yes netbios name = smbcluster workgroup = mydomain security = ads passdb backend = tdbsam groupdb:backend = tdb idmap backend = tdb2 idmap uid = 1000000-2000000 idmap gid = 1000000-2000000 [share] path = /cluster storage/share writeable = yes vfs objects = fileid fileid:algorithm = fsname 3.2 Registry Configuration Registry Configuration store config in Samba s registry HKLM\Software\Samba\smbconf subkey section value parameter stored in registry.tdb distributed across cluster by CTDB means of easily managing the whole Samba cluster Activation of Registry Configuration registry shares = yes include = registry config backend = registry smb.conf for cluster usage [global] clustering = yes include = registry 9

net conf Manage the whole samba cluster with one command: net conf list net conf listshares net conf import net conf drop net conf showshare net conf addshare net conf delshare net conf setparm net conf getparm net conf delparm net conf getincludes net conf setincludes net conf delincludes Dump the complete configuration in smb.conf format. List the share names. Import configuration from file in smb.conf format. Delete the complete configuration. Show the definition of a share. Create a new share. Delete a share. Store a parameter. Retrieve the value of a parameter. Delete a parameter. Show the includes of a share definition. Set includes for a share. Delete includes from a share definition. 10