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

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

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

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

SNIA SDC 2018 Santa Clara

PLAYING NICE WITH OTHERS: Samba HA with Pacemaker

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

From an open storage solution to a clustered NAS appliance

Clustered Samba Challenges and Directions. SDC 2016 Santa Clara

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

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

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

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

Samba in a cross protocol environment

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

Samba 4 Status Report

Centralized configuration management using registry tdb in a CTDB cluster

CTDB Remix - Dreaming the Fantasy

SMB3 Multi-Channel in Samba

SDC EMEA 2019 Tel Aviv

Network-based File Sharing (1)

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

The Samba-3: Overview, Authentication, Integration

The Samba-3 Enchilada: Overview, Authentication, Integration

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

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

Emulating Windows file serving on POSIX. Jeremy Allison Samba Team

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

Migration of NT4 to Samba-3

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

SDC 2015 Santa Clara

Samba4 Status - April Andrew Tridgell Samba Team

Samba4 Progress - March Andrew Tridgell Samba Team

AutoRID module extensions to control ID generation

Linux Administration

IdMap and Nss Info Interface Changes in Samba

Samba and Ceph. Release the Kraken! David Disseldorp

Samba in Business. John H Terpstra

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

Parallel File Systems for HPC

SerNet. Async Programming in Samba. Linuxkongress Oktober Volker Lendecke SerNet Samba Team. Network Service in a Service Network

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

CIFS Geeks in Exile - or -

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

Sharing files and printers with Microsoft Windows

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

Chapter 6: Connecting Windows Workstations

Cloud Computing CS

The General Parallel File System

Install and Configure Samba - CentOS 7

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

UPDATING SAMBA-3. Chapter Introduction

Lustre A Platform for Intelligent Scale-Out Storage

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

Step by Step Gluster Setup Table of Contents

Development Using Samba 4

HOW I LEARNED TO LOVE PERF AND SYSTEMTAP

Crossing the Chasm: Sneaking a parallel file system into Hadoop

Towards full NTFS semantics in Samba. Andrew Tridgell

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

Network-based File Sharing

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

The workstation account, netlogon schannel and credentials. SambaXP Volker Lendecke Samba Team / SerNet

Crossing the Chasm: Sneaking a parallel file system into Hadoop

Linux Clustering Technologies. Mark Spencer November 8, 2005

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

CONFIGURING IBM STORWIZE. for Metadata Framework 6.3

Surveillance Dell EMC Isilon Storage with Video Management Systems

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

Failover procedure for Grid core services

Chapter 11: File-System Interface

Mission Critical Linux

Programmation système

LifeKeeper for Linux Module 4: IP Recovery Kit

Sep-10. Copyright by SteelEye Technology, Inc. All Rights Reserved World Wide. LifeKeeper for Linux Module 4: IP Recovery Kit

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

Surveillance Dell EMC Isilon Storage with Video Management Systems

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

Badlock. One Year In Security Hell. Stefan Metzmacher Samba Team / SerNet

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

Synology High Availability (SHA)

Azure File Service: Expectations vs. Reality on the Public Cloud David Goebel Microsoft

File systems: management 1

Virtual Machine Migration

Highly Available Database Architectures in AWS. Santa Clara, California April 23th 25th, 2018 Mike Benshoof, Technical Account Manager, Percona

Linux File Systems: Challenges and Futures Ric Wheeler Red Hat

EMC VNXe Series. Configuring Hosts to Access NFS File Systems. Version 3.1 P/N REV. 03

The Future of Storage

A Distributed System Case Study: Apache Kafka. High throughput messaging for diverse consumers

CIT 668: System Architecture

Distributed file systems

Samba ARMed and Ready

MySQL Group Replication & MySQL InnoDB Cluster

WINS Replication. Stefan Metzmacher SerNet Service Network GmbH Samba Team

Filesharing. Jason Healy, Director of Networks and Systems

Accelerated NCDA Boot Camp Data ONTAP 7-Mode (ANCDABC87)

SCSI Device Memory Export Protocol (DMEP) T10 Presentation

Transcription:

Clustered NAS For Everyone Clustering Samba With A Tutorial At sambaxp 2009 Michael Adam obnox@samba.org SerNet / Samba Team 2009-04-21

Outline Outline 1 Cluster Challenges The Ideas Challenges For Samba 2 The Project Design Clustered File Systems Setting Up 3 Clustered Samba Configuration Options Registry Configuration Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 2 / 35

Cluster Challenges The Ideas 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 Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 4 / 35

Cluster Challenges Challenges For Samba 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) 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 Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 5 / 35

Cluster Challenges Challenges For Samba TDBs most problems are about distributing TDBs in the cluster TDB: small fast Berkeley-DB-style database with record locks and memory mapping persistent TDBs: read frequently written rather rarely data consistency very important volatile ( normal ) TDBs: read and written very frequently not all data must be known to every node (or smbd process) at each point in time R/W performance critical for overall fileserver performance especially important for the Windows locks Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 6 / 35

