SMB3 Multi-Channel in Samba

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

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

SMB / CIFS TRANSACTIONS PERFORMANCE ANALYSIS. Performance Vision 2015

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

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

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

Jeremy Allison Samba Team

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

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

SMB 3.0 (Because 3 > 2) David Kruse Microsoft

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

A new DCERPC infrastructure for Samba

A new DCERPC infrastructure for Samba

Samba in a cross protocol environment

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

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

Samba4 Progress - March Andrew Tridgell Samba Team

Accelerate SMB 3.0 Performance for Applications

Building a Highly Scalable and Performant SMB Protocol Server

(including SMB 3.x) Tom Talpey Microsoft

Improving DCERPC Security Hardening

SMB Direct Update. Tom Talpey and Greg Kramer Microsoft Storage Developer Conference. Microsoft Corporation. All Rights Reserved.

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

(including SMB 3.x) Tom Talpey Microsoft

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

Clustered Samba Challenges and Directions. SDC 2016 Santa Clara

SDC 2015 Santa Clara

SMB3 Update David Kruse Microsoft

Samba4 Status - April Andrew Tridgell Samba Team

Samba 4 Status Report

Improving DCERPC Security

SMB3: Bringing High Performance File Access to Linux: A Status Update. How do you use it? What works? What is coming soon?

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

SNIA SDC 2018 Santa Clara

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

Microsoft SMB Looking Forward. Tom Talpey Microsoft

EMC VNX Series: Introduction to SMB 3.0 Support

PLAYING NICE WITH OTHERS: Samba HA with Pacemaker

AN OVERVIEW OF DISTRIBUTED FILE SYSTEM Aditi Khazanchi, Akshay Kanwar, Lovenish Saluja

Windows Authentication With Multiple Domains and Forests

Gerald Carter Samba Team/HP

Distributed file systems

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

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

SMB 2.1 & SMB 3 Protocol features, Status, Architecture, Implementation. Gordon Ross Nexenta Systems, Inc.

Developing Management Strategies and Tools for Samba. Jeffrey Bianchine

Distributed Systems. Hajussüsteemid MTAT Distributed File Systems. (slides: adopted from Meelis Roos DS12 course) 1/25

416 Distributed Systems. Distributed File Systems 4 Jan 23, 2017

Beyond the Horizon. What's after Samba 3.0? (Or is the earth really flat?)

CTDB Remix - Dreaming the Fantasy

Analyst Perspective: Using File Server Protocols for Block-Based Storage Workloads

Evaluating SMB2 Performance for Home Directory Workloads

The Important Details Of Windows Authentication

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

From an open storage solution to a clustered NAS appliance

NFS on the Fast track - fine tuning and futures

Container-Native Storage

Windows Authentication With Multiple Domains and Forests

SMB 3.0 Performance Dan Lovinger Principal Architect Microsoft

Exploiting Commutativity For Practical Fast Replication. Seo Jin Park and John Ousterhout

Changing Schema Active Directory Domain Name Server 2008 R2

WINS Replication. Stefan Metzmacher SerNet Service Network GmbH Samba Team

Centralized configuration management using registry tdb in a CTDB cluster

Using the SDACK Architecture to Build a Big Data Product. Yu-hsin Yeh (Evans Ye) Apache Big Data NA 2016 Vancouver

Compatibility and Support Information Nasuni Corporation Boston, MA

SMB3.1.1 POSIX Protocol Extensions: Summary and Current Implementation Status

SMB 2.2 : Bigger, Faster, Scalier (Part 1) David Kruse Mathew George Microsoft

Distributed Systems. Lec 10: Distributed File Systems GFS. Slide acks: Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung

[MS-SMB2]: Server Message Block (SMB) Protocol Versions 2 and 3

HPE Common Internet File System (CIFS) Server Release Notes Version B for HP-UX 11i v3

Pushing the Boundaries of SMB3: Status of the Linux Kernel client and interoperability with Samba

Exploiting Commutativity For Practical Fast Replication. Seo Jin Park and John Ousterhout

FILE EXCHANGE PROTOCOLS AND ZERO CONFIGURATION NETWORKING

Copyright 2013

VCP GA, SC, NC, AL, FL

QuickSpecs. HP Advanced Server V5.1B-5 for UNIX. Overview. Retired

SMB 2.0 Next Generation CIFS protocol in Data ONTAP

Networking with Windows Server 2016 (741)

Network-based File Sharing (1)

