NAME
exportfs, srvfs – network file server plumbing |
SYNOPSIS
exportfs [ options ]
srvfs [ –dR ] [ –p perm ] [ –P patternfile ] [ –e exportprog ] name
path |
DESCRIPTION
Exportfs is a user level file server that allows Plan 9 compute
servers, rather than file servers, to export portions of a name
space across networks. The service is started either by the cpu(1)
command or by a network listener process. An initial protocol
establishes a root directory for the exported name space. The
connection to exportfs is then mounted, typically on /mnt/term.
Exportfs then acts as a relay file server: operations in the imported
file tree are executed on the remote server and the results returned.
This gives the appearance of exporting a name space from a remote
machine into a local file tree.
The options are:
–N nsfile Serve the name space described by nsfile. –n Disallow mounts by user none. –P patternfile
–r root Bypass the initial protocol, serving the name space rooted at root. A corresponding import(4) must use the –m option. –S service Bypass the initial protocol, serving the result of mounting service. A separate mount is used for each attach(5) message, to correctly handle servers in which each mount corresponds to a different client (e.g., rio(4)). A corresponding import(4) must use the –m option. –s equivalent to –r /; kept for compatibility. The cpu command uses exportfs to serve device files in the terminal. The import(4) command calls exportfs on a remote machine, permitting users to access arbitrary pieces of name space on other systems. Because the kernel disallows reads and writes on mounted pipes (as might be found in /srv), exportfs calls itself (with appropriate –m and –S options) to simulate reads and writes on such files. Srvfs invokes exportprog (default /bin/exportfs) to create a mountable file system from a name space and posts it at /srv/name, which is created with mode perm (default 0600). The name space is the directory tree rooted at path. The –d, –P, and –R options, if present, are relayed to exportprog. |
EXAMPLES
To export the archive of one user for one month, except for secrets,
|
SOURCE
/sys/src/cmd/exportfs /sys/src/cmd/srvfs.c |
SEE ALSO
dial(2), import(4), aan(8), listen(8) |