Recently Written · git

plan9port-cluster

Shared 9P storage and CPU offload for AI agent swarms, built on plan9port fossil + venti

git clone https://github.com/equwal/plan9port-cluster

Log | Files | Refs


commit ef1e959e6cd33b1621fee67d71dcf7042dc8a687
equwal <13551856+equwal@users.noreply.github.com>
2026-10-04 03:49:50 -0700

Add runit service and kernel 9P mount docs

 service/runit/run                 |  8 ++++++++
 skills/plan9port-cluster/SKILL.md | 16 +++++++++++++++-
 2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/service/runit/run b/service/runit/run
new file mode 100644
index 0000000..54948e3
--- /dev/null
+++ b/service/runit/run
@@ -0,0 +1,8 @@
+#!/bin/sh
+# runit service for p9c-server. Install as /etc/sv/p9c-server/run, replace
+# USER with the account that owns the data, and link the folder into the
+# runit service directory. The script runs in the foreground and exits when
+# venti dies, so runit restarts both venti and fossil.
+exec chpst -u USER:USER env HOME=/home/USER \
+	P9C_FOSSIL=/home/USER/.local/plan9/bin/fossil/fossil \
+	/home/USER/.local/bin/p9c-server 2>&1
diff --git a/skills/plan9port-cluster/SKILL.md b/skills/plan9port-cluster/SKILL.md
index ae913d5..38cedaa 100644
--- a/skills/plan9port-cluster/SKILL.md
+++ b/skills/plan9port-cluster/SKILL.md
@@ -53,7 +53,9 @@ run these lines through `cmd /c "..."`.
 1. Install plan9port. Build fossil with `patches/fossil-remove-uaf.diff`
    (stock fossil crashes when a client removes a file).
 2. Copy `bin/p9c-server` and `bin/p9c` to `~/.local/bin`.
-3. Run `P9C_FOSSIL=/path/to/patched/fossil p9c-server` under a supervisor.
+3. Run `P9C_FOSSIL=/path/to/patched/fossil p9c-server` under a supervisor
+   (runit: `service/runit/run`; replace USER, put it in `/etc/sv/p9c-server`,
+   link it into the service directory).
    The first start formats `~/plan9` (arena size `P9C_ARENAS`, default 4G).
 
 ## Check that it works
@@ -64,6 +66,18 @@ On the node, in a clone of github.com/equwal/plan9port-cluster:
 P9C=~/.local/bin/p9c sh tests/roundtrip.sh   # prints PASS
 ```
 
+## Mount it (Linux, optional)
+
+As root on the node, the kernel 9P client mounts the tree (fossil speaks
+plain 9P2000):
+
+```sh
+modprobe 9p
+mount -t 9p -o trans=tcp,port=5640,version=9p2000,aname=main/active,uname=$USER,access=any 127.0.0.1 /mnt/p9c
+```
+
+A server restart breaks the mount: unmount and mount again.
+
 ## Gotchas
 
 - `p9c create` fails if the file exists; `p9c write` then overwrites it.