removed spam links
[openafs-wiki.git] / AFSLore / GeneralFAQ.mdwn
1 ## <a name="1  General"></a> 1 General
2
3 The General Section of the [[AFSFrequentlyAskedQuestions]].
4
5 - [[PreambleFAQ]]
6
7 <div>
8   <ul>
9     <li><a href="#1  General"> 1 General</a><ul>
10         <li><a href="#1.01  What is AFS?"> 1.01 What is AFS?</a></li>
11         <li><a href="#1.02  Who supplies AFS?"> 1.02 Who supplies AFS?</a></li>
12         <li><a href="#1.03  What is /afs?"> 1.03 What is /afs?</a></li>
13         <li><a href="#1.04  What is an AFS cell?"> 1.04 What is an AFS cell?</a></li>
14         <li><a href="#1.05  What are the benefits of u"> 1.05 What are the benefits of using AFS?</a><ul>
15             <li><a href="#1.05.a  Cache Manager"> 1.05.a Cache Manager</a></li>
16             <li><a href="#1.05.b  Location independence"> 1.05.b Location independence</a></li>
17             <li><a href="#1.05.c  Scalability"> 1.05.c Scalability</a></li>
18             <li><a href="#1.05.d  Improved security"> 1.05.d Improved security</a></li>
19             <li><a href="#1.05.e  Single systems image (SS"> 1.05.e Single systems image (SSI)</a></li>
20             <li><a href="#1.05.f  Replicated AFS volumes"> 1.05.f Replicated AFS volumes</a></li>
21             <li><a href="#1.05.g  Improved robustness to s"> 1.05.g Improved robustness to server crash</a></li>
22             <li><a href="#1.05.h  "Easy to use" networking"> 1.05.h "Easy to use" networking</a></li>
23             <li><a href="#1.05.i  Communications protocol"> 1.05.i Communications protocol</a></li>
24             <li><a href="#1.05.j  Improved system manageme"> 1.05.j Improved system management capability</a></li>
25           </ul>
26         </li>
27         <li><a href="#1.06  Which systems is AFS avail"> 1.06 Which systems is AFS available for?</a></li>
28         <li><a href="#1.07  What does "ls /afs" displa"> 1.07 What does "ls /afs" display in the Internet AFS filetree?</a></li>
29         <li><a href="#1.08  Why does AFS use Kerberos"> 1.08 Why does AFS use Kerberos authentication?</a></li>
30         <li><a href="#1.09  Does AFS work over protoco"> 1.09 Does AFS work over protocols other than TCP/IP?</a></li>
31         <li><a href="#1.10  How can I access AFS from"> 1.10 How can I access AFS from my PC?</a></li>
32         <li><a href="#1.11  How does AFS compare with"> 1.11 How does AFS compare with NFS?</a></li>
33       </ul>
34     </li>
35   </ul>
36 </div>
37
38 - [[UsageFAQ]]
39 - [[AdminFAQ]]
40 - [[ResourcesFAQ]]
41 - [[AboutTheFAQ]]
42 - [[FurtherReading]]
43
44 ### <a name="1.01  What is AFS?"></a> 1.01 What is AFS?
45
46 AFS is a distributed filesystem that enables co-operating hosts (clients and servers) to efficiently share filesystem resources across both local area and wide area networks.
47
48 AFS is based on a distributed file system originally developed at the Information Technology Center at Carnegie-Mellon University that was called the "Andrew File System".
49
50 "Andrew" was the name of the research project at CMU - honouring the founders of the University. A spin-off company, Transarc Corporation (now part of IBM), started producing and marketing a commercial version of AFS in 1989.
51
52 In November, 2000, IBM Open-Sourced AFS, creating [[OpenAFS]]. Development continues to this day.
53
54 ### <a name="1.02  Who supplies AFS?"></a> 1.02 Who supplies AFS?
55
56 [[OpenAFS]] is available from the [[OpenAFS]] website. Additionally, an independant open source project, Arla, supports some clients that [[OpenAFS]] does not. Arla clients are completely compatible with [[OpenAFS]].
57
58 IBM no longer markets AFS and has declared an end-of-life for support.
59
60 <table border="1" cellpadding="0" cellspacing="0">
61   <tr>
62     <td>   </td>
63     <td>[[Main/OpenAFS]]</td>
64     <td> WWW: <a href="http://www.openafs.org/" target="_top">http://www.openafs.org/</a></td>
65   </tr>
66   <tr>
67     <td>   </td>
68     <td> Arla </td>
69     <td> WWW: <a href="http://www.stacken.kth.se/projekt/arla/" target="_top">http://www.stacken.kth.se/projekt/arla/</a></td>
70   </tr>
71 </table>
72
73 ### <a name="1.03  What is /afs?"></a> 1.03 What is /afs?
74
75 The root of the AFS filetree is /afs. If you execute "ls /afs" you will see directories that correspond to AFS cells (see below). These cells may be local (on same LAN) or remote (eg halfway around the world).
76
77 With AFS you can access all the filesystem space under /afs with commands you already use (eg: cd, cp, rm, and so on) provided you have been granted permission (see AFS ACL below).
78
79 ### <a name="1.04  What is an AFS cell?"></a> 1.04 What is an AFS cell?
80
81 An AFS cell is a collection of servers grouped together administratively and presenting a single, cohesive filesystem. Typically, an AFS cell is a set of hosts that use the same Internet domain name.
82
83 Normally, a variation of the domain name is used as the AFS cell name.
84
85 Users log into AFS client workstations which request information and files from the cell's servers on behalf of the users.
86
87 ### <a name="1.05  What are the benefits of u"></a> 1.05 What are the benefits of using AFS?
88
89 The main strengths of AFS are its:
90
91 - caching facility
92 - security features
93 - simplicity of addressing
94 - scalability
95 - communications protocol
96
97 Here are some of the advantages of using AFS in more detail:
98
99 #### <a name="1.05.a  Cache Manager"></a> 1.05.a Cache Manager
100
101 AFS client machines run a Cache Manager process. The Cache Manager maintains information about the identities of the users logged into the machine, finds and requests data on their behalf, and keeps chunks of retrieved files on local disk.
102
103 The effect of this is that as soon as a remote file is accessed a chunk of that file gets copied to local disk and so subsequent accesses (warm reads) are almost as fast as to local disk and considerably faster than a cold read (across the network).
104
105 Local caching also significantly reduces the amount of network traffic, improving performance when a cold read is necessary.
106
107 #### <a name="1.05.b  Location independence"></a> 1.05.b Location independence
108
109 Unlike NFS, which makes use of /etc/filesystems (on a client) to map (mount) between a local directory name and a remote filesystem, AFS does its mapping (filename to location) at the server. This has the tremendous advantage of making the served filespace location independent.
110
111 Location independence means that a user does not need to know which fileserver holds the file, the user only needs to know the pathname of a file. Of course, the user does need to know the name of the AFS cell to which the file belongs. Use of the AFS cellname as the second part of the pathname (eg: /afs/$AFSCELL/somefile) is helpful to distinguish between file namespaces of the local and non-local AFS cells.
112
113 To understand why such location independence is useful, consider having 20 clients and two servers. Let's say you had to move a filesystem "/home" from server a to server b.
114
115 Using NFS, you would have to change the /etc/filesystems file on 20 clients and take "/home" off-line while you moved it between servers.
116
117 With AFS, you simply move the AFS volume(s) which constitute "/home" between the servers. You do this "on-line" while users are actively using files in "/home" with no disruption to their work.
118
119 (Actually, the AFS equivalent of "/home" would be /afs/$AFSCELL/home where $AFSCELL is the AFS cellname.)
120
121 #### <a name="1.05.c  Scalability"></a> 1.05.c Scalability
122
123 With location independence comes scalability. An architectural goal of the AFS designers was client/server ratios of 200:1 which has been successfully exceeded at some sites. Some sites are exceeding this ratio. Exactly what ratio your cell can use depends on many factors including: number of AFS files, size of AFS files, rate at which changes are made, rate at which file are being accessed, speed of servers processor, I/O rates, and network bandwidth.
124
125 AFS cells can range from the small (1 server/client) to the massive (with tens of servers and thousands of clients). Cells can be dynamic: it is simple to add new fileservers or clients and grow the computing resources to meet new user requirements.
126
127 #### <a name="1.05.d  Improved security"></a> 1.05.d Improved security
128
129 Firstly, AFS makes use of Kerberos to authenticate users. This improves security for several reasons:
130
131 - passwords do not pass across the network in plaintext
132
133 - encrypted passwords no longer need to be visible
134   - You don't have to use NIS, aka yellow pages, to distribute /etc/passwd - thus "ypcat passwd" can be eliminated.
135   - If you do choose to use NIS, you can replace the password field with "X" so the encrypted password is not visible. (These issues are discussed in detail in [[[AdminGuide|Main/FurtherReading#AdminGuide]]]).
136
137 - AFS uses mutual authentication - both the service provider and service requester prove their identities
138
139 Secondly, AFS uses access control lists (ACLs) to enable users to restrict access to their own directories.
140
141 #### <a name="1.05.e  Single systems image (SS"></a> 1.05.e Single systems image (SSI)
142
143 Establishing the same view of filestore from each client and server in a network of systems (that comprise an AFS cell) is an order of magnitude simpler with AFS than it is with, say, NFS.
144
145 This is useful to do because it enables users to move from workstation to workstation and still have the same view of filestore. It also simplifies part of the systems management workload.
146
147 In addition, because AFS works well over wide area networks the SSI is also accessible remotely.
148
149 As an example, consider a company with two widespread divisions (and two AFS cells): ny.acme.com and sf.acme.com. Mr Fudd, based in the New York office, is visiting the San Francisco office.
150
151 Mr. Fudd can then use any AFS client workstation in the San Francisco office that he can log into (a unprivileged guest account would suffice). He could authenticate himself to the ny.acme.com cell and securely access his New York filespace.
152
153 For example:
154
155 The following shows a guest in the sf.acme.com AFS cell:
156
157 1. add AFS executables directory to PATH
158 2. obtaining a PAG with pagsh command (see 2.06)
159 3. use the klog command to authenticate into the ny.acme.com AFS cell
160 4. making a HOME away from home
161 5. invoking a homely .profile
162
163            guest@toontown.sf.acme.com $ PATH=/usr/afsws/bin:$PATH       # {1}
164            guest@toontown.sf.acme.com $ pagsh                           # {2}
165            $ klog -cell ny.acme.com -principal elmer                    # {3}
166            Password:
167            $ HOME=/afs/ny.acme.com/user/elmer; export HOME              # {4}
168            $ cd
169            $ .  .profile                                                # {5}
170            you have new mail
171            guest@toontown $
172
173 It is not necessary for the San Francisco sys admin to give Mr. Fudd an AFS account in the sf.acme.com cell. Mr. Fudd only needs to be able to log into an AFS client that is:
174
175 1. on the same network as his cell and
176 2. his ny.acme.com cell is mounted in the sf.acme.com cell (as would certainly be the case in a company with two cells).
177
178 #### <a name="1.05.f  Replicated AFS volumes"></a> 1.05.f Replicated AFS volumes
179
180 AFS files are stored in structures called Volumes. These volumes reside on the disks of the AFS file server machines. Volumes containing frequently accessed data can be read-only replicated on several servers.
181
182 Cache managers (on users client workstations) will make use of replicate volumes to load balance. If accessing data from one replicate copy, and that copy becomes unavailable due to server or network problems, AFS will automatically start accessing the same data from a different replicate copy.
183
184 An AFS client workstation will access the closest volume copy. By placing replicate volumes on servers closer to clients (eg on same physical LAN) access to those resources is improved and network traffic reduced.
185
186 #### <a name="1.05.g  Improved robustness to s"></a> 1.05.g Improved robustness to server crash
187
188 The Cache Manager maintains local copies of remotely accessed files. This is accomplished in the cache by breaking files into chunks of up to 64k (default chunk size). So, for a large file, there may be several chunks in the cache but a small file will occupy a single chunk (which will be only as big as is needed).
189
190 A "working set" of files that have been accessed on the client is established locally in the client's cache (copied from fileserver(s)).
191
192 If a fileserver crashes, the client's locally cached file copies remain readable but updates to cached files fail while the server is down.
193
194 Also, if the AFS configuration has included replicated read-only volumes then alternate fileservers can satisfy requests for files from those volumes.
195
196 #### <a name="1.05.h  &quot;Easy to use&quot; networking"></a> 1.05.h "Easy to use" networking
197
198 Accessing remote file resources via the network becomes much simpler when using AFS. Users have much less to worry about: want to move a file from a remote site? Just copy it to a different part of /afs.
199
200 Once you have wide-area AFS in place, you don't have to keep local copies of files. Let AFS fetch and cache those files when you need them.
201
202 #### <a name="1.05.i  Communications protocol"></a> 1.05.i Communications protocol
203
204 AFS communications protocol is optimized for Wide Area Networks. Retransmitting only the single bad packet in a batch of packets and allowing the number of unacknowledged packets to be higher (than in other protocols, see [[[Johnson90|Main/FurtherReading#Johnson90]]]).
205
206 #### <a name="1.05.j  Improved system manageme"></a> 1.05.j Improved system management capability
207
208 Systems administrators are able to make configuration changes from any client in the AFS cell (it is not necessary to login to a fileserver).
209
210 With AFS it is simple to effect changes without having to take systems off-line.
211
212 Example:
213
214 A department (with its own AFS cell) was relocated to another office. The cell had several fileservers and many clients. How could they move their systems without causing disruption?
215
216 First, the network infrastructure was established to the new location. The AFS volumes on one fileserver were migrated to the other fileservers. The "freed up" fileserver was moved to the new office and connected to the network.
217
218 A second fileserver was "freed up" by moving its AFS volumes across the network to the first fileserver at the new office. The second fileserver was then moved.
219
220 This process was repeated until all the fileservers were moved.
221
222 All this happened with users on client workstations continuing to use the cell's filespace. Unless a user saw a fileserver being physically moved (s)he would have no way to tell the change had taken place.
223
224 Finally, the AFS clients were moved - this was noticed!
225
226 ### <a name="1.06  Which systems is AFS avail"></a> 1.06 Which systems is AFS available for?
227
228 [[OpenAFS]] (as of the 1.4.2 release) is currently available in binary releases for: IBM AIX 5.1, 5.2, 5.3 Fedora Core 3, 4, 5 (Intel) [[FreeBSD]] 6.1 (Intel) HP/UX 11i (PA-RISC) SGI Irix 6.5 [[MacOS]] X 10.4 Tiger (Universal) [[OpenBSD]] 3.9 (Intel) RHEL 3, 4 (Intel) RHEL 4 (AMD64) Solaris 7, 8, 9, 10 (Sparc) Solaris 8, 9, 10 (Intel) Windows 2000/XP/2003
229
230 The sources are also known to create working binaries for [[NetBSD]] 2.\* and 3.0 (server only).
231
232 Additional platforms may be available in the beta (1.5) tree.
233
234 Arla (as of the 0.43 release) is currently supporting: [[FreeBSD]] 5.1-5.5 [[NetBSD]] 2.\*, 3.0 Linux 2.4.x and 2.6.x [[MacOSX]] 10.4
235
236 Please see the Arla web pages for more details, and remember that Arla is client only.
237
238 ### <a name="1.07  What does &quot;ls /afs&quot; displa"></a> 1.07 What does "ls /afs" display in the Internet AFS filetree?
239
240 Essentially this displays the AFS cells that co-operate in the Internet AFS filetree.
241
242 Note that the output of this will depend on the cell you do it from; a given cell may not have all the publicly advertised cells available, and it may have some cells that aren't advertised outside of the given site.
243
244 The definitive source for this information is:
245
246 - <file:///afs/grand.central.org/service/CellServDB>
247
248 Note that it is also possible to use AFS "behind the firewall" within the confines of your organization's network - you don't have to participate in the Internet AFS filetree.
249
250 Indeed, there are lots of benefits of using AFS on a local area network without using the WAN capabilities.
251
252 ### <a name="1.08  Why does AFS use Kerberos"></a><a name="1.08  Why does AFS use Kerberos "></a> 1.08 Why does AFS use Kerberos authentication?
253
254 It improves security.
255
256 Kerberos uses the idea of a trusted third party to prove identification. This is a bit like using a letter of introduction or quoting a referee who will vouch for you.
257
258 When a user authenticates using the klog command (s)he is prompted for a password. If the password is accepted the Kerberos server provides the user with an encrypted token (containing a "ticket granting ticket").
259
260 From that point on, it is the encrypted token that is used to prove the user's identity. These tokens have a limited lifetime (typically a day) and are useless when expired.
261
262 In AFS, it is possible to authenticate into multiple AFS cells. A summary of the current set of tokens held can be displayed by using the "tokens" command.
263
264 For example:
265
266        elmer@toontown $ tokens
267
268        Tokens held by the Cache Manager:
269
270        User's (AFS ID 9997) tokens for afs@ny.acme.com [Expires Sep 15 06:50]
271        User's (AFS ID 5391) tokens for afs@sf.acme.com [Expires Sep 15 06:48]
272           --End of list--
273
274 Kerberos improves security because a users's password need only be entered once (at klog time).
275
276 AFS uses Kerberos to do complex mutual authentication which means that both the service requester and the service provider have to prove their identities before a service is granted.
277
278 Originally AFS shipped with it's own version of a Kerberos, called "KAS." KAS still ships at this time (1.4.2 release) but is depricated in favor of using a true Kerberos 5 implimentation. [[OpenAFS]] does not currently ship with a K5 install; it is up to the administrator(s) to choose a version (either MIT's or KTH's "Heimdal") and install it. [[OpenAFS]] will happily work with either.
279
280 For more detail on this and other Kerberos issues see the faq for Kerberos (posted to news.answers and comp.protocols.kerberos) [[[Jaspan|Main/FurtherReading#Jaspan]]]. (Also, see [[[Miller87|Main/FurtherReading#Miller87]]], [[[Bryant88|Main/FurtherReading#Bryant88]]], [[[Bellovin90|Main/FurtherReading#Bellovin90]]], [[[Steiner88|Main/FurtherReading#Steiner88]]])
281
282 ### <a name="1.09  Does AFS work over protoco"></a> 1.09 Does AFS work over protocols other than TCP/IP?
283
284 No. AFS was designed to work over TCP/IP.
285
286 ### <a name="1.10  How can I access AFS from"></a><a name="1.10  How can I access AFS from "></a> 1.10 How can I access AFS from my PC?
287
288 You can use [[OpenAFS]] for Windows client. In the past year it has become very stable and robust. [[OAfW]] works with Kerberos for Windows in much the same way the Unix clients work with Kerberos.
289
290 There is also SAMBA (a SMB server for UNIX).
291
292 - <http://www.samba.org>
293
294 There are several ways to integrate AFS with SAMBA. See [[SMBtoAFS]].
295
296 MAC OS X and Linux users might find <a href="http://en.wikipedia.org/wiki/SSHFS">SSHFS</a> useful in some circumstances.
297
298 ### <a name="1.11  How does AFS compare with"></a><a name="1.11  How does AFS compare with "></a> 1.11 How does AFS compare with NFS?
299
300 <table border="1" cellpadding="0" cellspacing="0">
301   <tr>
302     <td>   </td>
303     <th align="center" bgcolor="#99CCCC"><strong> AFS </strong></th>
304     <th align="center" bgcolor="#99CCCC"><strong> NFS </strong></th>
305   </tr>
306   <tr>
307     <th bgcolor="#99CCCC"><strong> File Access </strong></th>
308     <td> Common name space from all workstations </td>
309     <td> Different file names from different workstations </td>
310   </tr>
311   <tr>
312     <th bgcolor="#99CCCC"><strong> File Location Tracking </strong></th>
313     <td> Automatic tracking by file system processes and databases </td>
314     <td> Mountpoints to files set by administrators and users </td>
315   </tr>
316   <tr>
317     <th bgcolor="#99CCCC"><strong> Performance </strong></th>
318     <td> Client caching to reduce network load; callbacks to maintain cache consistency </td>
319     <td> No local disk caching; limited cache consistency </td>
320   </tr>
321   <tr>
322     <th bgcolor="#99CCCC"><strong> Andrew Benchmark (5 phases, 8 clients) </strong></th>
323     <td> Average time of 210 seconds/client </td>
324     <td> Average time of 280 seconds/client </td>
325   </tr>
326   <tr>
327     <th bgcolor="#99CCCC"><strong> Scaling capabilities </strong></th>
328     <td> Maintains performance in small and very large installations </td>
329     <td> Best in small to mid-size installations </td>
330   </tr>
331   <tr>
332     <td>   </td>
333     <td> Excellent performance on wide-area configuration </td>
334     <td> Best in local-area configurations </td>
335   </tr>
336   <tr>
337     <th bgcolor="#99CCCC"><strong> Security </strong></th>
338     <td> Kerberos mutual authentication </td>
339     <td> Security based on unencrypted user ID's </td>
340   </tr>
341   <tr>
342     <td>   </td>
343     <td> Access control lists on directories for user and group access </td>
344     <td> No access control lists </td>
345   </tr>
346   <tr>
347     <th bgcolor="#99CCCC"><strong> Availability </strong></th>
348     <td> Replicates read-mostly data and AFS system information </td>
349     <td> No replication </td>
350   </tr>
351   <tr>
352     <th bgcolor="#99CCCC"><strong> Backup Operation </strong></th>
353     <td> No system downtime with specially developed AFS Backup System </td>
354     <td> Standard UNIX backup system </td>
355   </tr>
356   <tr>
357     <th bgcolor="#99CCCC"><strong> Reconfiguration </strong></th>
358     <td> By volumes (groups of files) </td>
359     <td> Per-file movement </td>
360   </tr>
361   <tr>
362     <td>   </td>
363     <td> No user impact; files remain accessible during moves, and file names do not change </td>
364     <td> Users lose access to files and filenames change (mountpoints need to be reset) </td>
365   </tr>
366   <tr>
367     <th bgcolor="#99CCCC"><strong> System Management </strong></th>
368     <td> Most tasks performed from any workstation </td>
369     <td> Frequently involves telnet to other workstations </td>
370   </tr>
371   <tr>
372     <th bgcolor="#99CCCC"><strong> Autonomous Architecture </strong></th>
373     <td> Autonomous administrative units called cells, in addition to file servers and clients </td>
374     <td> File servers and clients </td>
375   </tr>
376   <tr>
377     <td>   </td>
378     <td> No trust required between cells </td>
379     <td> No security distinctions between sites </td>
380   </tr>
381   <tr>
382     <td>
383     </td>
384     <td colspan="2"> [ source: <a href="ftp://ftp.transarc.com/pub/afsps/doc/afs-nfs.comparison" target="_top">ftp://ftp.transarc.com/pub/afsps/doc/afs-nfs.comparison</a> ] </td>
385   </tr>
386 </table>
387
388 Other points:
389
390 - Some vendors offer more secure versions of NFS but implementations vary. Many NFS ports have no extra security features (such as Kerberos).
391
392 - The AFS Cache Manager can be configured to work with a RAM (memory) based cache. This offers signifigant performance benefits over a disk based cache. NFS has no such feature. Imagine how much faster it is to access files cached into RAM!
393
394 - The Andrew benchmark demonstrates that AFS has better performance than NFS as the number of clients increases. A graph of this (taken from Andrew benchmark report) is available in:
395   - ![20050131\_graph\_afs\_nfs.jpg](http://i.imgur.com/Ir6YS.jpg)
396