Cluster Challenges Challenges For Samba TDBs And Clustering TDB R/W performance critical for Samba performance TDB R/W operations: excessive use of POSIX fcntl byte range locks fcntl locks are usually 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. Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 7 / 35

Cluster Challenges Challenges For Samba Goals Cluster Samba So That: One node is not slower than an unclustered Samba server. n + 1 nodes should be faster than n nodes. This in requires a clustered TDB...... and messaging solution. :-) Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 8 / 35

The Project The Project started in 2006 first prototype in vl-messaging SVN branch Volker Lendecke, Andrew Tridgell,... first usable version of : April 2007 meanwhile: Ronnie Sahlberg project maintainer git://git.samba.org/sahlberg/ctdb.git http://ctdb.samba.org/packages/ (RPMs, Sources) Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 10 / 35

Design 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 management features Samba, NFS and other services Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 11 / 35

Design persistent TDBs each node always has complete copy in LTDB reads operations directly to LTDB write operations lock entire DB in a transaction perform R/W ops within the transaction at commit distribute changes to other nodes and write to LTDB data integrity and good read performance guaranteed Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 12 / 35

Design normal TDBs one node does not need to know all records all the time when a node goes down: we may, even should lose records specific to that node a node only has those records in its LTDB that is has already accessed only one node has the current, authoritative copy of a record data master R/W operation to a record: check if data master if not, request data master role and current copy of record over network read/write locally Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 13 / 35

Design Recovery what happens if a node goes down? data master for some records will be lost one node the recovery master performs recovery recovery master collects most recent copy of all records from all nodes additional TDB header record sequence number determines recentness at the end, the recovery master is data master for all records Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 14 / 35

Design Recovery Election / Recovery Lock recovery master is determined by an election process election process involves one file on shared storage the recovery lock file nodes compete with POSIX fcntl byte range locks finally, the newly elected recovery master holds lock on the recovery lock file requires POSIX fcntl lock support in the cluster file system has no split brain (other than the file system) Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 15 / 35

Design Performance Figures By Andrew Tridgell and Ronnie Sahlberg, Linux Conf Australia 2009 GPFS file system 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 Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 16 / 35

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 Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 17 / 35

Clustered File Systems 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 Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 18 / 35

Setting Up - Basic Setup Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 19 / 35

Setting Up - Configuration central file: /etc/sysconfig/ctdb must set: RECOVERY LOCK fill /etc/ctdb/notes with internal addresses example /etc/ctdb/nodes 10.0.0.10 10.0.0.11 10.0.0.12 10.0.0.13 same file on all nodes! Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 20 / 35

Setting Up - Public Addresses set 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...) Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 21 / 35

Setting Up IP Failover healthy nodes get IP addresses from their public pool when a node goes done: public IPs moved to other nodes distributes the public IPs equally among healthy nodes with round robin DNS HA and load balancing speed up client reconnects with tickle ACKs: client does not yet know the IP has moved new node does not have a valid TCP connection to client new node sends illegal TCP ACK packet to the client (seqnum 0) client sends back correct ACK packet to the new node new node sends back a RST packet to the client client re-establishes connection to the new node Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 22 / 35

Setting Up Toolbox ctdb control ctdbd onnode execute programs on selected nodes Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 23 / 35

Setting Up ctdb status Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 24 / 35

Setting Up ctdb ip Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 25 / 35

Setting Up manages... can manage several services i.e. start, stop, monitor them controlled by sysconfig variables MANAGES SERVICE management performed by scripts in /etc/ctdb/events.d managed services should be removed from the runlevels Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 26 / 35

Setting Up manages... MANAGES SAMBA MANAGES WINBIND MANAGES NFS MANAGES VSFTPD MANAGES HTTPD Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 27 / 35

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 Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 29 / 35

Clustered Samba Configuration Options Samba Configuration identical configuration on all nodes clustering = yes passdb backen = tdbsam groupdb:backend = tdb vfs objects = fileid fileid:algorithm = fsid / fsname idmap backend = tdb2 no need to change private dir if MANAGES SAMBA, do not set interfaces or bind interfaces only Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 30 / 35

Clustered Samba Configuration Options 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 fileid:algorithm = fsname [share] path = /cluster storage/share writeable = yes vfs objects = fileid Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 31 / 35

Clustered Samba 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 means of easily managing the whole Samba cluster Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 32 / 35

Clustered Samba Registry Configuration Activation of Registry Configuration registry shares = yes include = registry config backend = registry smb.conf for cluster usage [global] clustering = yes include = registry Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 33 / 35

Clustered Samba Registry Configuration 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. Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 34 / 35

Thank you very much! Michael Adam (SerNet / Samba Team) tutorial sambaxp 2009-04-21 35 / 35