2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Building Windows File Systems: A Look at the OpenAFS Client for Windows Peter.

Slides:



Advertisements
Similar presentations
More on File Management
Advertisements

HEP Data Sharing … … and Web Storage services Alberto Pace Information Technology Division.
The Zebra Striped Network Filesystem. Approach Increase throughput, reliability by striping file data across multiple servers Data from each client is.
OpenAFS for Windows Status Report AFS & Kerberos Best Practice Workshop 2010.
File Management Chapter 12. File Management File management system is considered part of the operating system Input to applications is by means of a file.
The Road to a Functional Design. The Team  Peter Scott  Principal Consultant and founding partner at Kernel Drivers, LLC  Microsoft MVP  Jeffrey Altman.
计算机系 信息处理实验室 Lecture 16 Networking
OpenAFS for Windows Deep Dive: Reparse Points, Path Processing, and Implications for Namespace Design Jeffrey Altman Your File System Inc European.
Other File Systems: AFS, Napster. 2 Recap NFS: –Server exposes one or more directories Client accesses them by mounting the directories –Stateless server.
Case Study: Windows 2000 Part I Will Richards CPSC 550 Spring 2001.
6/24/2015B.RamamurthyPage 1 File System B. Ramamurthy.
OPERATING SYSTEMS Introduction
1 I/O Management in Representative Operating Systems.
NFS. The Sun Network File System (NFS) An implementation and a specification of a software system for accessing remote files across LANs. The implementation.
MCTS Guide to Microsoft Windows Server 2008 Network Infrastructure Configuration Chapter 7 Configuring File Services in Windows Server 2008.
Windows Server 2008 Chapter 8 Last Update
TM Freescale, the Freescale logo, AltiVec, C-5, CodeTest, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of.
File System. NET+OS 6 File System Architecture Design Goals File System Layer Design Storage Services Layer Design RAM Services Layer Design Flash Services.
To provide the world with a next generation storage platform for unstructured data, enabling deployment of mobile applications, virtualization solutions,
 AFS name space managed as mini-file systems (aka Volumes)  AFS Mount Points are the equivalent of NTFS Junctions and DFS Referrals which are stored.