What a Long Strange Trip It s Been: Moving RDMA into Broad Data Center Deployments

Oracle Database 18c and Autonomous Database

Improving Azure File Service: Adding New Wings to a Plane in Mid-flight David Goebel Microsoft

FreeIPA Cross Forest Trusts

SMB3.1.1 and Beyond in the Linux Kernel: Providing Optimal File Access to Windows, Mac, Samba and Other File Servers

SMB v2.1. David Kruse. Storage Developer Conference Microsoft Corporation. All rights reserved.

Exam Objectives for MCSA Networking with Windows Server 2016

[MS-SMB2]: Server Message Block (SMB) Protocol Versions 2 and 3

IxLoad Common Internet File System (CIFS)

NFS: Naming indirection, abstraction. Abstraction, abstraction, abstraction! Network File Systems: Naming, cache control, consistency

ONTAP 9. SMB/CIFS Reference. December _H0 Updated for ONTAP 9.3

CWRAP. Testing your full software stack. Andreas Schneider. February 2nd, Red Hat Inc. Samba Team

Windows 2000 Conversion Wrapup. Al Williams Penn State Teaching and Learning with Technology SHARE 98, Nashville, TN Session 5822

Distributed File Systems II

GLOBAL CATALOG SERVICE IMPLEMENTATION IN FREEIPA. Alexander Bokovoy Red Hat Inc. May 4th, 2017

Office and Express Print Submission High Availability for DRE Setup Guide

Linux CIFS client year in review: From Nocturnal Monster Puppies to Funky Weasels

HOW I LEARNED TO LOVE PERF AND SYSTEMTAP

Transcription:

SMB3 Multi-Channel in Samba... Now Really! Michael Adam Red Hat / samba.org sambaxp - 2016-05-11

Introduction

Michael Adam MC in Samba (5/41) SMB - mini history SMB: created around 1983 by Barry Feigenbaum, IBM SMB in Lan Manager: around 1990 SMB in Windows for Workgroups: from 1992 SMB CIFS: 1996 SMB on TCP port 445: 2000 - Windows 2000 SMB 2.0: 2006 - Windows Vista SMB 2.1: 2009 - Windows 7/Server 2008R2 SMB 3.0: 2012 - Windows 8/Server 2012 SMB 3.0.2: 2014 - Windows 8.1/Server 2012R2 SMB 3.1.1: 2015 - Windows 10/Server 2016

Michael Adam MC in Samba (7/41) Samba - History 1992/01: start of the project 1.5: 1993/12: (nbserver) 1.9.16: 1996/05: CVS, Samba Team 2.0: 1999/01: domain-member, +SWAT 2.2: 2001/04: NT4-DC 3.0: 2003/09: AD-member, Samba4 project started 3.2: 2008/07: GPLv3, experimental clustering 3.3: 2009/01: clustering [with CTDB] 3.4: 2009/07: merged S3+S4 code 3.5: 2010/03: experimental SMB 2.0 3.6: 2011/09: SMB 2.0 4.0: 2012/12: AD/DC, SMB 2.0 durable handles, 2.1, 3.0 4.1: 2013/10: stability 4.2: 2015/03: AD trusts, SMB2.1 leases, perf, include CTDB 4.3: 2015/09: spotlight, new ChangeNotify, SMB 3.0.2, 3.1.1 4.4: 2016/03: SMB3 Multi-Channel (experimental),...

Michael Adam MC in Samba (7/41) Samba - History 1992/01: start of the project 1.5: 1993/12: (nbserver) 1.9.16: 1996/05: CVS, Samba Team 2.0: 1999/01: domain-member, +SWAT 2.2: 2001/04: NT4-DC 3.0: 2003/09: AD-member, Samba4 project started 3.2: 2008/07: GPLv3, experimental clustering 3.3: 2009/01: clustering [with CTDB] 3.4: 2009/07: merged S3+S4 code 3.5: 2010/03: experimental SMB 2.0 3.6: 2011/09: SMB 2.0 4.0: 2012/12: AD/DC, SMB 2.0 durable handles, 2.1, 3.0 4.1: 2013/10: stability 4.2: 2015/03: AD trusts, SMB2.1 leases, perf, include CTDB 4.3: 2015/09: spotlight, new ChangeNotify, SMB 3.0.2, 3.1.1 4.4: 2016/03: SMB3 Multi-Channel (experimental),...

