afsafs -- andrew file system 中科院高能物理研究所计算中心 范 勇 2002.11.11...

62
AFS AFS -- Andrew File System -- Andrew File System 中中中中中中中中中中中中中中 中中中中中中中中中中中中中中 2002.11.11 2002.11.11

Upload: phillip-joseph

Post on 13-Jan-2016

330 views

Category:

Documents


9 download

TRANSCRIPT

Page 1: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFSAFSAFSAFS-- Andrew File System-- Andrew File System-- Andrew File System-- Andrew File System

中科院高能物理研究所计算中心 范 勇 中科院高能物理研究所计算中心 范 勇 2002.11.112002.11.11

中科院高能物理研究所计算中心 范 勇 中科院高能物理研究所计算中心 范 勇 2002.11.112002.11.11

Page 2: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

内容安排内容安排内容安排内容安排

AFSAFS 概述概述 AFSAFS 的组成与功能的组成与功能 AFSAFS 管理管理 AFSAFS 应用应用

Page 3: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

============================================================================

Page 4: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFSAFS 概述概述AFSAFS 概述概述

AFS is an enterprise file system designed AFS is an enterprise file system designed for use in a distributed environment on for use in a distributed environment on multiple computing platforms. multiple computing platforms.

Page 5: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFSAFS 的发展历史的发展历史AFSAFS 的发展历史的发展历史

Page 6: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFSAFS 分布式文件系统计算环境分布式文件系统计算环境AFSAFS 分布式文件系统计算环境分布式文件系统计算环境

Page 7: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFSAFS 分布式文件系统计算环境分布式文件系统计算环境AFSAFS 分布式文件系统计算环境分布式文件系统计算环境

Page 8: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFSAFS 的特性的特性AFSAFS 的特性的特性

A single, shared name space for all users, from all macA single, shared name space for all users, from all machines. hines.

Location-independent file sharing. Location-independent file sharing. Client caching and efficient wide-area protocols for exClient caching and efficient wide-area protocols for ex

cellent performance cellent performance Extended security through Kerberos authentication aExtended security through Kerberos authentication a

nd Access Control Listsnd Access Control Lists Replication techniques for file system reliabilityReplication techniques for file system reliability

Page 9: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFSAFS 中的几个基本概念中的几个基本概念AFSAFS 中的几个基本概念中的几个基本概念

CellCell VolumesVolumes Mount PointsMount Points ReplicationReplication Caching and CallbacksCaching and Callbacks TokensTokens Access Control ListAccess Control List

Page 10: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

CellCellCellCell

A A cell cell is an independently administered site ruis an independently administered site running AFS.nning AFS.

A machine can only belong to one cell at a timA machine can only belong to one cell at a time.e.

Users also belong to a cell in the sense of haviUsers also belong to a cell in the sense of having an account in it, but unlike machines can bng an account in it, but unlike machines can belong to (have an account in) multiple cells.elong to (have an account in) multiple cells.

/usr/vice/etc/CellDB/usr/vice/etc/CellDB /usr/afs/etc/CellDB/usr/afs/etc/CellDB

Page 11: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

VolumesVolumesVolumesVolumes

An AFS An AFS volume volume is a logical unit of disk space that is a logical unit of disk space that functions like a container for the files in an AFS functions like a container for the files in an AFS directory, keeping them all together on one directory, keeping them all together on one partition of a file server machine. partition of a file server machine.

Make administrative tasks easier and help Make administrative tasks easier and help improve overall system performance.improve overall system performance.

Three types of volumes in AFS:Three types of volumes in AFS:– single single read/write read/write versionversion– read-only read-only volumevolume– backup backup volumevolume

Page 12: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

Mount PointsMount PointsMount PointsMount Points

Mechanism that associates the Mechanism that associates the directory and volume is called a directory and volume is called a mount mount poinpoint.t.

Mount Points < ========== > Mount Points < ========== > VolumesVolumes

Page 13: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

ReplicationReplicationReplicationReplication

Replication Replication refers to making a copy, or refers to making a copy, or clonclone, of a source read/write volume and e, of a source read/write volume and then placing the copy on one or more then placing the copy on one or more additional file server machines in a cell.additional file server machines in a cell.

