Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ (4) — Plan9 1st Edition

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

bind(1)

srv(4)

ip(3)

U9FS(4)

NAME

u9fs − serve 9P from Unix

SYNOPSIS

­u9fs [ ­directory ]

DESCRIPTION

­U9fs is ­not a Plan 9 program.  Instead it is a program that serves Unix files to Plan 9 machines using the 9P protocol (see intro(5)). It is to be invoked on a Unix machine by ­inetd with its standard input, output, and error connected to a network connection, typically TCP on an Ethernet.  It runs as user ­root and multiplexes access to multiple Plan 9 clients over the single wire by simulating Unix permissions itself. 

If a ­directory is specified ­u9fs first does a Unix ­chroot system call to that directory. 

Plan 9 calls this service ­9fs with TCP service number 17008 on the Ethernet.  Set up this way on a machine called, say, kremvax, ­u9fs may be connected to the name space of a Plan 9 process by

9fs kremvax

Due to a bug in some versions of the IP software, some systems will not accept the service name 9fs, thinking it a service number because of the initial digit.  If so, run the service as ­u9fs or ­564 and do the ­srv and ­mount by hand:

srv tcp!kremvax!u9fs
mount -c /srv/tcp!kremvax!u9fs /n/kremvax

For more information on this procedure, see srv(4) and bind(1).

­U9fs serves the entire file system of the Unix machine.  It forbids access to devices because the program is single-threaded and may block unpredictably.  Using the ­attach specifier ­device connects to a file system identical to the usual system except it permits device access (and may block unpredictably):

srv tcp!kremvax!9fs
mount -c /srv/tcp!kremvax!9fs /n/kremvax device

(The ­9fs command does not accept an attach specifier.)  Even so, device access may produce unpredictable results if the block size of the device is greater than 8192, the maximum data size of a 9P message. 

The source to ­u9fs is in the Plan 9 directory /sys/src/cmd/unix/u9fs.  To install ­u9fs on a Unix system, copy the source to a directory on that system.  Edit the ­makefile to set ­LOG to a proper place for a log file and to set compile-time configuration correctly.  Then compile with an ANSI C compiler and install in /usr/etc/u9fs.  Install this line in inetd.conf:

9fs     stream  tcp     nowait  root   /usr/etc/u9fs   u9fs

and this in services:

9fs     564/tcp       9fs  # Plan 9 fs

DIAGNOSTICS

Problems are reported to /tmp/u9fs.log.  A compile-time flag enables chatty debugging. 

SEE ALSO

bind(1), srv(4), ip(3)

BUGS

The implementation of devices is unsatisfactory. 

Plan 9  —  January 03, 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026