Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
andrewfilesystem:server [2011/05/25 05:29] – BenKadukandrewfilesystem:server [2020/11/23 01:21] (current) – Remove 1 broken link. SashaVigole
Line 1: Line 1:
 ====== AFS: Andrew File System, server side ====== ====== AFS: Andrew File System, server side ======
  
-Based upon Tracy's [[http://www.public.iastate.edu/~kula/talks/afs-bpw-2005/afs-bpw-2005-iowa.html|talk]] at the AFS Workshop, 2005.+Based upon Tracy's talk at the AFS Workshop, 2005.
 Heavily modified for %%OpenAFS%% coverage by [[/BenKaduk|BenKaduk]] in 2011. Heavily modified for %%OpenAFS%% coverage by [[/BenKaduk|BenKaduk]] in 2011.
  
Line 25: Line 25:
 </code> </code>
  
-It is also most convenient to have a afs client running on the initial server. Check out the installation instructions on the [[/afs|afs page]].+It is also most convenient to have a afs client running on the initial server. Check out the installation instructions on the [[/AndrewFileSystem|afs page]].
  
 ===== Partitions ===== ===== Partitions =====
  
-There are a few things to keep in mind when assigning storage locations for AFS fileservers: first, the mountpoints should be named /vicepa, /vicepb and so on. (This is a long tradition that is essentially hardcoded in.)  The next is that there are two backends that may be used for the storage area of the fileserver: inode and namei.  The namei backend uses ordinary files with particular names to store the fileserver data (which should not be accessed other than by an AFS client), whereas the older inode backend performs interesting manipulations with the inodes on dis.  As such, it is important to never let a filesystem check tool look at those partitions; non-AFS implementations of fsck or alike have no clue on what AFS is doing to files while adding blocks to store ACL information, and AFS has it's own tool to do low level file system maintenance.+There are a few things to keep in mind when assigning storage locations for AFS fileservers: first, the mountpoints should be named /vicepa, /vicepb and so on. (This is a long tradition that is essentially hardcoded in.)  Long ago, one could use a fileserver with the "inode" backend, that manually stored information in inodes on disk that would get trashed by a normal fsck.  Any modern %%OpenAFS%% server should be using the namei backend, which just stores information in files on disk, and requires only ~POSIX functionality.
 An example setup of the fstab would look like this, with a second harddisk (ada1) reserved for AFS: An example setup of the fstab would look like this, with a second harddisk (ada1) reserved for AFS:
  
Line 43: Line 43:
  
 <code> <code>
-#>cd /usr/ports/net +#>cd /usr/ports/net/openafs
-#>fetch http://web.mit.edu/freebsd/openafs/openafs.shar +
-#>sh openafs.shar +
-#>cd openafs+
 #>make install #>make install
-#>echo 'afsserver="YES"' >> /etc/rc.conf+#>echo 'afsserver_enable="YES"' >> /etc/rc.conf
 </code> </code>
  
-Unlike the client, the idea of default configuration values for the AFS server does not make sense, so they are not provided.+Unlike the client, the idea of default configuration values for the AFS server does not make sense, so they are not provided.  The fileserver's man page lists the various configuration knobs.  Note that the -L ("large") and similar options were designed several iterations of Moore's law ago: don't use them.
  
 ===== OpenAFS configuration ===== ===== OpenAFS configuration =====
Line 58: Line 55:
  
 <code> <code>
 +#>mkdir -p /usr/local/etc/openafs/server
 #>kadmin -l #>kadmin -l
 kadmin> add --random-key afs/meiland.nl kadmin> add --random-key afs/meiland.nl
-kadmin> ext_keytab -k /tmp/afsv5key afs/meiland.nl +kadmin> ext_keytab -k /usr/local/etc/openafs/server/rxkad.keytab afs/meiland.nl
-#>mkdir -p /usr/afs/etc +
-#>echo "meiland.nl" > /usr/afs/etc/ThisCell +
-#>ktutil copy /tmp/afsv5key AFSKEYFILE:/tmp/KeyFile+
 </code> </code>
  
