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

Similar documents
Jeremy Allison Samba Team

Emulating Windows file serving on POSIX. Jeremy Allison Samba Team

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

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

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

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

Solving Linux File System Pain Points. Steve French Samba Team & Linux Kernel CIFS VFS maintainer Principal Software Engineer Azure Storage

The Death of File Sharing Protocols. Jeremy Allison Samba Team/Google Open Source Programs Office

Samba4 Progress - March Andrew Tridgell Samba Team

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

SMB3 Multi-Channel in Samba

Samba in a cross protocol environment

GridNFS: Scaling to Petabyte Grid File Systems. Andy Adamson Center For Information Technology Integration University of Michigan

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

Towards full NTFS semantics in Samba. Andrew Tridgell

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

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

Status of the Linux NFS client

Samba and Ceph. Release the Kraken! David Disseldorp

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

Linux Support of NFS v4.1 and v4.2. Steve Dickson Mar Thu 23, 2017

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

SMB / CIFS TRANSACTIONS PERFORMANCE ANALYSIS. Performance Vision 2015

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

Building a Highly Scalable and Performant SMB Protocol Server

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

416 Distributed Systems. Distributed File Systems 1: NFS Sep 18, 2018

Distributed Systems. Distributed File Systems. Paul Krzyzanowski

Delegating Samba Administration

SNIA SDC 2018 Santa Clara

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

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

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

Distributed Systems 16. Distributed File Systems II

Manually Mounting Network Drive Mac Command Line Linux

Gerald Carter Samba Team/HP

NFS/RDMA Draft Status

Persistent Storage - Datastructures and Algorithms

Azure File Sync. Webinaari

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

Operating Systems Design 16. Networking: Remote File Systems

NFS Version 4.1. Spencer Shepler, Storspeed Mike Eisler, NetApp Dave Noveck, NetApp

These selected protocol definitions are extremely helpful in learning the

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

Compatibility and Support Information Nasuni Corporation Boston, MA

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

(including SMB 3.x) Tom Talpey Microsoft

Project #4: Implementing NFS

The Definitive Guide to Fractal Awesomeness with J-WildFire!

AN OVERVIEW OF COMPUTING RESOURCES WITHIN MATHS AND UON

Change Schema Active Directory Password Mac Users Can't

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

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

EMC SourceOne for File Systems

NFSv4.1 Plan for a Smooth Migration

Operating Systems. Week 13 Recitation: Exam 3 Preview Review of Exam 3, Spring Paul Krzyzanowski. Rutgers University.

GlusterFS Architecture & Roadmap

SDC EMEA 2019 Tel Aviv

CS 416: Operating Systems Design April 22, 2015

dcache NFSv4.1 Tigran Mkrtchyan Zeuthen, dcache NFSv4.1 Tigran Mkrtchyan 4/13/12 Page 1

The Leading Parallel Cluster File System

(including SMB 3.x) Tom Talpey Microsoft

Microsoft Windows Embedded Server Overview

Linux File Systems: Challenges and Futures Ric Wheeler Red Hat

ò Server can crash or be disconnected ò Client can crash or be disconnected ò How to coordinate multiple clients accessing same file?

NFS Version 4 Open Source Project. William A.(Andy) Adamson Center for Information Technology Integration University of Michigan

Powerful Toys A Toolkit Approach to Windows Interoperability

Development Using Samba 4

NFS. Don Porter CSE 506

COMMON INTERNET FILE SYSTEM PROXY

NFSv4 Open Source Project Update

SOFTWARE ARCHITECTURE 11. DISTRIBUTED FILE SYSTEM.

Microsoft SMB Looking Forward. Tom Talpey Microsoft

pnfs, parallel storage for grid and enterprise computing Joshua Konkle, NetApp, Inc.

SA30228 / CVE

NFSv4 extensions for performance and interoperability

SDC 2015 Santa Clara

SMB3.1.1 and beyond: Optimizing access from Linux Client to Samba, the Cloud and modern file servers

CephFS A Filesystem for the Future

Chapter 2 Software Components

Cloud Computing CS

Distributed Systems. Lec 9: Distributed File Systems NFS, AFS. Slide acks: Dave Andersen

PyWBEM Python WBEM Client: Overview #2

Clustered Samba Challenges and Directions. SDC 2016 Santa Clara

PLAYING NICE WITH OTHERS: Samba HA with Pacemaker

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

Cloud Filesystem. Jeff Darcy for BBLISA, October 2011

The Google File System

Kernel driver maintenance : Upstream vs. Industry

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

olpcfs Redesigning the datastore from the ground up and top down C. Scott Ananian Olpcfs, C. Scott Ananian,

Still All on One Server: Perforce at Scale

This section discusses the protocols available for volumes on Nasuni Filers.

You can access data using the FTP/SFTP protocol. This document will guide you in the procedures for configuring FTP/SFTP access.

StorageCraft OneBlox and Veeam 9.5 Expert Deployment Guide

Rio-2 Hybrid Backup Server

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

The Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams.

CPSC 426/526. Cloud Computing. Ennan Zhai. Computer Science Department Yale University

Around the Linux File System World in 45 minutes

Transcription:

SMB3 and Linux Seamless POSIX file serving Jeremy Allison Samba Team jra@samba.org

Isn't cloud storage the future? Yes, but not usable for many existing apps.

Cloud Storage is a blob store Blob stores don't map very well onto the open/read/write/close random access semantics of most applications. Apps are changing to cope with no random access semantics of cloud stores, but this will take time.

We still need file access protocols Even running in the cloud, pointing existing apps at file servers is useful. Only two viable options NFS (v4) and SMB2+ (known as SMB3 from now on). Why SMB3 and not NFSv4? It's the clients.. Both NFS and SMB are supported by the only clients that matter, Windows MacOS X and Linux. But Windows supports SMB3 much better than NFS.

Roughly comparable. SMB3 vs NFSv4 SMB3 has more features. NFSv4 includes: Delegations file and directory (SMB2 leases) Name spaces (MS-DFS) Sessions (long-lived handles) Adapted SMB ACL model (disaster) Parallel NFS (pnfs) Defined over RDMA

SMB3 vs NFSv4 SMB3 includes: Transparent failover Clustering (Active/Active shares) SMB over RDMA Multichannel (multiple NIC) Encryption Leasing files/directories Snapshots Server-side copies Rapid development (whatever Microsoft adds next). Windows clients really want to use SMB3.

SMB3 vs NFSv4 NFSv4 has one current advantage in Linux Linux environments: Close to POSIX semantics. Designed around POSIX clients POSIX servers. Advisory locking, rename open files, unlink open files etc. Extended attributes and other things added later. Modifications for Windows clients are add-ons. How do we fix this for SMB3? SMB3 UNIX extensions! SMB3 is really close to what we need for Linux Linux. Add POSIX semantics to a Windows protocol.

Enter flexible Samba We have a history making this work. SMB1 UNIX extensions. Originally created by old (non-insane) SCO and HP. Method of adding POSIX 'info levels' into SMB1 query/set file info requests. Later extended by Samba for both client and server: POSIX pathnames tranport level encryption POSIX ACLs Symlinks POSIX behaviors (rename & delete, file locking).

SMB1 Unix Extensions Client Negprot req: SetFSinfo req: UNIX bits I want UNIX specific req: Open with POSIX Pathname /foo/bar Server Negprot reply: UNIX capabilities SetFSinfo reply: UNIX bits I will support UNIX specific reply: Open file handle

What SMB1 Unix Extensions got wrong Horrible hack job - abusing the protocol to add elements it was never designed to do: Tridge: Using SetFSinfo to set global state on the protocol connection makes me want to vomit! Apple ended up doing the same thing by adding Macintosh share-specific info levels for get/set. Biggest problem was setting the server global state. Once UNIX extensions were negotiated existing operations are expected to change behavior.

(More of) What SMB1 UNIX Extensions got wrong Symlinks and security - this is a disaster zone: Windows clients want to follow symlinks on the server. UNIX clients MUST NOT follow symlinks on the server. Transport level security (SMB1 encrypt) poorly designed. Extended Attributes (EA's) differences ignored. Windows EA's are not a good match. No other server than Samba implemented them.

SMB3 UNIX Extensions A Clean Slate SMB3 is entirely handle-based. The only pathname operation is to use Create to turn into a handle. Handles collect all the properties needed to implement POSIX semantics into one place. Handles are used for delete/rename/locking/extended attributes. All the areas where POSIX requirements differ from Windows.

SMB3 Create Contexts SMB3 has an in-built mechanism to extend the pathname conversion: Create Contexts. Create contexts are named blobs of data attached to the Create request and reply. Unknown create contexts are ignored. Create contexts allowed Microsoft to extend SMB2 SMB3 features by adding named elements to Create operations. Examples include TWrp (Timewarp) snapshot request and SMB2_CREATE_APP_INSTANCE_ID request (identified by a GUID). A create context named POsx (or more likely a GUID) will do nicely to add POSIX features to a create.

How to negotiate SMB3 UNIX Extensions? SMB1 Unix extensions used a POSIX CAPABILITY bit in the 32-bit capabilities field in the initial server negotiate response. Required coordination with Microsoft. Could be re-used for SMB3 (bit already allocated). SMB3 has an in-built mechanism to extend the negotiation of client server capabilities. Modeled after SMB3 Create contexts, but done at SMB3 initial negotiate time. Not a GUID (missed opportunity IMHO) a 16-bit field. Still have to coordinate with Microsoft :-( Do we need UNIX extensions negotiation at all?

The Apple Solution Apple used a similar method to add Mac-specific features: AAPL create context (implemented in Samba by vfs_fruit). AAPL isn't a very clean design. Modifies contents of returned info-levels once negotiated. Negotiation step done on an initial Create call on a name of in the share. Reproduces the sins of SMB1 Unix extensions (global server state turned on by a single request).

The (proposed) Samba Design Minimal (or absent) protocol negotiation. No negotiation on features at Create time: This lead to lots of complexity in the SMB1 code. Add new create context for pathname handle creation. Use existing Windows pathname parsing (UCS2, not UTF8). No alternate data stream names. Server gives all or nothing POSIX semantics if context returned. New handle flagged as UNIX internally, all operations become POSIX on this handle.

The (proposed) Samba Design What are the POSIX semantics on a handle? Reads/Writes ignore POSIX locks (not Windows). Lock requests become advisory (not mandatory). Unlinks/renames are allowed on open handles (if no other non-unix handles open on the same file). Directory listings return POSIX namespace. Should QueryDirectory change info level returns? Get/Set EA's use UNIX not Windows namespace. Do we expose the user. / system. or other EA namespaces?

The (proposed) Samba Design Unsolved Issues Symlinks are still a problem. How do we create them? What are the EA and ACL operations permitted on them? POSIX Info levels are 2-bytes (0x200 0x2FF). Few used (00-0B), but won t fit into existing 1-byte SMB2+ info level space. As set/query info levels are attached to a file handle, we could define extra info levels only on POSIX handles. Use FSCTL calls instead for extra POSIX requests? Windows lock ranges are unsigned, POSIX are signed.

Implementing the SMB3 UNIX Extensions in Samba Have already been prototyped by both Volker Lendecke and Richard Sharpe of the Samba Team. Internal Samba issues prevented this code going into production. 'Global' state finally removed from Samba git master branch March 2016. Removed the evil 'lp_posix_pathnames()' global call from the Samba VFS. 'POSIX' flag on a handle now the only required state to determine server operation. Still some cleanup to do to expose all the Linux Linux operations over SMB3, but mostly done.

Implementing in Samba: The ACL Problem SMB3 natively uses Windows ACLs Similar but not the same as NFSv4 ACLs. Linux uses POSIX ACL draft spec, coded up by Andreas Gruenbacher We already have info levels mapped to get/set POSIX ACLs. Linux may be adding RichACLs (Andreas Gruenbacher's code) Do we map these into Windows ACLs, or create new info levels?

Implementing the SMB3 UNIX Extensions in Samba Prototyping will be done by adding calls to smbclient (the cli_xxxx() internal Samba library) to exercise new features in the server. Feature set and behavior must be agreed upon with the Linux CIFSFS client implementors. Avoid SMB1 UNIX extensions mistakes like the encryption support. Eventually expose to libsmbclient library used by Gnome applications like Nautilus (file browser). Make available to Gnome VFS users. What about the BSD-of-the-month club and Solaris?

The Definition of Success: Windows Server support? Long term, to support Linux clients in a Windows cloud file server, Microsoft may end up needing to support SMB3 UNIX extensions. This will be dependent on market demand for Linux clients in a Windows cloud. Microsoft Azure SMB3 file server might be easiest target here as it's a new implementation. It's worth spending time getting the design right to make this possible. Don't repeat mistakes of SMB1 UNIX extensions.

Questions and Comments? Email: jra@samba.org Slides available at: <tbd>