`
`&\\\\m
`........
`an
`
`..;¥....\\
`
`LG Electronics, Inc. et al.
`EXHIBIT 1027
`for
`IPR Peti ion
`U.S. Patent No. 7,149,511
`
`
`
`
`
`2%E=m§§_
`
`
`
`Quick Reference Guide to Protocol Descriptions
`
`NFS Protocol Procedures, Versions 2 and 3
`
`Pr
`
`d
`
`N 7
`
`Descri
`
`tion
`
`’ Version 2 Pa e
`
`Version3 Pa e
`
`
`
`
`
`COMMIT
`
`Commit cached data on a server
`
`221
`
`to stable storage
`
`MOUNT Protocol Procedures. Versions 1, 2, and 3
`
`Name
`
`Description
`
`Page
`
`
`
`
`
`NV
`
`
`
`
`
`Brent Callaghan
`
`AV
`
`V
`
`ADD|SON—WESLEY
`
`An Imprint of Addison Wesley Longman, Inc.
`Reading, Massachusetts 0 Harlow, England 0 Menlo Park, Calzfornia
`Berkeley, California 0 Don Mills, Ontario 0 Sydney
`Bonn 0 Amsterdam 0 Tokyo ° Mexico City
`
`
`
`Many of the designations used by manufacturers and sellers to distinguish their_prod-
`ucts are claimed as trademarks. Where those designations appear in this book and
`Addison-Wesley was aware of a trademark claim, the designations have been printed in
`initial caps or all caps.
`
`The author and publisher have taken care in the preparation of this book but make no
`expressed or implied warranty of any kind and assume no responsibility for errors or
`omissions. No liability is assumed for incidental or consequential damages in connec-
`tion with or arising out of the use of the information or programs contained herein:
`
`The publisher offers discounts on this book when ordered in quantity for special sales.
`For more information, please contact:
`
`Corporate, Government, and Special Sales
`Addison Wesley Longman, Inc.
`One Jacob Way
`Reading, Massachusetts 01867
`
`Library of Congress Cataloging-in-Publication Data
`
`Callaghan, Brent
`NFS illustrated / Brent Callaghan
`p.
`cm. ~ (Addison-Wesley professional computing series)
`Includes bibliographical references and index.
`ISBN 0-201-32570-5
`
`1. Network File System (Computer network protocol)
`
`1. Title.
`
`II. Series
`
`TK5105.574 .C35 2000
`004.6’2--dc21
`
`99-056696
`
`Copyright © 2000 by Addison Wesley Longman, Inc.
`
`All rights reserved. No part of this publication may be reproduced, stored in a retrieval
`system, or transmitted, in any form, or by any means, electronic, mechanical, photo-
`copying, recording, or otherwise, without the prior consent of the publisher. Printed in
`the United States of America. Published simultaneously in Canada.
`
`ISBN 0-201-32570-5
`
`Text printed on recycled and acid-free paper.
`
`
`
`
`
`
`
`Contents
`
`Preface
`
`1
`
`Introduction
`
`1.1 File Access and File Transfer
`
`1.2 Early File Access Protocols
`1.3 ONC RPC
`
`1.4 Organization of This Book
`
`2
`
`XDR—Externa| Data Representation
`2.1
`Protocols and Transportable Data
`2.2
`A Canonical Standard
`
`2.3
`
`2.4
`
`2.5
`
`2.6
`
`XDR Unit
`
`Primitive XDR Data Types
`2.4.1
`Integer
`2.4.2 Unsigned Integer
`2.4.3 Boolean
`
`2.4.4 Hyper Integer and Unsigned Hyper Integer
`2.4.5
`Fixed-Length Opaque Data
`2.4.6 Variable-Length Opaque Data
`2.4.7
`String
`Structured XDR Data Types
`2.5.1
`Fixed-Length Array
`2.5.2 Variable-Length Array
`2.5.3 Discriminated Union
`2.5.4 Linked Lists
`
`_
`
`XDR Language
`2.6.1 Notational Conventions
`2.6.2
`Lexical Notes
`
`2.6.3
`2.6.4
`
`Syntax Information
`Syntax Notes
`
`xvii
`
`1
`
`2
`
`4
`6
`
`6
`
`9
`9
`11
`
`12
`
`13
`13
`14
`14
`
`15
`15
`15
`15
`16
`16
`16
`17
`17
`
`17
`18
`18
`
`19
`20
`
`vii
`
`
`
`viii
`
`Contents
`
`2.6.5 Example of an XDR Data Description
`2.6.6 XDR Language Variant in This Book
`
`2.7
`
`Summary
`
`3
`
`ONC RPC
`
`3.1
`
`3.2
`
`3.3
`
`3.4
`
`3.5
`
`3.6
`
`3.7
`3.8
`
`Remote Procedure Call Model
`
`RPC Transport Independence and Semantics
`
`Program Numbers and Versioning
`
`Requirements of the RPC Protocol
`
`RPC Call Message
`
`RPC Reply Message
`
`Record-Marking Standard
`Portma per and Rpcbind
`3.8.1
`ortmap Protocol
`3.8.2 Rpcbind Protocol
`
`3.9
`
`Summary
`
`4
`
`RPC Authentication
`
`4.1
`
`RPC Credential and Verifier
`
`4.2 Authentication Flavors
`
`4.3 Null Authentication
`
`System Authentication
`4.4
`4.5 Diffie-Hellman Authentication
`4.5.1 Naming
`4.5.2 DH Authentication Verifiers
`
`4.5.3 Nicknames and Clock Synchronization
`4.5.4 DH Authentication Protocol
`4.5.5 DH Full Network Name Credential and Verifier
`4.5.6 DH Nickname Credential and Verifier
`4.5.7
`Server Verifier
`
`4.5.8 Diffie-Hellman Encryption
`4.5.9 Weaknesses of DH Authentication
`4.6 Kerberos Version 4 Authentication
`4.6.1 Kerberos Naming
`4.6.2 Kerberos-Based Authentication Protocol Specification
`4.6.3 Kerberos Full Network Name Credential and Verifier
`4.6.4 Kerberos Nickname Credential and Verifier
`4.6.5
`Server Verifier
`
`4.6.6 Kerberos-Specific Authentication Status Values
`4.6.7 Weaknesses of Kerberos Authentication
`
`4.7
`
`RPCSEC_GSS Authentication
`4.7.1
`RPCSEC_GSS Security Protocol
`4.7.2
`RPCSEC_GSS Credential
`4.7.3 Context Creation
`
`4.7.4
`
`Successful Creation Response
`
`’
`
`20
`21
`
`23
`
`25
`
`A 25
`
`27
`
`29
`
`30
`
`31
`
`33
`
`36
`38
`39
`40
`
`41
`
`43
`
`43
`
`44
`
`44
`
`45
`48
`49
`49
`
`50
`51
`51
`53
`54
`
`56
`57
`58
`59
`59
`59
`61
`62
`
`62
`63
`
`64
`65
`66
`66
`
`68
`
`
`
`Contents
`
`ix
`
`4.7.5
`4.7.6
`4.7.7
`4.7.8
`4.7.9
`4.7.10
`4.7.11
`4.7.12
`4.7.13
`
`Unsuccessful Context Creation
`
`RPC Data Exchange
`Data Integrity Protection
`Data Privacy
`Server Processing of RPC Data Requests
`Server's Reply
`RPCSEC_GSS Errors
`Performance of RPCSEC_GSS
`Snoop Trace of Session
`
`4.8
`
`4.9
`
`Connection-Based Security
`
`Summary
`
`5
`
`NFS Filesystem Model
`
`5.1
`5.2
`5.3
`
`5.4
`
`Filesystem and Filesystem Objects
`Filehandles
`Pathnames
`5.3.1
`Filename Component Handling
`5.3.2
`Pathname Evaluation
`Stateless'Server
`5.4.1
`Server Recovery
`5.4.2
`Idempotent Operations
`5.4.3
`Statelessness and High Availability
`
`5.5
`
`Summary
`
`6
`
`NFS Version 2
`
`6.1
`6.2
`
`Common Data Types
`Server Procedures
`6.2.1
`Procedure 0: NULL—Do Nothing
`6.2.2
`Procedure 1: GETATTR——Get File Attributes
`6.2.3
`Procedure 2: SETATTR—Set File Attributes
`6.2.4
`6.2.5
`6.2.6
`6.2.7
`6.2.8
`6.2.9
`6.2.10
`6.2.11
`6.2.12
`6.2.13
`6.2.14
`6.2.15
`6.2.16
`
`Procedure 4: LOOKUP~Look Up File Name
`Procedure 5: READLINK——Read frorn Symbolic Link
`Procedure 6: READ—Read from File
`Procedure 8: WRITE——Write to File
`Procedure 9: CREATE——Create File
`Procedure 10: REMOVE—Remove File
`Procedure 11: RENAME—Rename File
`Procedure 12: LINK—Create Link to File
`
`Procedure 13: SYMLINK———Create Symbolic Link
`Procedure 14: MKDIR——Create Directory
`Procedure 15: RMDIR——Rernove Directory
`Procedure 16: READDIR——Read from Directory
`Procedure 17: STATFS—Get Filesystem Attributes
`
`7
`
`NFS Version 3
`
`7.1
`
`Changes from the NFS Version 2 Protocol
`7.1.1
`Deleted Procedures
`7.1.2
`Modified Procedures
`7.1.3
`New Procedures
`
`81
`
`81
`
`83
`
`85
`85
`86
`87
`88
`88
`
`90
`
`91
`
`92
`
`98
`
`100
`102
`104
`106
`107
`109
`112
`115
`116
`119
`120
`122
`124
`126
`. 128
`
`131
`
`132
`132
`132
`133
`
`
`
`7.1.4
`7.1.5
`7.1.6
`7.1.7
`7.1.8
`7.1.9
`7.1.10
`
`Filehandle Size
`Maximum Data Sizes
`
`Error Return
`File Type
`File Attributes
`Set File Attributes
`32-Bit Clients/ Servers and 64-Bit Clients / Servers
`
`7.2
`
`7.3
`
`Basic Data Types
`7.2.1
`Sizes
`7.2.2
`
`Basic Data Types
`Server Procedures
`7.3.1
`Procedure 0: NULL——Do Nothing
`7.3.2
`Procedure 1: GETATTR-Get File Attributes
`7.3.3
`Procedure 2: SETATTR—Set File Attributes
`7.3.4
`7.3.5
`7.3.6
`7.3.7
`7.3.8
`7.3.9
`7.3.10
`7.3.11
`7.3.12
`7.3.13
`7.3.14
`7.3.15
`7.3.16
`7.3.17
`7.3.18
`
`Procedure 3: LOOKUP—~Loo1< Up Filename
`Procedure 4: ACCESS—Check Access Permission
`
`Procedure 5: READLlNK——Read from Symbolic Link
`Procedure 6: READ—Read from File
`Procedure 7: WRITE———Write to File
`Procedure 8: CREATE—Create a File
`
`Procedure 9: MKDIR——Create a Directory
`Procedure 10: SYMLINK—~Create a Symbolic Link
`Procedure 11: MKNOD—-Create a Special Device
`Procedure 12: REMOVE——~Remove a File
`
`Procedure 13: RMDIR——Remove Directory
`Procedure 14: RENAME—Rename File or Directory
`Procedure 15: LINK—Create Link to an Object
`Procedure 16: READDIR—Read from Directory
`Procedure 17: READDIRPLUS—Extended Read
`
`7.3.19
`
`7.3.20 1
`
`7.3.21
`
`7.3.22
`
`from Directory
`Procedure 18: FSSTAT—Get Dynamic Filesystem
`Information
`
`Procedure 19: FSINFO—Get Static Filesystem
`Information
`Procedure 20: PATHCONF——Retrieve POSIX
`Information
`Procedure 21: COMMIT———Commit Cached Data
`
`on a Server to Stable Storage
`
`NFS Implementation
`8.1
`File Attributes
`
`8.2
`
`8.3
`
`8.4
`
`8.5
`
`8.6
`8.7
`
`Unsupported Procedures
`
`Multiple Version Support
`Last Close Problem
`
`Crossing of Server Mountpoints
`Problems with Hierarchical Mounts
`Permission Issues
`8.7.1
`8.7.2
`8.7.3
`
`Identifying Users
`Access to Open Files
`UID / GID Mapping
`
`Contents
`
`134
`134
`134
`135
`135
`135
`' 135
`136
`136
`137
`
`147
`149
`149
`151
`155
`158
`162
`164
`168
`174
`179
`182
`186
`190
`192
`195
`199
`202
`
`205
`
`212
`
`214
`
`218
`
`221
`
`225
`
`225
`
`225
`
`226
`
`227
`
`228’
`
`230
`230
`231
`231
`232
`
`
`
`Contents
`
`8.8
`
`8.9
`
`8.10
`
`8.11
`
`8.12
`
`8.13
`8.14
`
`8.7.4
`8.7.5
`
`Checking File Access
`Executable Files
`
`Concurrent RPC Calls
`
`Duplicate Request Cache
`
`.
`
`Synchronous Operations and Stable Storage
`
`Adaptive Retransmission for UDP
`Read-ahead and Write-behind
`
`Write Gathering
`Cachin Policies
`8.14.1
`ached Objects
`8.14.2
`Cache Consistency
`8.14.3
`Close-to-Open Consistency
`8.14.4
`Read and Write Caching
`8.14.5
`Disk Caching
`8.14.6
`Disconnection and Reconnection
`
`8.15
`
`8.16
`
`Connectathon
`
`Summary
`
`NFS MOUNT Protocol
`
`9.1
`
`9.2
`
`9.3
`
`9.4 '
`9.5
`
`Protocol Revisions
`
`Transport
`Authentication
`
`Access Lists
`Server Procedures
`9.5.1
`9.5.2
`
`Procedure 0: NULL—Do Nothing
`Procedure 1: MOUNTPROC_MNT——Add
`MOUNT Entry
`Procedure 2: MOUNTPROC_DUMP—Return
`MOUNT Entries
`Procedure 3: MOUNTPROC_UMNT—.RemoVe
`MOUNT Entry
`Procedure 4: MOUNTPROC_UMNTALL—
`Remove All MOUNT Entries
`Procedure 5: MOUNTPROC_EXPORT——Return
`Export List
`Procedure 6: MOUNTPROC_EXPORTALL——
`Return Export List
`Procedure 7: MOUNTPROC_PATHCONF——
`POSIX Pathconf Information
`
`9.5.3
`
`9.5.4
`
`9.5.5
`
`9.5.6
`
`9.5.7
`
`9.5.8
`
`9.6
`
`9.7
`
`9.8
`
`9.9
`
`MOUNT Table
`
`Submounts
`
`Export Limitations
`
`Summary
`
`xi
`
`232
`233
`
`M 234
`234
`
`236 ‘
`
`239
`
`241
`
`243
`244
`245
`246
`248
`248
`249
`250
`
`252
`
`253
`
`255
`
`256
`
`257
`
`257
`
`258
`259
`259
`
`260
`
`263
`
`264
`
`265
`
`265
`
`267
`
`267
`
`A 270
`
`271
`
`273
`
`275
`
`
`
`xii
`
`Contents
`
`10 NFS Lock Manager Protocol
`
`10.1 Monitored Locking
`10.2
`
`Advisory vs. Mandatory Locks
`Exclusive and Nonexclusive Locks
`
`10.3
`
`10.4
`
`10.5
`
`10.6
`
`10.7
`
`10.8
`
`10.9
`
`Asynchronous Procedures and Callback
`
`DOS /Windows File Sharing Procedures
`
`Server Crash Recovery
`
`Lockd and Statd Implementation
`
`Client Crash Recovery
`Deadlock Detection
`
`10.10 Locking Cached or Mapped Files
`
`10.11 Transport and Authentication
`
`10.12 Basic Data Types
`10.13
`Errors
`
`10.14 Lock Manager Procedures
`10.14.1
`Procedure 0: NULL—-Do Nothing
`10.14.2
`Procedure 1: NLM_TEST——Test for a Lock
`10.14.3
`Procedure 2: NLM_LOCK—Create a Lock
`10.14.4
`Procedure 3: NLM_CANCEL—-Cancel a Lock
`10.14.5
`Procedure 4: NLM_UNLOCK—Remove a Lock
`10.14.6
`Procedure 5: NLM_GRANTED—Lock Is Granted
`10.14.7
`Procedure 20: NLM_SHARE—Share a File
`10.14.8
`Procedure 21: NLM_UNSHARE—Unshare a File
`10.14.9
`Procedure 22: NLM_NM_LOCK—Estab1ish
`a Nonmonitored Lock
`10.14.10 Procedure 23: NLM_FREE_ALL——Free A11 Locks
`Network Status Monitor Protocol
`10.15.1
`Procedure 0: SM__NULL——Do Nothing
`10.15.2
`Procedure 1: SM_STAT——Checl< Status
`10.15.3
`Procedure 2: SM_MON———Monitor a Host
`10.15.4
`Procedure 3: SM_UNMON—Unmonitor a Host
`10.155
`Procedure 4: SM_UNMON_ALL—Unmonitor
`All Hosts
`Procedure 5: SM_SIMU_CRASH——Simu1ate a Crash
`Procedure 6: SM_NOTIFY——-Notify a Host
`
`10.15.6
`10.15.7
`
`10.15
`
`10.16 Summary
`
`11
`
`Automounting321
`11.1
`Automounter as NFS Server
`
`11.2
`
`11.3
`
`11.4
`
`Problems with Symbolic Links
`
`Automounting with Autofs
`
`Automounter Maps
`11.4.1 Master Map
`11.4.2 Direct Map
`
`277
`
`278
`
`281
`
`281
`
`i 282
`
`283
`
`284
`
`287
`
`288
`
`289
`
`290
`
`291
`
`292
`
`294
`294
`295
`296
`299
`302
`304
`305
`308
`31 0
`
`311
`311
`
`312
`313
`313
`314
`316
`
`317
`317
`318
`
`318
`
`322
`
`324
`
`327
`
`329
`329
`329
`
`
`
`Contents
`
`11.5
`
`11.6
`
`11.7
`
`11.8
`
`11.9
`
`11.10
`
`11.4.3 Indirect Map
`11.4.4 Executable Map
`Offset Mounts
`
`Multiple Mounts
`
`Replica Servers
`
`Map Variables and Key Substitution
`
`MOUNT Options
`Amd Automounter
`11.10.1 Nonblocking Operation
`11.10.2 Server Keepalives
`11.10.3 Map Syntax
`
`11.11
`
`Summary
`
`12
`
`NFS Variants
`
`12.1
`
`Spritely NFS
`1
`.1.1 Stateful Server
`12.1.2 Callbac-k
`12.1.3 Write-behind
`
`12.1.4 Recovery
`12.1.5 Performance
`
`12.2
`
`12.1.6 Summary
`NQNFS
`12.2.1 Leases
`
`12.3
`
`12.2.2 Recovery
`12.2.3 Other Features
`
`12.2.4 Summary
`Trusted NFS
`12.3.1 AUTH_MLS Credential
`12.3.2 Extended Attributes
`12.3.3 Filename Attributes
`
`12.3.4 TNFS Interoperability
`12.3.5 Summary
`NASD NFS
`
`12.4
`
`12.4.1 NASD Storage
`12.4.2 Locating the Data
`12.4.3 Data Security
`12.4.4 Summary
`
`13
`
`Other Distributed Filesystems
`13.1
`Remote File Sharing
`13.1.1 Remote System Calls
`13.1.2
`RFS Naming
`13.1.3
`Security and UID/GID Mapping
`13.1.4
`Summary
`Andrew File System
`13.2.1
`File Caching
`13.2.2
`Shared Namespace
`13.2.3 Volume Movement
`
`13.2
`
`xiii
`
`330
`331
`332
`
`333
`
`334 '
`
`337
`
`339
`
`339
`339
`340
`340
`
`341
`
`343
`
`343
`344
`344
`345
`347
`348
`349
`349
`350
`35 1
`352
`352
`352
`353
`354
`355
`356
`356
`356
`357
`358
`358
`359
`
`361
`361
`361
`362
`363
`363
`364
`364
`366
`367
`
`
`
`xiv
`
`Contents
`
`13.3
`
`13.4
`
`13.2.4
`13.2.5
`13.2.6
`
`Read-only Replication
`Security
`Summary
`DCE / DFS
`13.3.1
`Cache Consistency with Tokens
`13.3.2
`DFS Namespace
`13.3.3
`Episode File System
`13.3.4
`Summary
`SMB File Access
`13.4.1
`Namespace
`13.4.2
`Session Setup
`13.4.3
`PC File Semantics
`13.4.4
`13.4.5
`13.4.6
`13.4.7
`13.4.8
`
`Batched Requests
`File Locking
`Opportunistic Locks
`The Samba Server
`
`Summary
`
`14
`
`PC NFS
`
`14.1 File Naming
`14.2
`
`File Attributes
`Text Files
`
`14.3
`
`14.4
`
`14.5
`
`14.6
`
`14.7
`
`Symbolic Links
`PCNFSD Protocol
`14.5.1
`Printing
`14.5.2
`Comment Strings
`14.5.3
`Transport and Authentication
`PCNFSD Version 1
`14.6.1
`Procedure 1: PCNFSD_AUTH—Perform User
`Authentication
`
`14.6.2
`
`14.6.3
`
`Procedure 2: PCNFSD_PR_INIT———Prepa re
`for Remote Printing
`Procedure 3: PCNFSD_PR_START—Submit
`Print ]ob
`PCNFSD Version 2
`14.7.1
`Procedure 1: PCNFSD2_INFO——Determine
`Supported Services
`Procedure 2: PCNFSD2_PR_INIT——Prepare
`for Remote Printing
`Procedure 3: PCNFSD2_PR_START——Submit ]ob
`for Printing
`.
`Procedure 4: PCNFSD2_PR_LlST—List Printers
`on Server
`Procedure 5: PCNFSD2_PR_QUEUE—List Printer
`Jobs Queued
`Procedure 6: PCNFSD2_PR_STATUS—Determine
`Printer Status
`Procedure 7: PCNFSD2_PR_CANCEL——Cancel
`a Print Job
`
`14.7.2
`
`14.7.3
`
`14.7.4
`
`14.7.5
`
`14.7.6
`
`14.7.7
`
`368
`368
`368
`369
`369
`370
`' 371
`371
`
`3 72
`372
`373
`373
`374
`374
`374
`376
`376
`
`379
`
`379
`
`381
`
`382
`
`382
`
`384
`385
`387
`387
`387
`
`388
`
`389
`
`390
`391
`
`391
`
`393 '
`
`394
`
`395
`
`396
`
`398
`
`399
`
`
`
`Contents
`
`14.7.8
`
`14.7.9
`
`14.7.10
`
`14.7.11
`
`14.7.12
`
`14.7.13
`
`14.7.14
`
`Procedure 8: PCNFSD2_PR_ADMIN———Printer
`Administration
`
`Procedure 9: PCNFSD2_PR_REQUEUE—Change
`Print Job Queue Position
`Procedure 10: PCNFSD2_PR_HOLD——Hold a Print
`Job in the Queue
`_
`_
`Procedure 11: PCNFSD2_PR_RELEASE——Release ~
`Hold on a Print Job
`Procedure 12: PCNFSD2_MAPID——Translate
`Between Username and ID
`Procedure 13: PCNFSD2_AUTH—Perform User
`Authentication
`
`Procedure 14: PCNFSD2_ALERT—Send Message
`to Server Administrator
`
`14.8 BWNFSD /HCLNFSD Protocol
`
`14.9 Summary
`
`15
`
`NFS Benchmarks
`
`15.1 Factors Affecting Performance
`15.1.1
`Memory
`CPU
`Network
`Network Interfaces
`Server Data Bus
`NVRAM
`Disk Controllers
`
`15.2
`
`15.3
`
`15.4
`15.5
`
`15.6
`
`15.7
`
`Disk Spindles
`oad
`
`Workl
`15.2.1
`15.2.2
`15.2.3
`
`Operation Mix
`Working Set
`File and Directory Size
`Nfsstone
`
`Nhfsstone
`SFS 1.0 and 1.1
`15.5.1
`Running the SFS Benchmark
`15.5.2
`Workload
`15.5.3
`15.5.4
`
`Server Configuration
`Cluster Challenge
`SFS 2.0
`
`Summary
`
`16
`
`WebNFS
`
`16.1
`
`Internet and NFS over TCP
`
`16.2
`
`16.3
`
`16.4
`
`16.5
`
`Internet and NFS Version 3
`
`Firewalls
`
`Public Filehandle
`
`Multicomponent LOOKUP
`
`XV
`
`400
`
`401
`
`403 .
`
`404
`
`405
`
`407
`
`408
`
`409
`
`410
`
`413
`
`414
`414
`414
`415
`416
`417
`417
`417
`417
`418
`418
`419
`419
`419
`
`421
`422
`423
`424
`426
`426
`
`428
`
`430
`
`431
`
`431
`
`432
`
`433
`
`433
`
`434
`
`
`
`xvi
`
`Contents
`
`16.5.1 Pathname Evaluation and Latency
`16.5.2 Initialization Overhead
`16.5.3 Pathname Evaluation
`16.5.4 Server Evaluation of Pathname
`
`16.5.5 Symbolic Links
`16.6 NFS URL
`16.6.1 URL Structure
`16.6.2 Absolute vs. Relative Paths
`16.7 WebNFS Client Characteristics
`
`16.7.1 Mountpoint Crossing
`16.7.2 Fetching a File
`16.7.3 Fetching a Directory
`16.7.4 Fetching a Symbolic Link
`16.7.5 Document Types
`16.8 WebNFS Server Requirements
`16.8.1 Evaluating a Multicomponent LOOKUP
`16.8.2 Canonical vs. Native Path
`16.8.3 Client and Server Port
`
`16.9 WebNFS Security Negotiation
`
`16.10 Summary
`
`17 NFS Version 4
`
`17.1 An IETF Protocol
`
`17.2 NFS Version 4 Working Group Charter
`
`17.3
`
`Improved Access and Good Performance
`on the Internet
`17.3.1 Protocol Integration
`17.3.2 Latency
`17.3.3 Bandwidth
`
`17.3.4 Efficient Caching
`17.3.5 Proxy Caching
`17.3.6 Scalability
`17.3.7 Availability
`17.4 Strong Security with Negotiation Built into the
`Protocol
`17.4.1 Connection—Based Security
`17.4.2 RPC-Based Security
`17.5 Better Cross-Platform Interoperability
`17.5.1 File Attributes
`
`17.5.2 Representing User and Group IDs
`17.5.3 Access Control Lists
`_.
`
`17.5.4 File Locking
`17.5.5 Internationalization
`
`17.6 Designed for Protocol Extensions
`
`17.7 Summary
`
`References
`
`Index
`
`434
`435
`435
`436
`
`436
`438
`’ 438
`438
`439
`
`441
`441
`442
`442 1
`442
`442
`442
`444
`444
`
`445
`
`447
`
`449
`
`450
`
`451
`
`452
`452
`453
`455
`
`456
`456
`457
`458
`
`459
`459
`459
`460
`460
`
`461
`462
`
`462
`463
`
`465
`
`466
`
`467
`
`475
`
`
`
`Preface
`
`I have been working with the NFS protocol since Ijoined Sun Microsystems in
`1986. At that time the NFS market was expanding rapidly and I was excited to
`be working with the group, led by Bob Lyon, that developed the protocol and
`its first implementation in SunOS. In the NFS group, the protocol was a pow-
`erful but raw technology that needed to be exploited. We wanted it to run on
`as many platforms as possible, so an NFS porting group was assigned the task
`of helping other companies implement NFS on their computers.
`Our NFS evangelism was a little ahead of its time. Before the phrase
`”open systems” had yet become hackneyed, we'd made the source code for
`Sun RPC available for free download via FTP server1 and organized the first
`Connectathon event. At Connectathon our enthusiasm for NFS was shared
`
`with engineers from other companies who brought along their machines,
`source code, and junk food and spent a few days connected to a network, test-
`ing their NFS client and server implementations against each other.
`Implementations of the NFS protocol have been successful in bringing
`remote file access to programs through existing interfaces. There is no need to
`change the software for remote file access or to name files differently. NFS has
`been almost too successful at making remote files indistinguishable from local
`files. For instance, a program that backs up files on a local disk to tape needs
`to avoid stumbling into NFS filesystems. For everyone but system administra-
`tors, NFS is invisible——if you ignore the rare ”NFS server not responding”
`message.
`It's easy to forget NFS is there. NFS has no programming interface of its
`own. Even software engineers have no need to deal with NFS directly. There
`are no conference tutorials called ”Programming with NFS,” there are no
`magazine screen shots of NFS-enabled applications, and there are no demon-
`
`1. It is still available today via the Connectathon Web site (zuww.cormectnthorz.org).
`
`xvii
`
`
`
`xviii
`
`Preface
`
`strations of NFS at trade shows. Except for server administrators, NFS seems
`not to exist.
`
`There are many server implementations of the NFS protocol, each with its
`own features. Each of theseserver implementationshas its own documenta-
`tion, each slightly different. Perhaps this explains why there are so few NFS
`books available. NFS is never more than a chapter in‘ a book about the operat-
`ing system in which it is embedded.
`Although NFS implementations vary, there is an underlying invariant: the
`protocol itself. NFS is not a single protocol. Not only are there two versions of
`the protocol in use now, but there is a third version in development as well.
`The NFS protocol is layered on XDR and RPC protocols, and no implementa-
`tion is complete without the MOUNT and Lock Manager protocols. I wanted
`to bring all the NFS protocols together into a single volume along with other
`topics unique to NFS, such as Connectathon and the SPEC SFS benchmarks.
`I wanted this book to describe the protocol in detail in a more interesting
`way than a dry, text—only specification. I was inspired by Richard Stevens’s
`book TCP/IP Illustrated, Volume 1. This book is an excellent example of net-
`work protocols animated through the use of diagrams and real protocol
`traces that show the protocol in action. I have used that book as a model for
`my own description of the NFS protocols. I hope you will appreciate it as a
`useful reference.
`
`Acknowledgments
`
`Many people have helped me write this book. I attribute the idea for the book
`to Carol Long, my first editor at Addison Wesley Longman. Thanks to Richard
`Stevens and John Ousterhout for the advice and encouragement I needed to
`begin this venture. I'm grateful to my editor, Mary O'Brien, for her generous
`support and encouragement over the two years it took to write the book and
`to Elizabeth Spainhour for prompt handling of my drafts and reviews.
`I'm very grateful to fellow NFS engineer Mike Eisler, who gave me
`prompt and insightful feedback on several drafts. Agnes Jacob did me a great
`favor in filling a draft with lots of yellow sticky notes with suggestions that
`helped improve the readability of some of my more obscure text. I'm thankful
`that Mike Kupfer and Salit Gazit were able to guide me through the mysteries
`of the Network Lock Manager—their experience with this protocol was
`invaluable. David Robinson and Spencer Shepler, who both spent several
`years developing the SPEC SFS benchmarks, corrected my description of SFS
`benchmarking and offered useful background material.
`Thanks to Alex Chiu for the corrections he provided to my account of the
`WebNFS security negotiation protocol. Carl Beame and Fred Whiteside were
`invaluable in their review of the PC-NFS chapter. In particular, they provided
`me with useful material on their BWNFSD daemon implementation. Thanks
`
`
`
`Preface
`
`xix
`
`to Jeff Mogul for his thorough review of my short description of his work on
`Spritely NFS and to Rick Macklem for checking my description of his NQNFS
`variant of NFS version 2. I'm grateful to Gary Winiger for the corrections and
`additional material he offered for the section on Trusted NFS (TNFS).
`Special thanks to my technical reviewers for toleratingrny lengthy (and
`sometimes incomplete) manuscripts. To be a useful reference, a technical book
`depends heavily on the accumulated experience of its reviewers. Thanks to
`Ran Atkinson, Richard Basch, Bob Gilligan, Clemens I-Iuebner, Ron Hutchins,
`Kirk McKusick, Tom McNeal, Vernon Schryver, Hal Stern, Dana Treadwell,
`and Andy Watson.
`I'm grateful to my employer, Sun Microsystems, Inc., for giving me the
`time and resources to write this book. A special thanks to my managers for
`their unwavering support: Cindy Vinores, David Brittle, and Bev Crair.
`Thanks to Professional Computing Series editors Brian Kernighan and Craig
`Partridge for their detailed and helpful reviews.
`Finally, I'm grateful for the patience and understanding of my family: my
`wife, Barbara, and sons, Luke and Eli. Not only did they cheerfully put up
`with my frequent absences to work on ”The Book,” they also provided
`needed encouragement.
`
`
`
`Chapter 1
`
`Introduction
`
`he NFSTM protocol (hereafter simply called ”NFS”) is a network protocol
`that makes files stored on a file server accessible to any computer on a
`network. In this book I describe not only the NFS protocol and its implemen-
`tation, but other protocols that NFS depends on. The book is intended for peo-
`ple who are interested in a better understanding of the NFS protocol:
`developers interested in creating new NFS implementations or system admin-
`istrators and users curious about how NFS works. For such a popular proto-
`col, it is unusual that there are no books that describe it in detail. NFS is
`
`accorded a mention in many books that describe TCP/IP-based protocols, but
`there is no reference that provides a complete description of NFS that extends
`to the companion protocols such as MOUNT, Network Lock Manager, and
`PCNFSD. I hope this book provides a valuable reference.
`This book assumes that you are already familiar, at some basic level, with
`the concepts of TCP/IP networking and have a reasonable working knowl-
`edge of computer filesystems, programming languages, and operating sys-
`tems principles. If you wish to brush up on some of this knowledge, I
`recommend Richard Stevens’s book TCP/IP Illustrated, Volume 1 [Stevens94]
`as an excellent introduction to TCP/IP networking. It not only describes the
`protocols on which NFS and ONC RPC are built, but alsoincludes a chapter
`on version 2 of the NFS protocol. For a more complete introduction to distrib-
`uted systems and network protocols, I recommend Distributed Systems, Con-
`cepts and Design, by George Coulouris, Jean Dollimore, and Tim Kindberg
`[Cou1ouris+96]. It also includes a chapter that discusses NFS along with other
`distributed filesystem protocols.
`You will notice that the book emphasizes protocol over implementation. In
`most chapters, NFS and the protocols it depends on are discussed at the level
`of a protocol specification: What are the bits that move across the wire and
`what do they mean? There are many implementations of NFS, each with its
`own features and administration requirements. A description of the details of
`these implementations is best left for other books or technical manuals. How-
`
`
`
`Chapter 1
`
`Introduction
`
`ever, if there were no mention of implementation, this book would be just a
`very dry protocol specification. Chapter 8 is dedicated to a discussion of
`issues common to all implementations of NFS, and the protocol descriptions
`themselves have an Implementation section for every protocol procedure.
`
`1.1
`
`File Access and File Transfer
`
`File transfer was one of the first ”killer apps” for computer networks begin-
`ning with the FTP‘ protocol designed for use on the ARPANET in 1971. The
`objective of file transfer is to move an entire file across a network from one
`computer to another, which is more convenient than transporting the file on a
`floppy disk or magnetic tape. FTP supports a number of different file types,
`displays directory listings, and allows some directory manipulation on the
`server. With FTP, files can be created, removed, and renamed. However, FTP
`does not allow file content to be manipulated directly by applications. You
`need to transfer a file in its entirety to a local disk before you can view or
`change it. The need for file transfer makes accessing remote data less attrac-
`tive. You need to remember which files are ”remote” and which are “local.” A
`
`remote file that needs file transfer cannot be opened directly by a program. It
`must be transferred to a local disk before it can be viewed and transferred
`
`back if it has been modified. The management of transferred files can cause
`problems: you need to find a location on disk with enough space and assign a
`name to a transferred file. Your local disk may also become cluttered with
`transferred files that you have forgotten about.
`File access protocols like NFS are designed to remove the need to transfer
`the file (Figure 1.1). The file stays where it is, on the server, and is manipu-
`lated in place. ln—place manipulation has obvious benefits if the changes are
`minor. For instance, it's easy to append a new record to a large file just by
`sending the data in the new record. The file transfer alternative requires the
`file to be transferred in its entirety in both directions. File access protocols
`have significant advantages over file transfer protocols:
`
`n You get just what you need. If the client application wants only a small
`piece of the file, then only that piece needs to be transferred. For instance,
`a multipage document may consist of an initial table of contents that de-
`scribes the location of data within the file. The client may obtain the table
`of contents, then obtain the data of interest from a location within the file.
`
`- Remotefiles appear to be local. A remote file access protocol makes a remote
`server's files appear as if they were on a local disk. The user of an applica-
`tion no longer has to consciously transfer a file before accessing it.
`
`1. See RFC 959.
`
`
`
`1.1 File Access and File Transfer
`
`3
`
`File Server
`
`File
`Transfer
`
`FTP Client
`
`Application
`
`Application
`
`FIGURE 1.1 A file transfer protocol like FTP must move the file in its entirety to the client’s
`disk before an application can access it. A file access protocol like NFS allows the
`application to access the file directly on the server.
`
`in N0 stale data. Since file access protocols access the server's file directly, the
`file data are always up to date (assuming that there is no inconsistency
`caused by caching).
`
`n Diskless clients. If the client has no disk or less than enough disk space left
`to hold a large file, then the file cannot be transferred. A file access proto-
`col has no local storage requirements.
`
`~
`
`n No waiting. File transfer generally requires that the entire file be trans-
`ferred before the data can be accessed by an application. A file access pro-
`tocol can provide data to an application as soon as it arrives from the file
`server.
`
`- File locking. Using a file access protocol, a client application can lock a file
`on the server to prevent other clients from obtaining or changing the data.
`Locking avoids problems caused by clients overwriting each other’s
`changes to a file.
`
`With all these clear advantages, what are the disadvantages? Why do file
`transfer protocols like FTP continue to be so popular? To make a remote file-
`system appear to be local, the client and file server need a network connection
`that is approximately as fast as the local disk drive connection; otherwise, the
`illusion of a ”local” disk cannot be maintained. The File Transfer Protocol was
`
`written for the ARPANET, which at the time could transmit data at a speed of
`56K bits / sec; however, the speed of a local SCSI disk connection was approxi-
`mately 12M bits/sec———that’s about 200 times faster! It
`took Ethernet and
`Token Ring networks that could move data at 1M bytes/sec to bring the
`speed of network access close enough to that of local SCSI connections for
`remote access to become practical. On high speed, local area networks’ file
`access protocols are most popular, but for modem users, where bandwidth is
`still a precious commodity, file transfer is easier to use.
`
`
`
`Chapter 1
`
`Introduction
`
`NFS versions 2 and 3 are designed for these high-speed, local area net-
`works. In the final chapter of the book I discuss the challenges facing NFS ver-
`sion 4, designed to be competitive with the FTP protocol on the Internet.
`
`1.2
`
`Early File Access Protocols
`
`The high-speed networking that became available in the early 1980s created
`interest in many researchers in building file access protocols. At about this
`time, interest was growing in protocols based on Remote Procedure Calls
`(RPC). NFS was not the first, nor did it support many of the features offered
`by some of its predecessors. Perhaps the feature that most distinguished NFS
`from the others was its publication as a protocol from which many different
`implementations could be built. The other distributed filesystems of the time
`were described as implementations. This feature, a distributed filesystem as a
`protocol, continues to distinguish NFS today.
`AT&T’s RPS filesystem (described in chapter 13) was a contemporary of
`NFS but a commercial failure due to its complexity and poor performance.
`The Apollo DOMAIN operating system supported remote file access, though
`it was so tightly integrated with the operating system and Apollo hardware
`that it was impractical to implement it on other operating systems. The
`LOCUS distributed operating system [Popek+83], developed at UCLA in the
`early 1980s, provided many advanced remote file access features, such as con-
`sistent, high—performance caching, location independence, file migration and
`replication, and crash recovery. However, like RPS and DOMAIN, its distrib-
`uted filesystem was inextricably integrated with the LOCUS operating sys-
`tem. Its fate was tied to a complex implementation with limited portability.
`The Newcastle Connection [Brownbridge+82] was another remote file
`access implementation that preceded NFS by several years, and it succeeded
`in building expectations of a distributed filesystem that could be ported to
`other UNIX-like operating systems (Figure 1.2). The Newcastle Connection
`achieved its portability by implementing a distributed filesystem outside the
`
`Host A
`
`Host B
`
`RPC
`
`Program
`
`Daemon
`
`
`
`
`C Library
`UNlX Kernel
`
`C Library
`
`UNlX Kernel
`
`
`
`FIGURE 1.2 Newcastle Connection implementation. A modified C library intercepted UNIX
`I/O system calls, redirecting them locally or remotely. Remote calls were handled by an
`RPC protocol.
`
`
`
`1.2 Early File Access Protocols
`
`5
`
`UNIX kernel through a modified C library on the clients and a user~level dae-
`mon process on the server. The C library interposed functions to intercept
`UNIX system calls fo