PREFIX — User Commands
NAME
prefix − Manipulate the file system prefix table
SYNOPSIS
prefix [−p [−x prefix]]
prefix −M device [-rL] [-f] -l prefix
prefix −[cdU] prefix
prefix −a prefix [−s server]
prefix −x prefix −[hH] host
prefix −x prefix −l localName
OPTIONS
−p(The default.) Print out the prefix table. With −x, print the export list of a prefix.
−x prefixExport a local directory given by −l under the name prefix, or use with −h (−H) to export (not export) the prefix to a particular host.
−M deviceMount the device under the local name given by the −l option. The local name is exported.
−LUse with −M to prevent exporting the prefix.
−rMount read-only. Use with −M.
−U prefixUnmount the file system with the given prefix.
−fForce the installation of the prefix, i.e. don’t do a stat to make sure the link exists.
−l dirNameSpecifies local name. Used with −M (mount) or −x (export).
−h hostAdd host to the export list associated with the prefix given by the −x option. Host can either be the name of the server or its Sprite ID.
−H hostRemove host from the export list associated with the prefix given by the −x option. Host can either be the name of the server or its Sprite ID.
−a prefixAdd prefix to the prefix table. If the −s option is not given a broadcast will be done to find the server.
−s serverSpecify the server for the prefix given by the −a option. Server can either be the name of the server or its Sprite ID. If server is 0 a broadcast will be done to find the server.
−c prefixClear the server binding for prefix, but retain the prefix in the prefix table.
−d prefixDelete prefix from the prefix table altogether.
DESCRIPTION
Prefix tables are cached mappings from file name prefixes to the servers that keep files under that prefix. Under normal operation the prefix table is updated automatically as a side-effect of pathname lookup. The prefix command is used to display the file system’s prefix table, and to manipulate its individual entries. If no options are given, prefix prints out the contents of the prefix table (just as if the −p switch had been given). If options are given, then they control what happens, as described above.
PREFIXES AND SPRITE
The presense of a prefix is indicated by remote links in the file system. A remote link is a circular symbolic link with a special type. They are created via the "ln -r" command. When a server encounters a remote link during lookup, it returns the prefix indicated by the remote link to the client that initiated the lookup. The client loads the prefix (if it isn’t already loaded), broadcasts for the server of the prefix (if it doesn’t already know who that is), and then sends the lookup operation to the new server. Thus the root server is bypassed after prefixes are loaded. Prefixes can be nested arbitrarily; remote links can occur in any directory.
Servers mount local disks under a prefix that gets exported to other Sprite hosts using the -M option. Servers can control what hosts have access to a prefix by adding entries to an export list using the -h option. If the export list is empty the prefix is exported to all hosts, so adding one exportee effectivly prevents access to all other hosts.
KEYWORDS
prefix table, mount
Sprite version 1.0 — March 25, 1992