Why my k3s control-plane stopped trusting its boot media — a preventive migration of etcd from SD card to USB SSD on a Raspberry Pi cluster.

There was no outage. No corrupted database, no failed quorum, no 3 a.m. incident. Just a nagging thought while watching my Prometheus dashboards fill up with data I had no idea was being written where: my entire cluster state lives on the same SD card that boots my Raspberry Pi.

SD cards are built for reading. etcd is built for writing. Prometheus made sure there was plenty of writing going on. That combination doesn't fail maybe — it fails eventually. So before it did, I moved the whole thing onto a USB SSD.

This is what I found, what I did, and what I'd do differently.

The setup

My homelab is a small k3s cluster built from four Raspberry Pis. One of them, winterfell, is the control-plane node — which means it runs the Kubernetes API server and, more importantly for this story, etcd: the database that holds the entire cluster state. Every deployment, secret, config map, node registration — everything lives in etcd, on winterfell, on its boot SD card.

Because that's how the node was originally set up. It worked. Nothing about it felt wrong. Which, as it turns out, is exactly the problem.

Why I acted before anything broke

I want to be honest about this: there were no symptoms. This was a preventive move, motivated by two things I couldn't stop thinking about.

First: the failure mode was a matter of when, not if. Consumer SD cards are engineered for read-heavy workloads — an OS boots from it, reads a few files, updates occasionally. etcd is the opposite beast: continuous small writes, WAL (write-ahead log) files, fsync calls, compaction traffic around the clock. Sustained write load is precisely what consumer flash degrades under, and a worn-out SD card doesn't corrupt gracefully. It doesn't lose some files. It takes the whole filesystem down — and with it, the only copy of my cluster state. Quorum lived on that one disk.

Second: I couldn't quantify the write load. I knew Prometheus was scraping metrics every few seconds. I knew other services were writing state constantly. But I had no idea how many megabytes per hour were hitting that card — and that ignorance was itself the argument. When you can't estimate how hard a component is hammering your storage medium, assuming the worst is the only sane engineering decision.

So the question shifted from "will this fail?" to "why am I waiting for it?".

The migration

The plan had one hard constraint: this is a single control-plane node. When k3s stops on winterfell, the cluster has no API server, no quorum, no scheduling. I accepted that maintenance window consciously — everything would be down for the duration, and that was fine for a homelab.

Here's what I did:

1. Stop k3s on winterfell. No writers, no half-open files, a consistent copy. rsyncing a running etcd would have produced a corrupt backup of healthy data — the stop is not optional.

2. rsync the entire data directory (/var/lib/rancher/k3s) from the SD card to the USB SSD, with archive mode to preserve ownership, permissions and timestamps. One copy, one source of truth.

3. Mount the XFS-formatted SSD at the original path via /etc/fstab — the same /var/lib/rancher/k3s location. This is the elegant part: because the mount point matches the original path, k3s needed zero configuration changes. It has no idea its data moved houses.

Why XFS? It's a journaling filesystem that handles many small writes and large directories well — exactly the workload etcd produces. It's also the filesystem I'd recommend to anyone doing this: ext4 would work, but XFS is the common choice for etcd-heavy nodes for a reason.

4. Verify before destroying anything. Cluster restarted, all nodes rejoined, etcd quorum confirmed, workloads scheduling normally. Only then did I wipe the old copy from the SD card. The old data is your last parachute until the new location has proven itself through a full boot cycle.

From that day on, the division of labor is clean: the SD card boots the OS and does almost nothing else. The SSD carries the data.

What I learned

Storage decisions for cluster state are not infrastructure trivia — they are a bet on how the storage medium fails. etcd is the last place you want a medium that wears out silently.

Not knowing the write load was itself the signal to act. I didn't need measurements to justify the migration; the absence of measurements was the justification. Decisions under uncertainty are still decisions — and documenting why you made them beats pretending you had data you didn't.

Separating OS and data paid off later, in ways I didn't predict. Reimaging a node now means pulling the SD card, flashing it, slotting it back in — without touching the cluster state. What started as a data-integrity move quietly became an operability upgrade. If I had to do it again, I'd separate them from day one, on every node.

Did performance improve? Honestly: not measurably. Things feel snappier, but I didn't benchmark before and after, so I won't claim numbers I don't have. The real win was never speed — it was knowing that a Tuesday-night flash wear-out can no longer erase my cluster.

What's next

Now that the cluster state lives on a medium that can keep up with it, the write-heavy services have room to breathe — which is convenient, because Prometheus turned out to be hungry in other ways too (its memory appetite, to be exact). That's a story for another post.

If you want to see what the cluster looks like when it's healthy: I document my homelab — dashboards, incident log and all — at mrtoadie.github.io, and the tooling I built to audit it is on my GitHub.

Thanks for reading — and if your cluster state currently lives on the same SD card that boots your Pi: you already know what to do.