Increases the availability of the contents.Increases the availability of the contents. Most appropriate for volumes that contain Most appropriate for volumes that contain

popular files that do not change very popular files that do not change very often.often.

Page 14: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

Caching& CallbacksCaching& CallbacksCaching& CallbacksCaching& Callbacks

The problem of maintaining consistency among thThe problem of maintaining consistency among the many cached copies of a file and the source versie many cached copies of a file and the source version of a file.on of a file.

A callback is a promise by a File Server to a Cache A callback is a promise by a File Server to a Cache Manager to inform the latter when a change is maManager to inform the latter when a change is made to any of the data delivered by the File Server.de to any of the data delivered by the File Server.

Two types of Callbacks:Two types of Callbacks:– a callback with a writable copy of file.a callback with a writable copy of file.– a callback associated with the entire read-only volumea callback associated with the entire read-only volume

Page 15: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

TokensTokensTokensTokens

The token is a small collection of data that certifies The token is a small collection of data that certifies that the user has correctly provided the password that the user has correctly provided the password associated with a particular AFS identity.associated with a particular AFS identity.

When a user successfully authenticates, the AFS When a user successfully authenticates, the AFS authentication service passes a authentication service passes a token token to the user’s to the user’s Cache Manager.Cache Manager.

The Cache Manager presents the token to AFS The Cache Manager presents the token to AFS server processes along with service requests, as server processes along with service requests, as proof that the user is genuine.proof that the user is genuine.

The Cache Manager stores tokens in the user’s The Cache Manager stores tokens in the user’s credential structure in kernel memory.credential structure in kernel memory.

A user can have only one token per cellA user can have only one token per cell

Page 16: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

ACL (Access Control List)ACL (Access Control List)ACL (Access Control List)ACL (Access Control List)

AFS ACLs provide more refined access control on a AFS ACLs provide more refined access control on a directory and all of the files in it.directory and all of the files in it.

seven access permissions:seven access permissions:– a (administea (administer)r)– d (deletd (delete)e)– i (inseri (insert)t)– k (lock (lock)k)– l (lookul (lookup)p)– r (rear (read)d)– w (writw (write)e)

Three system groups:Three system groups:– system: anyusersystem: anyuser– system: authusersystem: authuser– system:administratorssystem:administrators

Page 17: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFS Vs UFSAFS Vs UFSAFS Vs UFSAFS Vs UFS

AFS UFS

Protection at directory level Protection at file level

Only user with right ACL permission can set mode bits

Normal mode bits set.

Seven access permissions:a (administer) d (delete) i (insert) k (lock)l (lookup) r (read) w (write)

Three access permissions:r (read), w(write), and x (execute).

Different set of access permissions to each users and groups with ACL

Three defined users and groups

Page 18: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFS vs. NFS (I)AFS vs. NFS (I)AFS vs. NFS (I)AFS vs. NFS (I)

NFSNFS AFSAFSInstalled Base Installed Base very large very large small, growing somewhatsmall, growing somewhat

Acces Transparency (i.e., no speciAcces Transparency (i.e., no special commands to get to files. They lal commands to get to files. They look like they are "local") ook like they are "local")

Yes Yes Yes Yes

Caching Caching Minimal Minimal Full Full

Authorization Authorization Global GID/UID Global GID/UID KerberosKerberos

Security Security Standard Unix (3 rights Standard Unix (3 rights to files and/or to files and/or directories) directories)

ACL's granting individual ACL's granting individual or groups any combination or groups any combination of seven rights to entire of seven rights to entire directories directories

•AFS,Andrew File System; Fermilab Final Evaluation Report and Implementation Recommendations, Farhad Abar, Gary Roedigers, Joseph Stith2, Matt Wicks. May 12, 1992.

Page 19: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFS vs. NFS (II)AFS vs. NFS (II)AFS vs. NFS (II)AFS vs. NFS (II)

NFSNFS AFSAFSLocation transparency (i.e. will the Location transparency (i.e. will the client machine continue to work if the client machine continue to work if the files are moved from one location to files are moved from one location to another?) another?)

No No Yes Yes

Access to local disk which is also Access to local disk which is also served to the network served to the network

Better Better Worse Worse

LAN and WAN performance LAN and WAN performance Worse Worse Better Better

dedicated Servers dedicated Servers Sometimes Sometimes Usually Usually

Scalability of management demands Scalability of management demands Worse Worse Better Better

Common name space Common name space Sometimes Sometimes Yes Yes

Online backup Online backup No No Yes Yes

Online volume move Online volume move No No Yes Yes

Page 20: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFS vs. NFS: ArchitectureAFS vs. NFS: ArchitectureAFS vs. NFS: ArchitectureAFS vs. NFS: Architecture

ArchitectureArchitectureAFS 3 NFS 3

File servers and clients form a logical administrative unit called a cell.

File servers and clients. Each file server is managed independently.

Administration by collections of files called volumes.

Administration by individual files.

Automatic file location tracking by system processes and Volume Location Database.

Mountpoints for tracking file's physical location set by administrators and users.

Stateful servers. Nearly stateless servers.

•Transarc Corporation, The AFS File System in Distributed Computing Environment, 1996

Page 21: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFS vs. NFS: PerformanceAFS vs. NFS: PerformanceAFS vs. NFS: PerformanceAFS vs. NFS: Performance

PerformancePerformance AFS 3 NFS 3

Robust disk caching reduces file server and network load.

Memory caching with small buffers.

Server callbacks guarantee cache consistency. Open-to-close semantics. Attributes cached several hours.

Time-based cache consistency may cause inconsistencies to occur. Attributes cached 3-30 seconds.

Replicas spread the load among preferred servers. No replication to reduce load.

No replication to reduce load.

Excellent performance in wide-area configurations.

Inefficient in wide-area configurations.

Scaleable; maintains performance in any size installation.

Best in small- to medium-size installations.

Page 22: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFS vs. NFS: AFS vs. NFS: AvailabilityAvailability AFS vs. NFS: AFS vs. NFS: AvailabilityAvailability

Availability Availability

AFS 3 NFS 3

Read-only replication by volume. Automatic switchover to available replica.

No standard data replication.

Files remain available to users during reconfiguration. File names remain the same.

Users lose access to files during reconfiguration. File moves require mountpoint changes to adjust file names.

Page 23: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFS vs. NFS: AFS vs. NFS: ManagementManagement AFS vs. NFS: AFS vs. NFS: ManagementManagement

Management Management

AFS 3 NFS 3

Management tasks executed from any machine.

Management tasks frequently require telnet to designated machines.

Disk quotas based on volumes; easy for user to check status.

Disk quotas based on user ID; difficult for user to check status. .

No system downtime with AFS Backup System.

Standard UNIX backup requires system downtime.

Backup clones often used for user-controlled restores.

All restores require administrator assistance.

Page 24: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFS vs. NFS: SecurityAFS vs. NFS: SecurityAFS vs. NFS: SecurityAFS vs. NFS: Security

Security Security

AFS 3 NFS 3

Kerberos version 4 authentication. Unencrypted user IDs, trusted users and hosts. Can be kerberized.

Access control lists for fine tuning directory access. UNIX mode bits for the owner.

Access control with standard UNIX mode bits on files and directories.

User-definable groups. Groups defined by system administrator.

Mutual authentication by system processes and databases. Always uses secure RPC.

Can use secure RPC .

Page 25: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

============================================================================

Page 26: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFSAFS 的体系结构的体系结构AFSAFS 的体系结构的体系结构

Page 27: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFSAFS 的组成的组成AFSAFS 的组成的组成 File ServerFile Server BOS ServerBOS Server Protection ServerProtection Server Volume ServerVolume Server Volume Location ServerVolume Location Server Update ServerUpdate Server Backup ServerBackup Server SalvagerSalvager Cache ManagerCache Manager NTPDNTPD

Page 28: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

File ServerFile ServerFile ServerFile Server

Provides the same services across the network that the Provides the same services across the network that the UNIX file system provides on the local disk.UNIX file system provides on the local disk.

Delivering programs and data files to client Delivering programs and data files to client workstations as requested and storing them again workstations as requested and storing them again when the client workstation finishes with them.when the client workstation finishes with them.

Maintaining the hierarchical directory structure that Maintaining the hierarchical directory structure that users create to organize their files.users create to organize their files.

Handling requests for copying, moving, creating, and Handling requests for copying, moving, creating, and deleting files and directories.deleting files and directories.

