how tux met glenda
Wednesday, June 21, 2006 8:53:34 PM
Obviously I want to access the machine from other machines on the network - and since Linux supports the 9p filesystem in the main-line kernel since 2.6.14, it was extremely easy to set up.
The first step is to set up the Plan 9 machine to allow a connection to its filesystem - the easiest way of doing so is to tell the fossil filesystem itself to listen to incoming connections:
term% con /srv/fscons prompt: listen -N tcp!*!564 prompt: listen -N il!*!17008 prompt:
The right-most argument to listen is in the form net!host!service: basically we told fossil to listen on port 564 to any host, speaking the tcp protocol, and on port 17008 speaking the il protocol. The -N option tells the filesystem that an un-authenticated user may connect at any time (else he would be only allowed to connect from a certain machine after an authenticated user has connected) - keep in mind that you should use this only in secure environments - obviously you can be more restrictive with the IP address allowed to connect, and remove the -N flag to require authentication. That's about everything we need to do on the Plan 9 machine.
Next we switch back to the Linux system. Make sure you are running with support for 9p - enable CONFIG_9P_FS=m in the kernel .config file. (Note: the former 9p2000 module goes now under the name of 9p). You will also need the plan9port tools installed.
Start the factotum and the network file service:
$ factotum $ srv plan_9_machine_ip
and then mount the Plan 9 machine:
$ sudo mount -t 9p -o proto=tcp plan_9_machine_ip /mnt/9/
That's all. Enjoy!