Michael Adam MC in Samba (7/41) Samba - History 1992/01: start of the project 1.5: 1993/12: (nbserver) 1.9.16: 1996/05: CVS, Samba Team 2.0: 1999/01: domain-member, +SWAT 2.2: 2001/04: NT4-DC 3.0: 2003/09: AD-member, Samba4 project started 3.2: 2008/07: GPLv3, experimental clustering 3.3: 2009/01: clustering [with CTDB] 3.4: 2009/07: merged S3+S4 code 3.5: 2010/03: experimental SMB 2.0 3.6: 2011/09: SMB 2.0 4.0: 2012/12: AD/DC, SMB 2.0 durable handles, 2.1, 3.0 4.1: 2013/10: stability 4.2: 2015/03: AD trusts, SMB2.1 leases, perf, include CTDB 4.3: 2015/09: spotlight, new ChangeNotify, SMB 3.0.2, 3.1.1 4.4: 2016/03: SMB3 Multi-Channel (experimental),...

Apologies to our friends from Microsoft for writing Multi-Channel!...

But hey... How can we partly implement an SMB version?

Michael Adam MC in Samba (10/41) SMB2 Capabilities - Negotiate SMB2 CAP DFS (3.5, 3.6) SMB2 CAP LEASING (4.2) SMB2 CAP LARGE MTU (4.0) SMB2 CAP MULTI CHANNEL (4.4) SMB2 CAP PERSISTENT HANDLES SMB2 CAP DIRECTORY LEASING SMB2 CAP ENCRYPTION (4.0)

Michael Adam MC in Samba (11/41) Other optional SMB2 features Some create contexts - ok to ignore, e.g.: durable handles (best-effort concept) fsctl/ioctls - ok (?) to return errors, e.g.: FSCTL QUERY NETWORK INTERFACE INFO FSCTL LMR REQ RESILIENCY

So what s the big deal about SMB3?

SMB3 - what s the big deal? SMB3 (2012) introduced SMB clustering: Clustering - Witness (HA / faster fail-over) Continuous Availability - Persistent Handles (guarantees!) Scale Out (all-active access) Additionally: Transport encryption Multi-Channel RDMA transport (SMB Direct) from workstation to server workload databases (sql...) virtualtization (hyper-v)... Michael Adam MC in Samba (13/41)

SMB3 - what s the big deal? SMB3 (2012) introduced SMB clustering: Clustering - Witness (HA / faster fail-over) Continuous Availability - Persistent Handles (guarantees!) Scale Out (all-active access) Additionally: Transport encryption Multi-Channel RDMA transport (SMB Direct) from workstation to server workload databases (sql...) virtualtization (hyper-v)... Michael Adam MC in Samba (13/41)

SMB3 - what s the big deal? SMB3 (2012) introduced SMB clustering: Clustering - Witness (HA / faster fail-over) Continuous Availability - Persistent Handles (guarantees!) Scale Out (all-active access) Additionally: Transport encryption Multi-Channel RDMA transport (SMB Direct) from workstation to server workload databases (sql...) virtualtization (hyper-v)... Michael Adam MC in Samba (13/41)

SMB3 - what s the big deal? SMB3 (2012) introduced SMB clustering: Clustering - Witness (HA / faster fail-over) Continuous Availability - Persistent Handles (guarantees!) Scale Out (all-active access) Additionally: Transport encryption Multi-Channel RDMA transport (SMB Direct) from workstation to server workload databases (sql...) virtualtization (hyper-v)... Michael Adam MC in Samba (13/41)

Multi-Channel

Multi-Channel - General multiple transport connections in one SMB(3) session channel: transport connection bound to a session client decides which connections to bind and to use session is valid as long as at least one channel is intact two purposes 1 increase throughput: use multiple connections of same type 2 improve fault tolerance: channel failure: replay/retry detection Michael Adam MC in Samba (16/41)

Multi-Channel - General multiple transport connections in one SMB(3) session channel: transport connection bound to a session client decides which connections to bind and to use session is valid as long as at least one channel is intact two purposes 1 increase throughput: use multiple connections of same type 2 improve fault tolerance: channel failure: replay/retry detection Michael Adam MC in Samba (16/41)

Multi-Channel - General multiple transport connections in one SMB(3) session channel: transport connection bound to a session client decides which connections to bind and to use session is valid as long as at least one channel is intact two purposes 1 increase throughput: use multiple connections of same type 2 improve fault tolerance: channel failure: replay/retry detection Michael Adam MC in Samba (16/41)