Keeping track of status information about each file and Keeping track of status information about each file and directorydirectory

Making sure that users are authorized to perform the Making sure that users are authorized to perform the actions they request on particular files or directories.actions they request on particular files or directories.

Creating symbolic links between files.Creating symbolic links between files.

Page 29: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

Bos (Basic OverSeer Server)Bos (Basic OverSeer Server)Bos (Basic OverSeer Server)Bos (Basic OverSeer Server)

Constantly monitors the other server Constantly monitors the other server processes (local) to make sure they are processes (local) to make sure they are running correctly.running correctly.

Automatically restarts failed processes.Automatically restarts failed processes. Accepts requests from the system Accepts requests from the system

administrator.administrator. Helps system administrators to manage Helps system administrators to manage

system configuration information.system configuration information.

Page 30: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

BOS ServerBOS Server 和其他进程的关系和其他进程的关系BOS ServerBOS Server 和其他进程的关系和其他进程的关系

Page 31: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

Authentication ServerAuthentication ServerAuthentication ServerAuthentication Server

Verifying the identity of users as they log Verifying the identity of users as they log into the system by requiring that they into the system by requiring that they provide a password.provide a password.

Providing the means through which server Providing the means through which server and client processes prove their identities and client processes prove their identities to each other.to each other.

Maintains the Maintains the Authentication DatabasAuthentication Database, e, stores user passwords converted into stores user passwords converted into encryption key form as well as the AFS encryption key form as well as the AFS server encryption key.server encryption key.

Page 32: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

Authentication ServerAuthentication Server 和其他和其他 ServerServer 的关系的关系Authentication ServerAuthentication Server 和其他和其他 ServerServer 的关系的关系

Page 33: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

Protection ServerProtection ServerProtection ServerProtection Server

The Protection Server’s main duty is to help the File Server determine if a user is authorized to access a file in the requested manner.

Defining seven access permissions with access control list (ACL) for each directory.

Enabling users to grant permissions to numerous individual users.

Enabling users to define their own groups of users, recorded in the Protection Database maintained by the Protection Server.

Enabling system administrators to create groups containing client machine IP addresses to permit access.

Page 34: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

File ServerFile Server 和和 Protection ServerProtection Server 的关系的关系File ServerFile Server 和和 Protection ServerProtection Server 的关系的关系

Page 35: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

Volume ServerVolume ServerVolume ServerVolume Server

The The Volume Server Volume Server provides the provides the interface through which you create, interface through which you create, delete, move, and replicate volumes, as delete, move, and replicate volumes, as well as prepare them for archiving to well as prepare them for archiving to tape or other media (backing up).tape or other media (backing up).

Page 36: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

Volume Location ServerVolume Location ServerVolume Location ServerVolume Location Server

The The VL Server VL Server maintains a complete list maintains a complete list of volume locations in the of volume locations in the Volume Volume Location Database (VLDBLocation Database (VLDB).).

The VLDB and VL Server make it The VLDB and VL Server make it possible for AFS to take advantage of possible for AFS to take advantage of the increased system availability gained the increased system availability gained by using multiple file server machines, by using multiple file server machines, because the Cache Manager knows because the Cache Manager knows where to find a particular file.where to find a particular file.

Page 37: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

Volume ServerVolume Server 和和 Volume Location ServerVolume Location Server 的关系的关系Volume ServerVolume Server 和和 Volume Location ServerVolume Location Server 的关系的关系

Page 38: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

Update ServerUpdate ServerUpdate ServerUpdate Server

The The Update Server Update Server helps guarantee that helps guarantee that all file server machines are running the all file server machines are running the same version of a server process.same version of a server process.

In cells that run the United States In cells that run the United States edition of AFS, the Update Server also edition of AFS, the Update Server also distributes configuration files that all file distributes configuration files that all file server machines need to store on their server machines need to store on their local disks.local disks.

Page 39: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

Backup ServerBackup ServerBackup ServerBackup Server

The The Backup Server Backup Server maintains the maintains the information in the information in the Backup DatabasBackup Database.e.

Enable administrators to back up data Enable administrators to back up data from AFS volumes to tape and restore it from AFS volumes to tape and restore it from tape to the file system if from tape to the file system if necessary.necessary.

Page 40: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

SalvagerSalvagerSalvagerSalvager

The Salvager attempts to repair disk The Salvager attempts to repair disk corruption that can result from a failure.corruption that can result from a failure.

The BOS Server invokes the Salvager The BOS Server invokes the Salvager when the File Server, Volume Server, or when the File Server, Volume Server, or both fail.both fail.

Page 41: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

Cache ManagerCache ManagerCache ManagerCache Manager

A set of extensions or modifications in the cA set of extensions or modifications in the client machine’s kernel that enable commlient machine’s kernel that enable communication with the server processes running unication with the server processes running on server machines.on server machines.

Translate file requests into remote proceduTranslate file requests into remote procedure calls (RPCs) to the File Server.re calls (RPCs) to the File Server.

Tracks the state of files in its cache.Tracks the state of files in its cache.

Page 42: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

File ServerFile Server 、、 Cache ManagerCache Manager 和和 Volume Location Volume Location ServerServer 之间的关系之间的关系File ServerFile Server 、、 Cache ManagerCache Manager 和和 Volume Location Volume Location ServerServer 之间的关系之间的关系

Page 43: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

Network Time Protocol DaemonNetwork Time Protocol DaemonNetwork Time Protocol DaemonNetwork Time Protocol Daemon

It helps guarantee that all of the file It helps guarantee that all of the file server machines agree on the time.server machines agree on the time.

Keeping clocks synchronized Keeping clocks synchronized coordinates the copies of the coordinates the copies of the Authentication, Backup, Protection, and Authentication, Backup, Protection, and Volume Location Databases.Volume Location Databases.

Page 44: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFS AFS 布署的实例布署的实例AFS AFS 布署的实例布署的实例

Page 45: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

====================================================================================

Page 46: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFSAFS 的管理的管理AFSAFS 的管理的管理 Monitoring and Controlling Server ProcessesMonitoring and Controlling Server Processes Managing VolumesManaging Volumes Administering User AccountsAdministering User Accounts

– uss Command Suiteuss Command Suite AFS Security ManagementAFS Security Management

– Managing Server Encryption KeysManaging Server Encryption Keys– Managing Access Control ListsManaging Access Control Lists– Managing Administrative PrivilegeManaging Administrative Privilege

AFS Backup SystemAFS Backup System– Configuring the AFS Backup SystemConfiguring the AFS Backup System– Backing Up and Restoring AFS DataBacking Up and Restoring AFS Data

Administering Client Machines and the Cache ManagerAdministering Client Machines and the Cache Manager Monitoring and Auditing AFS PerformanceMonitoring and Auditing AFS Performance

Page 47: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

常用的常用的 AFSAFS 系统管理命令系统管理命令常用的常用的 AFSAFS 系统管理命令系统管理命令

BosBos The administrative interface to the Basic OverSeer (BOS) ServerVosVos Interface to the Volume Server and Volume Location (VL)

Server. Used to create, move, delete, replicate, back up and examine Volumes.

UssUss Command suite help administrators to create AFS user accounts more easily and efficiently.

PtsPts Interface to the Protection Server.

KasKas Interface to the Authentication Server

BackupBackup The administrative interface to the AFS Backup System.

FsFs Interface to the Cache Manager on an AFS client machine.

SalvagerSalvager Initializes the Salvager component of the fs process.

Page 48: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

常用的常用的 AFSAFS 监控命令监控命令常用的常用的 AFSAFS 监控命令监控命令

ScoutScout Monitors the File Server process

KdbKdb Displays log or privileged actions performed by the Authentication Server

AfsmonitorAfsmonitor Monitors File Servers and Cache Managers

FstraceFstrace traces Cache Manager operations in Detail.

Page 49: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFSAFS 服务器管理服务器管理 : BOS Command Suits: BOS Command SuitsAFSAFS 服务器管理服务器管理 : BOS Command Suits: BOS Command Suits

BOS Command Suits

administer server process binary files

bos getdate, Bos install, bos prune, bos uninstall

maintain system configuration files bos addhost, bos addkey, bos adduser, bos listhosts, bos listkeys, bos listusers, bos removehost, bos removekey, bos removeuser, bos setcellname

start and stop processes bos create, bos delete, bos restart, bos shutdown, bos start, bos startup, bos stop

