Hi!
I'm new to FreeBSD, and I wanted to try it on my home server. When I was building the server, I really liked one bcachefs feature: the pool where hot
data lives on a fast disk (NVMe) and the cold archive sits on a slow HDD.
My previous server ran a bcachefs pool on Debian, and I didn't want to lose it in the migration.
I think it's important to note that both projects below are fully vibe-coded. I'm not a C or Rust developer, but I honestly tried to keep the slop out.
Attempt 1: bcachefs-box - a VM bridge
bcachefs-box (gh)
Inspired by wifibox, but for a filesystem: a bhyve VM running the native linux build of bcachefs, exported to the FreeBSD host. My agent and I compared sshfs, 9p and NFS - NFS won on speed, so that became the bridge.
Real performance feels not native, but enough. In daily use I hit only one real problem: creating symlinks on the pool from the FreeBSD host didn't work, so I had to hack around it by ssh-ing into the guest. I never treated this as the main way to run the pool - more like a fallback with full bcachefs access. But it works, and I'm sure it covers a lot of use cases (for example, I never touched disk partitioning or anything serious like that from the host side).
Also - my host is AMD, and I hit a bhyve bug along the way: Linux guests boot-looped at start (a divide-by-zero in resctrl, PID 1) because bhyve exposes an unmasked AMD QoS CPUID leaf that Intel masks. Filed as bug with a mask patch.
Attempt 2 (the one I actually use): a FUSE daemon port
bcachefs-freebsd (gh)
A port of the bcachefs tools/daemon to FreeBSD, serving the pool directly through fusefs - no VM, no NFS. This is what my pool runs on now, and symlinks work fine from the host here.
Starting the daemon is not exactly simple yet (hopefully - yet):
The pool has been running for a couple of weeks under p2p traffic and streaming workloads, and it has survived one sudden power loss with zero data loss - the journal replay did its job.
So what is this? Honestly - a personal initiative. When I started down the bcachefs-to-FreeBSD road, I saw a concrete NO block on it. But it turned out to be not that hard. There is still a small backlog of things I want to figure out. But it is already usable - and might turn out useful to someone else too.
I can't promise the path is reproducible from scratch yet - the repos are a working journal, not a manual. So, willing hands - welcome. Both repos, of course, are public. Open for discussion.
I'm new to FreeBSD, and I wanted to try it on my home server. When I was building the server, I really liked one bcachefs feature: the pool where hot
data lives on a fast disk (NVMe) and the cold archive sits on a slow HDD.
My previous server ran a bcachefs pool on Debian, and I didn't want to lose it in the migration.
I think it's important to note that both projects below are fully vibe-coded. I'm not a C or Rust developer, but I honestly tried to keep the slop out.
Attempt 1: bcachefs-box - a VM bridge
bcachefs-box (gh)
Inspired by wifibox, but for a filesystem: a bhyve VM running the native linux build of bcachefs, exported to the FreeBSD host. My agent and I compared sshfs, 9p and NFS - NFS won on speed, so that became the bridge.
Real performance feels not native, but enough. In daily use I hit only one real problem: creating symlinks on the pool from the FreeBSD host didn't work, so I had to hack around it by ssh-ing into the guest. I never treated this as the main way to run the pool - more like a fallback with full bcachefs access. But it works, and I'm sure it covers a lot of use cases (for example, I never touched disk partitioning or anything serious like that from the host side).
Also - my host is AMD, and I hit a bhyve bug along the way: Linux guests boot-looped at start (a divide-by-zero in resctrl, PID 1) because bhyve exposes an unmasked AMD QoS CPUID leaf that Intel masks. Filed as bug with a mask patch.
Attempt 2 (the one I actually use): a FUSE daemon port
bcachefs-freebsd (gh)
A port of the bcachefs tools/daemon to FreeBSD, serving the pool directly through fusefs - no VM, no NFS. This is what my pool runs on now, and symlinks work fine from the host here.
Starting the daemon is not exactly simple yet (hopefully - yet):
- it needs a kernel patch. I made a fusefs problem report - with a patch.
- patched fuser - the issue to Kent Overstreet is already filed.
The pool has been running for a couple of weeks under p2p traffic and streaming workloads, and it has survived one sudden power loss with zero data loss - the journal replay did its job.
So what is this? Honestly - a personal initiative. When I started down the bcachefs-to-FreeBSD road, I saw a concrete NO block on it. But it turned out to be not that hard. There is still a small backlog of things I want to figure out. But it is already usable - and might turn out useful to someone else too.
I can't promise the path is reproducible from scratch yet - the repos are a working journal, not a manual. So, willing hands - welcome. Both repos, of course, are public. Open for discussion.