Line 70: Line 65:
 <code> <code>
 #>echo "meiland.nl" > /usr/local/etc/openafs/server/ThisCell #>echo "meiland.nl" > /usr/local/etc/openafs/server/ThisCell
-#>cp /tmp/KeyFile /usr/local/etc/openafs/server/KeyFile 
 </code> </code>
  
Line 83: Line 77:
  
 <code> <code>
 +#>mkdir /var/openafs
 +#>chmod 700 /var/openafs
 +#>touch /usr/local/etc/openafs/server/KeyFile
 +#>chmod 600 /usr/local/etc/openafs/server/KeyFile
 #>bosserver #>bosserver
-#>bos setcellname server.meiland.nl meiland.nl -localauth 
-#>bos create server.meiland.nl buserver simple /usr/local/libexec/openafs/buserver -localauth 
 #>bos create server.meiland.nl ptserver simple /usr/local/libexec/openafs/ptserver -localauth #>bos create server.meiland.nl ptserver simple /usr/local/libexec/openafs/ptserver -localauth
 #>bos create server.meiland.nl vlserver simple /usr/local/libexec/openafs/vlserver -localauth #>bos create server.meiland.nl vlserver simple /usr/local/libexec/openafs/vlserver -localauth
Line 105: Line 101:
 <code> <code>
 #> bos shutdown server.meiland.nl #> bos shutdown server.meiland.nl
-#> killall bosserver +#> pkill bosserver 
-#> bosserver+#> service afsserver start
 #> kinit hugo/afs #> kinit hugo/afs
 #> aklog meiland.nl #> aklog meiland.nl
 #> tokens #> tokens
 #> bos status -server server.meiland.nl #> bos status -server server.meiland.nl
-Instance buserver, currently running normally. 
 Instance ptserver, currently running normally. Instance ptserver, currently running normally.
 Instance vlserver, currently running normally. Instance vlserver, currently running normally.
Line 119: Line 114:
  
 <code> <code>
-#> bos create server.meiland.nl fs fs /usr/local/libexec/openafs/fileserver /usr/local/libexec/openafs/volserver /usr/local/libexec/openafs/salvager -cell meiland.nl -localauth+#> bos create server.meiland.nl dafs dafs /usr/local/libexec/openafs/dafileserver /usr/local/libexec/openafs/davolserver /usr/local/libexec/openafs/salvageserver /usr/local/libexec/openafs/dasalvager -cell meiland.nl -localauth
 #> vos create server.meiland.nl /vicepa root.afs -localauth #> vos create server.meiland.nl /vicepa root.afs -localauth
 #> vos create server.meiland.nl /vicepa root.cell -localauth #> vos create server.meiland.nl /vicepa root.cell -localauth
-#> fs setacl /afs system:administrators rlidwka 
-#> fs setacl /afs system:anyuser rl 
-#> fs mkmount /afs/meiland.nl root.cell 
 #> fs setacl /afs/meiland.nl system:administrators rlidwka #> fs setacl /afs/meiland.nl system:administrators rlidwka
 #> fs setacl /afs/meiland.nl system:anyuser rl #> fs setacl /afs/meiland.nl system:anyuser rl
-#> fs mkmount /afs/.meiland.nl root.cell -rw +#> cd /afs/meiland.nl 
-#> fs setacl /afs/.meiland.nl system:administrators rlidwka +#> fs mkmount root.afs root.afs 
-#> fs setacl /afs/.meiland.nl system:anyuser rl+#> cd root.afs 
 +#> fs setacl . system:administrators all 
 +#> fs setacl . system:anyuser rl 
 +#> fs mkmount meiland.nl root.cell 
 +#> fs mkmount .meiland.nl root.cell -rw
  
 mount external cells: mount external cells:
-#> fs mkmount -dir /afs/athena.mit.edu -cell athena.mit.edu -vol root.cell+#> fs mkmount -dir athena.mit.edu -cell athena.mit.edu -vol root.cell 
 + 
 +remove temporary mountpoint: 
 +#> cd .. 
 +#> fs rmmount root.afs
  
 </code> </code>
  • andrewfilesystem/server.1306301355.txt.gz
  • Last modified: 2011/05/25 05:29
  • by BenKaduk