set and verify server process and server machine status

Bos getlog, bos getrestart, bos setauth, bos setrestart, bos status

restore file system consistency bos salvageobtain help bos apropos, bos help

Page 50: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFSAFS 卷管理卷管理 : VOS Command Suits: VOS Command SuitsAFSAFS 卷管理卷管理 : VOS Command Suits: VOS Command Suits

VOS Command Suits

Create, move, and rename volumes:

vos backup, vos backupsys, vos create, vos move, and vos rename

Remove VLDB volume records or volumes or both:

Vos delentry, vos remove, and vos zap

Edit or display VLDB server entries:

vos changeaddr and vos listaddrs

Create and restore dump files: vos dump and vos restoreAdminister replicated volumes: vos addsite, vos release, and vos remsit

eDisplay VLDB records, volume headers:

Vos examine, vos listvldb, and vos listvol

Display information about partitions that house volumes:

Vos listpart and vos partinfo

Restore consistency between the VLDB and volume headers:

vos syncserv and vos syncvldb

Lock and unlock VLDB entries: vos lock, vos unlock, and vosUnlockvldb

Report Volume Server status: vos statusObtain help: vos apropos and vos help

Page 51: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFSAFS 用户管理:用户管理: Three types of user accountThree types of user accountAFSAFS 用户管理:用户管理: Three types of user accountThree types of user account

An authentication-only account. An authentication-only account. – This type of account consists only of entries This type of account consists only of entries

in the Authentication Database and in the Authentication Database and Protection Database. Protection Database.

A basic account A basic account – In addition to Authentication Database and In addition to Authentication Database and

Protection Database entries, this type of Protection Database entries, this type of account includes a volume mounted at the account includes a volume mounted at the home directory with owner and ACL set home directory with owner and ACL set appropriately. appropriately.

A full account A full account – This type of account includes configuration This type of account includes configuration

files for basic functions such as logging in, files for basic functions such as logging in, printing, and mail delivery, making it more printing, and mail delivery, making it more convenient and useful.convenient and useful.

Page 52: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFSAFS 用户管理:用户账号的组成用户管理:用户账号的组成AFSAFS 用户管理:用户账号的组成用户管理:用户账号的组成

AFS user account components

Protection Database entry defines the username (the name provided when authenticating with AFS), and maps it to an AFS user ID

Authentication Database entry records the user’s AFS password

home volume Stores all the files in the user’s home directory together on a single partition of a file server machine. Has an associated quota

mount point Makes the contents of the user’s volume visible and accessible in the AFS filespace.

Full access permissions on the home directory’s access control list(ACL)

enable the user to manage his or her files.

local password file entry enables the user to log in and access AFS files through the Cache Manager.

Other optional configuration files

help the user log in and log out more easily, receive electronic mail, print, and so on.

Page 53: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFSAFS 文件管理文件管理 : FS Command Suits: FS Command SuitsAFSAFS 文件管理文件管理 : FS Command Suits: FS Command Suits

FS Command Suits

set and report how the Cache Manager interacts with server machines:

fs checkservers, fs getcellstatus, fs getserverprefs, fs listcells, fs newcell, fs setcell, fs setserverprefs, fs sysname, fs wscell

administer access control lists (ACLs):

fs cleanacl, fs copyacl, fs listacl, fs setacl

administer server machines, volumes or partitions :

fs diskfree, fs examine, fs listquota, fs quota, fssetquota, fs setvol,fs whereis, fs whichcell

administer the local client cache and related information:

Fs checkvolumes, fs flush, fs flushvolume, fs getcacheparms, fs Setcachesize

administer volume mount points:

fs lsmount, fs mkmount, fs rmmount

control monitoring and tracing:

fs debug, fs messages

administer the Cache Manager’s interaction with other file Systems:

fs exportafs

to obtain help: fs apropos, fs help

Page 54: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFS AFS 安全管理:安全管理: KAS Command SuitsKAS Command SuitsAFS AFS 安全管理:安全管理: KAS Command SuitsKAS Command Suits

KAS Command Suits

create, modify, examine and delete entries in the Authentication Database, including passwords:

kas create, kas delete, kas examine, kas list, kas setfields, kas setkey, kas setpassword, and kasUnlock