Michael Adam MC in Samba (17/41) Multi-Channel - General use case: channels of different type/quality use only the channels of best quality fall back to inferior channels if superior ones fail e.g.: laptop switching between WiFi and LAN (?)

Michael Adam MC in Samba (18/41) Multi-Channel - Windows/Protocol 1 establish initial session on TCP connection 2 find interfaces with interface discovery: FSCTL QUERY NETWORK INTERFACE INFO 3 bind additional TCP (or later RDMA) connection (channel) to established SMB3 session (session bind) 4 Windows: uses connections of same (and best) quality 5 Windows: binds only to a single node 6 replay / retry mechanisms, sequence numbers

Michael Adam MC in Samba (20/41) Multi-Channel Samba samba/smbd: multi-process Originally: process TCP connection Idea: transfer new TCP connection to existing smbd How? use fd-passing (sendmsg/recvmsg) When? Natural choice: at SessionSetup (Bind) Idea: as early as possible, based on ClientGUID per ClientGUID single process model

Multi-Channel Samba Michael Adam MC in Samba (21/41)

Michael Adam MC in Samba (22/41) Multi-Channel Samba samba/smbd: multi-process Originally: process TCP connection Idea: transfer new TCP connection to existing smbd How? use fd-passing (sendmsg/recvmsg) When? Natural choice: at SessionSetup (Bind) Idea: as early as possible, based on ClientGUID per ClientGUID single process model

Multi-Channel Samba Michael Adam MC in Samba (23/41)

Multi-Channel Samba Michael Adam MC in Samba (23/41)

Multi-Channel Samba Michael Adam MC in Samba (23/41)

Michael Adam MC in Samba (24/41) Multi-Channel Samba samba/smbd: multi-process Originally: process TCP connection Idea: transfer new TCP connection to existing smbd How? use fd-passing (sendmsg/recvmsg) When? Natural choice: at SessionSetup (Bind) Idea: as early as possible, based on ClientGUID per ClientGUID single process model

Michael Adam MC in Samba (24/41) Multi-Channel Samba samba/smbd: multi-process Originally: process TCP connection Idea: transfer new TCP connection to existing smbd How? use fd-passing (sendmsg/recvmsg) When? Natural choice: at SessionSetup (Bind) Idea: as early as possible, based on ClientGUID per ClientGUID single process model

Multi-Channel Samba : pass by ClientGUID Michael Adam MC in Samba (25/41)

Multi-Channel Samba : pass by ClientGUID Wait a minute - what about performance? Single process... But we use short-lived worker-pthreads for I/O ops! using multiple CPUs Benchmarks and tunings in progress Michael Adam MC in Samba (26/41)

Michael Adam MC in Samba (27/41) Multi-Channel Samba : Status 1 messaging rewrite using unix dgm sockets with sendmsg [DONE,4.2] 2 add fd-passing to messaging [DONE,4.2] 3 preparations in internal structures [DONE,4.2 4.4] 4 prepare code to cope with multiple channels [DONE,4.4] 5 implement smbd message to pass a tcp socket [DONE,4.4] 6 transfer connection in Negotiate (by ClientGUID) [DONE,4.4] 7 implement session bind [DONE,4.4] 8 implement channel sequence numbers [DONE,4.4] 9 implement interface discovery [DONE(linux/conf),4.4] 10 implement test cases [WIP(isn t it always?... )] 11 implement fd-passing in socket-wrapper [WIP] 12 implement lease break replay [TODO]

Michael Adam MC in Samba (27/41) Multi-Channel Samba : Status 1 messaging rewrite using unix dgm sockets with sendmsg [DONE,4.2] 2 add fd-passing to messaging [DONE,4.2] 3 preparations in internal structures [DONE,4.2 4.4] 4 prepare code to cope with multiple channels [DONE,4.4] 5 implement smbd message to pass a tcp socket [DONE,4.4] 6 transfer connection in Negotiate (by ClientGUID) [DONE,4.4] 7 implement session bind [DONE,4.4] 8 implement channel sequence numbers [DONE,4.4] 9 implement interface discovery [DONE(linux/conf),4.4] 10 implement test cases [WIP(isn t it always?... )] 11 implement fd-passing in socket-wrapper [WIP] 12 implement lease break replay [TODO]

