u9fs – serve 9P from Unix|
u9fs [ –Dnz ] [ –a authtype ] [ –A autharg ] [ –l logfile ] [ –m msize
] [ –u onlyuser ] fsroot|
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 typically invoked on a Unix machine by inetd with its standard
input and output connected to a network connection, typically
TCP on an Ethernet. It typically runs as user root and
multiplexes access to multiple Plan 9 clients over the single
wire. It assumes Plan 9 uids match Unix login names, and changes
to the corresponding Unix effective uid when processing requests.
Characters in file and directory names unacceptable to Plan 9
are translated into a three–character sequence: \ followed by
two hexadecimal digits. U9fs serves both 9P1 (the 9P protocol
as used by the second and third editions of Plan 9) and 9P2000.
The options are:
–l logfile Specifies the file which should contain debugging output and other messages. The out–of–the–box compile–time default is /tmp/u9fs.log.
–m msize Set msize for 9P2000 (see open(5)).
–u user Treat all attaches as coming from user. This is useful in some cases when running without inetd; see the examples.
If fsroot is specified, u9fs will serve only that tree; othwise,
it will serve the entire Unix file system.
Plan 9 calls 9P file service 9fs with TCP port number 564. Set
up this way on a machine called, say, kremvax, u9fs may be connected
to the name space of a Plan 9 process by|
By default, 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 only permits device access (and may block
The source to u9fs is in the Plan 9 directory /sys/src/cmd/unix/u9fs.
To install u9fs on a Unix system with an ANSI C compiler, copy
the source to a directory on that system and run make. Then install
the binary in /usr/etc/u9fs. Add this line to inetd.conf:
Problems are reported to the log file specified with the –l option
(default /tmp/u9fs.log). The –D flag enables chatty debugging.|
bind(1), execnet(4), srv(4), ip(3), nfsserver(8)|
The implementation of devices is unsatisfactory. |
Semantics like remove–on–close or the atomicity of wstat are hard
to provide exactly.