create, delete, and examine tokens and server tickets:

Kas forgetticket, kas listtickets, kas noauthentication, and kas stringtokey

enter interactive mode: kas interactive

trace Authentication Server operations:

kas statistics

obtain help: kas apropos and kas help

Page 55: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFS AFS 安全管理安全管理 : PTS Command Suits: PTS Command SuitsAFS AFS 安全管理安全管理 : PTS Command Suits: PTS Command Suits

PTS Command Suits:

create and remove Protection Database entries:

Pts creategroup, pts createuser, pts delete

administer and display group membership:

pts adduser, pts listowned, pts membership, pts removeuser

administer and display properties of user and group entries other than membership:

pts chown, pts examine, pts listentries, ptsrename, pts setfields

set and examine the counters used when assigning IDs to users and groups:

pts listmax, pts setmax

obtain help: pts apropos, pts help

Page 56: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFSAFS 备份管理:备份管理: Backup Command SuitsBackup Command SuitsAFSAFS 备份管理:备份管理: Backup Command SuitsBackup Command Suits

Backup Command Suits:

copy data from AFS volumes to tape or a backup data file, restore to file system:

backup diskrestore, backup dump,backup volrestore, and backup volsetrestore

administer the records in the Backup Database:

Backup adddump, backup addhost, backup addvolentry, backup addvolset, backup deldump, backup deletedump, backup delhost, backup delvolentry, backup delvolset, backup dumpinfo, backup listdumps, backup listhosts, backup listvolsets, backup scantape, backup setexp, and backup volinfo

write and read tape labels: backup labeltape and backup readlabellist and change the status of backup operations and the machines :

(backup) jobs, (backup) kill, and backup status

enter and leave interactive mode:

backup (interactive) and(backup) quit

check for and repair corruption in the Backup Database:

backup dbverify, backup restoredb, and backup savedb

obtain help: backup apropos and backup help

Page 57: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

============================================================================

Page 58: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

AFSAFS 的使用的使用AFSAFS 的使用的使用

LoginLogin QuotaQuota Access Control Access Control GroupsGroups

Page 59: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

常用的常用的 AFSAFS 用户命令用户命令 (I)(I)常用的常用的 AFSAFS 用户命令用户命令 (I)(I)

klogklog authenticate with AFS.

tokenstokens display user tokens.

kas examinekas examine Display authentication information

UnlogUnlog discard user tokens

KpasswKpasswdd change the password.

fs quotafs quota displays the percentage of quota used for the volumes

fs listquotafs listquota Display information about a volume

fs examinefs examine displays quota and other information about the volume that houses the current working directory.

fs whereisfs whereis Display File Directory’s Location

fs checkserverfs checkserverss

check the status of file server machines.

fs listcellsfs listcells Display foreign Cells

fs getserverprfs getserverprefsefs

Display the file server machine preference ranks used by the Cache Manager on the local machine.

Page 60: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

常用的常用的 AFSAFS 用户命令用户命令 (II)(II)常用的常用的 AFSAFS 用户命令用户命令 (II)(II)

fs listaclfs listacl Display ACL of a directory

Fs setaclFs setacl edit entries in the normal permissions section of the ACL.

fs copyaclfs copyacl copy a source ACL to the ACL on one or more destination directories.

pts pts membershipmembership

Display the members of a group, or the groups to which a user belongs.

pts listownedpts listowned display the groups that a user or group Owns.

pts examinepts examine display general information about a user or group, including its name, AFS ID, creator, and owner.

pts creategropts creategroupup

to create a group

pts adduserpts adduser add members to a group

pts pts membersmembers

list membership of a user or group

fs cleanaclfs cleanacl remove obsolete entries from ACLs after the corresponding user or group has been deleted.

pts deletepts delete delete a group.

Page 61: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

常用的常用的 AFSAFS 用户命令用户命令 (III)(III)常用的常用的 AFSAFS 用户命令用户命令 (III)(III)

pts chownpts chown change a group’s name.

pts renamepts rename change a group’s name.

pts setfieldspts setfields set the privacy flags on one or more groups.

Page 62: AFSAFS -- Andrew File System 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11 中科院高能物理研究所计算中心 范 勇 2002.11.11 2002.11.11

The EndThe EndThe EndThe End