MCTS Guide to Configuring Microsoft Windows Server 2008 Active Directory Chapter 6: Windows File and Print Services.
Windows RDMA File Storage
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 11 Case Study 2: Windows Vista Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
File Management Chapter 12. File Management File management system is considered part of the operating system Input to applications is by means of a file.
Networked File System CS Introduction to Operating Systems.
Institute of Computer and Communication Network Engineering OFC/NFOEC, 6-10 March 2011, Los Angeles, CA Lessons Learned From Implementing a Path Computation.
Distributed Systems. Interprocess Communication (IPC) Processes are either independent or cooperating – Threads provide a gray area – Cooperating processes.
M i SMob i S Mob i Store - Mobile i nternet File Storage Platform Chetna Kaur.
Distributed File Systems
OpenAFS on Windows: A Status Report Jeffrey Altman The OpenAFS Project 16 October 2012.
Exploiting Windows 2000 Kyle Marsh Software Design Engineer Windows Evangelism Microsoft Corporation
Distributed File Systems Case Studies: Sprite Coda.
A Comparative Study of the Linux and Windows Device Driver Architectures with a focus on IEEE1394 (high speed serial bus) drivers Melekam Tsegaye
The Native AFS Client on Windows The Road to a Functional Design Jeffrey Altman, President Your File System Inc. 14 September 2010.
Windows 2000 Course Summary Computing Department, Lancaster University, UK.
OpenAFS on Windows: A Status Report Jeffrey Altman The OpenAFS Project 26 March 2014.
File Management Chapter 12. File Management File management system is considered part of the operating system Input to applications is by means of a file.
1 File Management Chapter File Management n File management system consists of system utility programs that run as privileged applications n Concerned.
Aaron Nathan CS6464 Final Project vapor_disk. Idea Provide a “real time” backup that is widely and easily available Simple to use Works in Windows.
Microsoft enterprise concepts. NT Layered Network Architecture Network Interface Card Network Adapter Card Drivers NDIS InterfaceStreams Transport Protocols.
Chapter 11: File System Implementation Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 11: File System Implementation Chapter.
WINDOWS NT Network Architecture Amy, Mei-Hsuan Lu CML/CSIE/NTU August 19, 1998.
Chapter 16 File Management The Architecture of Computer Hardware and Systems Software: An Information Technology Approach 3rd Edition, Irv Englander John.
GLOBAL EDGE SOFTWERE LTD1 R EMOTE F ILE S HARING - Ardhanareesh Aradhyamath.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
© 2006 EMC Corporation. All rights reserved. The Host Environment Module 2.1.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
4P13 Week 9 Talking Points
Distributed File Systems Questions answered in this lecture: Why are distributed file systems useful? What is difficult about distributed file systems?
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
Introduction to Operating Systems Concepts
Microsoft enterprise concepts
Chapter 11: File System Implementation
File System Implementation
Unit OS8: File System 8.6. Quiz
CSE451 NTFS Variations and other File System Issues Autumn 2002
Filesystems.
Chapter 3: Windows7 Part 4.
Chapter 3: Windows7 Part 2.
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
Chapter 3: Windows7 Part 2.
Distributed File Systems
Distributed File Systems
Distributed File Systems
Chapter 16 File Management
Chapter 15: File System Internals
Today: Distributed File Systems
Distributed File Systems
Distributed File Systems
Presentation transcript:

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Building Windows File Systems: A Look at the OpenAFS Client for Windows Peter Scott Kernel Drivers, LLC Jeffrey Altman Your File System, Inc

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. AFS History … on Windows  The SMB Interface  The Windows AFS architecture developed by Transarc leveraged the SMB redirector to pass file system requests to the AFS Cache Manager  Microsoft Loopback adapter used to permit local NetBIOS name binding of \\AFS  All requests were processed by the AFS Service in user mode  Minimal kernel level caching 2

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. More History …  ‘Relatively’ easy to implement but problems …  Performance  Generic solution to fit all situations  Microsoft components, very difficult to get bugs fixed  Several critical bugs found in SMB with no fix in sight  Ex: Static thread worker pool count leads to dead locks  Documentation is minimal, at best  Reliant on the SMB redirector for network behavior … good and bad 3

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. A Native Approach …  Custom File System Pros …  Complete control of name space parsing  Reparse Points  Mount Points  DFS Links  Better optimization of IO pathways  Minimize Kernel to User transitions  Cache invalidation requirements  Better system cache integration  Support for write-through behavior when needed 4

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. A Native Approach …  And the down side …  Complex implementation  Undocumented interfaces  srvsvc, wkssvc, IPC$  Network Provider support  Cache and Memory Manager  Must deal with 3 rd party products  File system filters 5

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Windows File System Model  Windows IFS (Installable File System) Interface  IRP Based model  IO Request Packets  ‘Fast IO’ Interface used for more than just IO  Direct-call model, no IRPs … almost  Network Provider Interface for Network Redirectors only  Support for drive mappings  UNC Browsing 6

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Windows File System Model  A Network File System on Windows  MUP (Multiple UNC Provider) Registration  Pre-Vista uses different model  IOCTL_REDIR_QUERY_PATH(_EX)  \\AFS\Your-File-System.com\User\PScott  Path Parsing  \Device\MUP;AFS\Redirector\;C:\\AFS\Your-File-System.com\User\PScott  \;C:\\AFS\Your-File-System.com\User\PScott  \Device\MUP\AFS\Your-File-System.com\User\PScott  \AFS\Your-File-System.com\User\PScott 7

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Old MUP Stack Windows Internals 8 IO Manager NTFS Filter FDO C: MUP Filter AFS Redir WNetxxx Network Provider AFS Service App Foo CM and MM MUP LanMan Filter AFS Redir Filter AFS Cache AFS LanMan

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Windows Internals  Windows Vista and 7 Changes  Memory Manger and Cache Manager changes  Theoretical limit of 4GB paging IO requests but have not seen anything larger than 256MB  Pre-Vista had a maximum of 64KB  MUP Changes  Tons of new ‘features’ – Bitlocker, built in AV, Indexer, Single Instance Storage, etc. 9

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Multiple UNC Provider - MUP  MUP – Handles mappings between the UNC namespace and the file systems which manage them  MUP changes in Windows Vista and 7  Old model (pre-Vista)  Register with MUP using a named device object  Prefix resolution and IRP_MJ_CREATE requests handled by MUP, all others sent to file system  New Model  Register with MUP using an unnamed device object and a name of the file system control device 10

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Old MUP Interface 11  Only prefix resolution and IRP_MJ_CREATE requests handled through MUP  All subsequent requests issued to redirector  Network redirectors would register, separately, as a file system resulting in filter attachment issues IO Manager WNetxxx Network Provider AFS Service App Foo CM and MM MUP (DFS) LanMan Filter AFS Redir Filter AFS AFS Cache

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. New MUP Interface  Register with MUP using a device name and an unnamed device object  Results in MUP creating a symbolic link from the device name to \Device\MUP  Prefix resolution using IOCTL_REDIR_QUERY_PATH_EX  All requests go through MUP  Single attachment point for filters 12

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. New MUP Interface 13  All requests go through MUP  Single point access IO Manager MUP LanMan Filter AFS Redir WNetxxx Network Provider AFS Service App Foo CM and MM AFS AFS Cache

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Path Parsing in Windows  2 forms can be sent – drive letter or not …  Drive letter names come into MUP as \Device\MUP;AFS\Redirector\;C:\\AFS\Your-File-System.com\User Which are mapped by MUP into \;C:\\AFS\Your-File-System.com\User  UNC names come into MUP as \Device\MUP\AFS\Your-File-System.com\User Which are mapped by MUP into \AFS\Your-File-System.com\User 14

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Network Provider Interface  User mode library with supporting interface in file system  Used to support WNet API in user mode  Implements drive letter resolution  Communicates with file system for state and connection information  Maintains per user information on mappings 15

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. AFS on Windows … Design Goals  Need to leverage as much functionality within the AFS Service as possible, initially …  Keep all server communication in service  Data retrieval  Callback registration and notification  Metadata management  Complete integration into the Microsoft IFS API  Stability and performance  Easy rollback to SMB interface without uninstall  If required for application compatibility 16

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. AFS Service Interface  Inverted call model  Requests from file system  Uses proprietary IOCtl interface  Communication through CDO symlink  IOCtl interface  Requests to file system  Proprietary IOCtl interface for service initiated requests  Cancellable interface through CDO handle 17

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. AFS Service Interface 18  All requests issued through CDO symbolic link - \??\AFSRedirector  Request pool state controlled through open handle AFS Service AFS Redir Request Pool IRP_MJ_DEVICE_CONTROL Dispatch Handler

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Merging Worlds  Name space convergence  Symbolic Links – Microsoft and AFS  Mount Points  DFS Links  Component substitutions  File data handling  PIOCtl Interface – Path IOCtl  “Special” share name handling - srvsvc, wkssvc …  Network Provider Interface 19

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Namespace Convergence  Cells and Shares  Share access mapped into cell names  \\AFS\Your-File-System.com \\AFS\Your-File-System.com  \\AFS\Your-File-System.com#user.pscott  Dynamic discovery  Reparse points and symbolic links  Must handle all symbolic links internally, they are not understood by Windows  Support the generic reparse point interface through FSCTL_xxx_REPARSE_POINT controls  Support mappings from C:\AFS to \\AFS\Your-File-System.com 20

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Namespace Convergence  Mount point processing managed internally  AFS Concept of Mount Point  DFS Links are supported through reparse processing  Windows concept of reparse processing  Must handle path traversal concepts  Crossing mount points … in both directions  Relative and absolute symbolic link processing  Component substitution 21

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Metadata Handling  Redirector caching model  Cache objects based on File Identifier (FID) on a per volume basis  Cache directory entries based on hash of name on a per directory basis  Support case insensitive, sensitive and short name lookups  Asynchronous pruning of trees when not in use 22

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Metadata Handling  Path name parsing in Windows  Path analyzed component by component, walking a specific branch for achieve the target object  Maintains a list of components used to access current target  Need to support relative symbolic links within a pathname 23

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Namespace Implementation 24 AFS Redirector  FID based access is ‘almost’ lockless – Only volume based lock required  Name based access is complex due to symlink, mount point, DFS link and other abstractions not recognized by Windows Name based access layer FID based access layer Windows IFS and NP InterfaceAFS Service

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Namespace Implementation 25 Volume Btree (Cell, Volume) Object Btree (Vnode, Unique) Name BTree (Component CRC) AFS Global Root Volume Volume 1Volume 2 Volume 3 Volume 2 Root Object Object 1 Object 2 Object 2 Root Directory 1 File 1

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. File Data Handling  Windows caching model  Re-entrant model – Need to be careful of locking hierarchy  Side band locking interface for memory and cache manager components – Fast IO interface  Need to observe IRQ levels while processing requests to underlying AFS Cache 26

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. File Data Handling  File Extent Interface  Extents describe the location of file data within the AFS Cache  Managed by the AFS Service and provided to the redirector upon request 27

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. File Data Handling  AFS Caching  AFS Service populates AFS Cache with requested data and flushes dirty data back to server  AFS Redirector talks directly to the underlying AFS Cache through extents retrieved from the AFS Service  Interesting edge cases arise when performing large file copies using small AFS Cache sizes  Windows ‘optimizations’ in flushing  Leverage Windows Read-Ahead and Write Behind features 28

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. File Data Handling 29  Allows for better performance by allowing redirector direct access to cache file  AFS Service still manages cache layout and population AFS Service AFS Redir Extent Interface AFS Cache AFS

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. PIOCtl Interface  The Path IOCtl interface is used to access object metadata trough a path based interface  The interface has not changed from the AFS perspective  Implemented within the redirector as ‘special’ file open requests  File information and data management handled within the AFS Service 30

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Special Share Names  \PIPE\IPC$  Used for remote processing – currently not supported within the AFS Redirector  \PIPE\srvsvc  Used for server and share information processing through the Net API  Supported through AFS Service  Leverages Microsoft RPC engine for translation  \PIPE\wkssvc  Used for workstation information processing through the Net API  Supported through AFS Service  Leverages Microsoft RPC engine for translation 31

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Invalidation Model  FS Callback processing and issues in Windows  Callbacks can be made as a result of requests issued from the file system. Need to ensure these re-entrant calls do not lead to dead locks  ‘Almost’ lockless model in the callback routine through FID access layer  Server initiated callbacks have interesting effects, particularly in the directory change notification interface  Callbacks are FID based while notification is name based 32

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Windows Change Notification  Windows model for directory change notification  Objects added, modified or deleted initiate completion of a notification request  Windows support API is named based … not in AFS  Implement layer on top of Windows support API to map names to/from FIDs  Still edge cases that are not correctly handled, particularly in callback invalidation 33

2010 Storage Developer Conference. Kernel Drivers, LLC. All Rights Reserved. Future …  Alternate Data Streams  Extended Attributes  User and process quotas  Enhanced extent processing interface  Windows Management Instrumentation  Dynamically loadable functional driver – eliminates reboot for updates to file system 34