Michael Adam MC in Samba (28/41) Multi-Channel Samba : How we got there Based on preparations in 4.2 and earlier (200+ patches) Patches by Stefan Metzmacher, Michael Adam, Volker Lendecke, Anubhav Rakshit Since Summer 2015: Polishing of large parts of massively WIP branch Added new code (create replay, interface detection) Result merged in units. Overall some 130 patches. Patches by: Michael Adam Stefan Metzmacher Günther Deschner Anoop C S Anubhav Rakshit Just made it as experimental feature into Samba 4.4

Michael Adam MC in Samba (29/41) Multi-Channel Samba : Details from smbxsrv.idl for MSG SMBXSRV CONNECTION PASS t y p e d e f s t r u c t { NTTIME i n i t i a l c o n n e c t t i m e ; GUID c l i e n t g u i d ; hyper s e q l o w ; DATA BLOB n e g o t i a t e r e q u e s t ; } s m b X s r v c o n n e c t i o n p a s s 0 ;

Michael Adam MC in Samba (30/41) Multi-Channel Samba : Details from smbxsrv.idl layering before s m b X s r v s e s s i o n >s m b X s r v c o n n e c t i o n layering now s m b X s r v s e s s i o n >s m b X s r v c l i e n t >s m b X s r v c o n n e c t i o n s

Michael Adam MC in Samba (31/41) Multi-Channel Samba: the newer patches shell breakout...

Michael Adam MC in Samba (33/41) Multi-Channel Samba : How to enable it smb.conf [ g l o b a l ]... s e r v e r m u l t i c h a n n e l s u p p o r t = y e s...

Michael Adam MC in Samba (34/41) Multi-Channel Samba: TODOs teach socket wrapper fd-passing ( selftest...) Replay lease breaks upon channel failure (server client) DANGER! clustering integration (CTDB) DANGER!

Michael Adam MC in Samba (34/41) Multi-Channel Samba: TODOs teach socket wrapper fd-passing ( selftest...) Replay lease breaks upon channel failure (server client) DANGER! clustering integration (CTDB) DANGER!

Michael Adam MC in Samba (34/41) Multi-Channel Samba: TODOs teach socket wrapper fd-passing ( selftest...) Replay lease breaks upon channel failure (server client) DANGER! clustering integration (CTDB) DANGER!

Michael Adam MC in Samba (34/41) Multi-Channel Samba: TODOs teach socket wrapper fd-passing ( selftest...) Replay lease breaks upon channel failure (server client) DANGER! clustering integration (CTDB) DANGER!

Multi-Channel Samba : Clustering/CTDB Special considerations channels of one session only to one node! do not bind connections to CTDB public IPs (can move)! problem: CTDB clustering transparent to SMB clients... Michael Adam MC in Samba (35/41)

Multi-Channel Samba : Clustering/CTDB Special considerations channels of one session only to one node! do not bind connections to CTDB public IPs (can move)! problem: CTDB clustering transparent to SMB clients... Michael Adam MC in Samba (35/41)

Michael Adam MC in Samba (37/41) Multi-Channel Samba : Clustering/CTDB Plan for integration establish blacklist of addresses (e.g. CTDB public IPs) add static IPs to public interfaces optionally establish whitelist (interfaces...) list of allowed addresses only publish allowed addresses in interfaces info ioctl only give more than one address in interface info when asked via an allowed address deny session bind on non-allowed address

Michael Adam MC in Samba (37/41) Multi-Channel Samba : Clustering/CTDB Plan for integration establish blacklist of addresses (e.g. CTDB public IPs) add static IPs to public interfaces optionally establish whitelist (interfaces...) list of allowed addresses only publish allowed addresses in interfaces info ioctl only give more than one address in interface info when asked via an allowed address deny session bind on non-allowed address

Multi-Channel Demo

Wrapping up...

Michael Adam MC in Samba (40/41) What s next? SMB3 Multi-Channel: finishing moves SMB3 Witness service: async RPC SMB3 Persistent Handles / CA SMB3 over RDMA (SMB direct) Multi-Protocol access (NFS, SMB...) SMB2+ Unix Extensions See Jeremy s Talk!

Michael Adam MC in Samba (40/41) What s next? SMB3 Multi-Channel: finishing moves SMB3 Witness service: async RPC SMB3 Persistent Handles / CA SMB3 over RDMA (SMB direct) Multi-Protocol access (NFS, SMB...) SMB2+ Unix Extensions See Jeremy s Talk!

Thanks for your attention! Questions? obnox@samba.org obnox@redhat.com https://git.samba.org/?p=obnox/slides/2016-05-sambaxp.git https://www.samba.org/~obnox/presentations/2016-05-sambaxp/*.pdf