EXPORTFS(4)
NAME
exportfs, srvfs − network file server plumbing
SYNOPSIS
exportfs [ -a ] [ -s ] [ -F ]
srvfs [ -p perm ] name dir
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 -s option instead instructs exportfs to serve the root. 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 -a option instructs exportfs to authenticate the user, usually because it is being invoked from a remote machine.
The -F option causes exportfs to push the fcall line discipline on its network connection. This option is intended for networks that do not preserve read/write boundaries.
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.
Srvfs uses exportfs to create a mountable file system from a name space: a subsequent mount (see bind(1)) of /srv/name, which is created with mode perm (default 0600), will reproduce the name space rooted at dir. One might use srvfs to enable mounting of an FTP file system (see ftpfs(4)) in several windows, or to publish a /proc (see proc(3)) with a broken process so a remote person may debug the program.
SOURCE
/sys/src/cmd/exportfs
/sys/src/cmd/srvfs.c
Plan 9 — July 29, 2000