A/B slots or snapshots? Two ways to make an OTA update survive failure
Both A/B partitioning and snapshot-based updating can roll back a failed OTA update. They reserve very different amounts of flash...
We are here to help
Have a question or need guidance? Whether you’re searching for resources or want to connect with an expert, we’ve got you covered. Use the search bar on the right to find what you need.
Every embedded storage layout starts as a calculated forecast. Before the first unit ships, someone decides how large the operating system will get, how much room each application needs, where logs, maps, and models will live, and how much headroom to leave for the years ahead. Those numbers become the device’s fixed partitions, written into the bootloader configuration and the build system. On most platforms they stay there for the life of the product.
For a vehicle, that life is long. Platforms are designed for 15 to 20 years in the field, and over that time the software keeps changing: new features arrive, existing features are enabled or disabled, and security patches keep coming.
In my previous post I compared A/B slots and snapshots as two ways to make an OTA update survive failure. This post looks one layer down, at how the storage itself is divided. I’ll describe how fixed partitions are designed today, what happens to them as software grows, and how dynamic subvolumes in SnapFS approach the same job with a shared pool and quotas.
As I work on SnapFS development, I’ll share my view on this topic. Fixed partitioning has served embedded systems well for a long time, and it may remain a suitable approach for systems where the software rarely grows or changes over their lifetime. As software grows, embedded storage needs a more dynamic approach.
Open the storage layout of a typical ECU, zonal controller, or cockpit domain controller and you will find the managed flash (eMMC or UFS) divided into a set of fixed partitions, each with its own purpose:
A fixed layout asks the architect to forecast the growth of every partition at once, years in advance. The forecast has to be right for each partition individually, because free space in one partition is unavailable to the one next to it. Partitions can be resized, but resizing needs careful planning to avoid data loss.
The software, meanwhile, keeps growing. The drivers are familiar to anyone working on a software-defined vehicle:
After a few years in the field, the typical result is uneven: one partition is full while the one next to it is half empty. The device may have plenty of free capacity in total, spread across partitions that can’t lend it to each other.
That leaves the architect with two ways to size each reserve, and each has a cost:
| Sizing choice | What it costs later |
|---|---|
| Reserve too little | Changing the layout in the field can mean a large reflash, a major OTA package, or a workshop visit. Until then, teams spend effort shrinking software to fit the space it was given. |
| Reserve too much | Capacity sits stranded in partitions that never fill. In the worst case the design moves to a larger, more expensive flash device to carry reserves that stay unused. |
A/B duplication multiplies the effect. Every partition covered by the scheme is stored twice, and both slots are sized once, at design time, for a software image that will keep growing.
This matters more now than it did a few years ago, because flash costs more than it used to. Every gigabyte held in reserve “just in case” is a gigabyte on the bill of materials of every unit shipped.
SnapFS takes a different starting point. Instead of dividing the flash into fixed partitions, it manages the storage as one pool and places each function in a subvolume within it.
A subvolume behaves like a partition from the application’s point of view: it has its own directory tree, its own limits, and its own snapshots. The difference is in how space is held. A subvolume consumes only the blocks it actually uses. Everything it isn’t using stays in the shared pool, available to whichever subvolume needs it next.
Four properties follow from that design:
The same pool also holds snapshots, which is how SnapFS handles system updates. I covered that side in my previous post, so here I’ll stay with how the pool is divided.
The first question an experienced architect asks about a shared pool is the right one: what stops one application from taking space another one depends on? In SnapFS the answer is quotas.
A quota is an upper limit on a subvolume. The subvolume can grow up to its quota and no further, so an application that writes more than expected, such as a logging service during a fault storm, is contained before it reaches space other applications depend on.
Used this way, quotas protect critical applications. When the quotas on the other subvolumes are set so that together they leave enough of the pool free, the critical applications always have the space they need.
A quota also doesn’t have to be generous from day one. It can be set close to what an application needs today and raised later, when a new feature calls for more. That keeps an application that misbehaves in check, while leaving room to grow when it’s needed.
Quotas are enforced by the file system itself, at the moment of each write, so a limit holds regardless of how the application behaves.
For safety-relevant data, space is only part of the picture. What matters most is that the data read back is exactly the data that was written. SnapFS keeps a tree of hashes over metadata and user data, verifying every block against its parent, so corruption or tampering is detected on read instead of reaching the application.
Quotas let the architect decide, per application, how much space each one can take and how much stays shared. An illustrative configuration for a vehicle platform might look like this:
| Subvolume | Quota | Intent |
|---|---|---|
| Critical application data, for example event and diagnostic data | Its known worst-case need | Protected by the quotas on every other subvolume |
| AI models | Active plus staged model | Room to stage the next version |
| Maps | Current map set, raised as coverage grows | Grows when it needs to |
| Applications | Current release, raised for new features | Room for post-launch features |
| Logs and telemetry | Capped | Uses spare capacity, can never crowd out the rest |
The first row is the critical application: system-related data the vehicle depends on. Its space is protected by the quotas on everything else, and its own quota keeps it within the size it was designed for. Every other application keeps its flexibility.
SnapFS also guarantees that rolling back and deleting a snapshot always succeed, even on a completely full volume. Files and directories that aren’t held in a snapshot can always be deleted too. Deleting data that is still held in a snapshot isn’t guaranteed to succeed on a full volume, because the snapshot’s state has to be retained. Snapshot retention is therefore part of the space plan.
With fixed partitions, every partition carries its own growth reserve, and the reserves add up. Each one is sized for that partition’s worst case, and each one sits idle until that particular partition needs it.
A shared pool changes the arithmetic. Each subvolume is still bounded by its quota, but the headroom is pooled: the platform holds one common reserve that any subvolume can draw on as it grows, up to its quota. How much capacity that saves depends on how the applications’ growth overlaps over time, which is one of the figures worth measuring below.
It also changes what a layout change costs. Raising a subvolume’s quota is an adjustment made at runtime, with the data staying where it is. The storage layout can follow the software’s actual growth over the vehicle’s life, instead of a forecast made before start of production.
The capacity this frees can go where the platform needs it most: longer telemetry retention, a larger model, room for features that arrive after launch, or a smaller flash part on the next bill of materials.
I’d rather give you the method than a headline number. If you are weighing this on a real platform, these are the figures I would want, ideally from field data:
Those four numbers show how much capacity a fixed layout holds in reserve, and how much of it a shared pool could put to work.
Fixed partitions and shared pools each have their place. A fixed partition remains a sound choice for content that is small, stable, and recovery-critical, such as the boot chain. Everything that grows benefits from a layout that can grow with it: applications, models, maps, calibration data, logs, and telemetry.
The real design question is where each function’s space should be fixed, and where it can flex. Subvolumes let an architect answer that per function, with quotas that keep each application within its share and keep space available for the critical ones, and then adjust the answer as the software changes over the life of the vehicle.
That is what SnapFS is built for. Subvolumes and quotas sit in the same file system as snapshots and end-to-end integrity checking, with a fixed memory budget set at configuration time and one on-disk format across Linux, INTEGRITY, VxWorks, and other operating systems supported in the future.
If you are planning the storage layout for a platform that will live 15 years or more, I would like to compare notes ([email protected]). See how SnapFS works.
Suggested content for: