GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing docs.kernel.org — v9fs: Plan 9 Resource Sharing for Linux — The Linux Kernel documentation v9fs: Plan 9 Resource Sharing for Linux¶About¶v9fs is a Unix implementation of the Plan 9 9p remote filesystem protocol. This software was originally developed by Ron Minnich <rminnich@sandia.gov> and Maya Gokhale. Additional development by Greg Watson <gwatson@lanl.gov> and most recently Eric Van Hensbergen <ericvh@gmail.com>, Latchesar Ionkov <lucho@ionkov.net> and Russ Cox <rsc@swtch.com>. The best detailed explanation of the Linux implementation and applications of the 9p client is available in the form of a USENIX paper: Other applications are described in the following papers:
Usage¶For remote file server: mount -t 9p 10.10.1.2 /mnt/9 For Plan 9 From User Space applications (https://9fans.github.io/plan9port/): mount -t 9p `namespace`/acme /mnt/9 -o trans=unix,uname=$USER For server running on QEMU host with virtio transport: mount -t 9p -o trans=virtio <mount_tag> /mnt/9 where mount_tag is the tag generated by the server to each of the exported mount points. Each 9P export is seen by the client as a virtio device with an associated “mount_tag” property. Available mount tags can be seen by reading /sys/bus/virtio/drivers/9pnet_virtio/virtio<n>/mount_tag files. For server accessible over vsock (VM sockets): mount -t 9p -o trans=vsock[,port=<port>] <CID> /mnt/9 where CID is the vsock Context ID of the remote endpoint (2 for host from a guest VM, 3+ for guest VMs from the host). The port to connect to can be specified with the port option (default: 564). USBG Usage¶To mount a 9p FS on a USB Host accessible via the gadget at runtime: mount -t 9p -o trans=usbg,aname=/path/to/fs <device> /mnt/9 To mount a 9p FS on a USB Host accessible via the gadget as root filesystem: root=<device> rootfstype=9p rootflags=trans=usbg,cache=loose,uname=root,access=0,dfltuid=0,dfltgid=0,aname=/path/to/rootfs where <device> is the tag associated by the usb gadget transport. It is defined by the configfs instance name. USBG Example¶The USB host exports a filesystem, while the gadget on the USB device side makes it mountable. Diod (9pfs server) and the forwarder are on the development host, where the root filesystem is actually stored. The gadget is initialized during boot (or later) on the embedded board. Then the forwarder will find it on the USB bus and start forwarding requests. In this case the 9p requests come from the device and are handled by the host. The reason is that USB device ports are normally not available on PCs, so a connection in the other direction would not work. When using the usbg transport, for now there is no native usb host service capable to handle the requests from the gadget driver. For this we have to use the extra python tool p9_fwd.py from tools/usb. Just start the 9pfs capable network server like diod/nfs-ganesha e.g.: $ diod -f -n -d 0 -S -l 0.0.0.0:9999 -e $PWD Optionally scan your bus if there are more then one usbg gadgets to find their path: $ python $kernel_dir/tools/usb/p9_fwd.py list Bus | Addr | Manufacturer | Product | ID | Path --- | ---- | ---------------- | ---------------- | --------- | ---- 2 | 67 | unknown | unknown | 1d6b:0109 | 2-1.1.2 2 | 68 | unknown | unknown | 1d6b:0109 | 2-1.1.3 Then start the python transport: $ python $kernel_dir/tools/usb/p9_fwd.py --path 2-1.1.2 connect -p 9999 After that the gadget driver can be used as described above. One use-case is to use it as an alternative to NFS root booting during the development of embedded Linux devices. Options¶
Behavior¶This section aims at describing 9p ‘quirks’ that can be different from a local filesystem behaviors.
Resources¶Protocol specifications are maintained on github: http://ericvh.github.com/9p-rfc/ 9p client and server implementations are listed on http://9p.cat-v.org/implementations A 9p2000.L server is being developed by LLNL and can be found at http://code.google.com/p/diod/ There are user and developer mailing lists available through the v9fs project on sourceforge (http://sourceforge.net/projects/v9fs). News and other information is maintained on a Wiki. (http://sf.net/apps/mediawiki/v9fs/index.php). Bug reports are best issued via the mailing list. For more information on the Plan 9 Operating System check out http://plan9.bell-labs.com/plan9 For information on Plan 9 from User Space (Plan 9 applications and libraries ported to Linux/BSD/OSX/etc) check out https://9fans.github.io/plan9port/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |