Plan 9 Network at Home

Here is a summary of the nature, structure and hardware used to build my home Plan 9 network, running the Fourth Edition of Plan 9. The Plan 9 network at work is similar in structure although the hardware details differ.

Network

Two Netgear 5-port 1G/bit switches and a Netgear 16-port 100m/bit switch provide the underlying network, with an 11m/bit wireless network (through a Belkin bridge) for portable devices. All machines effortlessly and simply share a single file store on the netowrk, provided by the single file server dispensa; most machines either haven't got discs or don't use them for ordinary file storage. The system is connected through a NAT box to the Internet by cable modem in an ntl: set top box (it has got an RJ45 ethernet connection and simply uses DHCP to set addresses). The CPU server receives incoming SMTP calls (in the usual Plan 9 way, via aux/listen).

Having a single file store with just one copy of the system software simplifies maintenance, reduces copying, and keeps the clients simple, cheap, and quiet(er). I simply plug in a new machine, make an entry in /lib/ndb/local, and boot. Discless PCs load the boot program 9load from diskette, then load the kernel from the cpu server over the ether. The notebook machines use a file system on local disc when running detached, but connect to the shared file system when connected to home or work networks, though still allowing access to their local disc. They use DHCP to select the correct Internet address for the network to which they are connected (eg, home or work).

File store

A Plan 9 file server provides the primary shared file storage over the 1000/100m/bit network to both terminals and CPU servers. The machine runs a specially-configured cpu kernel that does nothing but serve files over the network and run the authentication services. Plan 9 provides an automated backup system known as the dump file system. This previously was done by a special kernel; now it is done by a combination of a block archiving service (venti), and a file archiving service (fossil) that stores its data in venti. The entire file store is kept on banks of cheap discs, perhaps arranged in a RAID configuration, and its copy-on-write characteristic is turned to advantage: at 5am each morning the file server automatically saves the a pointer to the root of the existing hierarchy, and creates a new root pointer for further updates, which are made copy-on-write (including directory updates). The file server exports a dump directory, typically mounted on /n/dump, containing names of the form yyyy/mmdd, each providing a snapshot of the entire file store on the given date. Amongst other things, this allows running commands such as

diff -r /n/dump/2002/0101/sys/src /sys/src
to see what has changed in the sources since the start of the year, or yesterday(1):
yesterday -d .
to see whether a change I made in the current directory yesterday might explain a bug today. Using Plan 9's bind primitive, parts of the dump can be bound over parts of the current hierarchy (eg, for regression testing). Archival snapshots are typically made once per day, but intermediate snapshots can be made much more often (I do them hourly). The difference is that archival snapshots are written to venti in immutable storage; intermediate snapshots and updates between them are made in a rewritable area on disc.

This is a cheap way to get the automatic source and object file control and auditing provided by the dump file system.

Machines

The machines on the network are listed below. I assemble the desktop/tower PCs myself from components; as they become smaller and more integrated it gets easier and easier. (I let IBM build the Thinkpads.)

All machines use 1000m/bit or 100m/bit wired ether links or 11 m/bit wireless. I once listed the ether cards, but I have since lost track of which machines have got which card. Some are Realtek-based, some are Netgears with varying chips on board; the Thinkpad is Intel 82557.

The servers and network components are on a cheap Belkin UPS.

Monitors are attached only to the terminals. I currently use iiyama ProLite E435S on one and Viewsonic VE710S on another; both 17" 1280x1024. The Thinkpad T23 has 1400x1050. I use USB audio. I can choose to run an MP3 player on my terminal, sending the decompressed data across the network, or use the cpu command to run the decoding software on the CPU server, saving a trip across the net.


charles.forsyth@gmail.com
6 April 2008