Symmetric partitioning: Why it is used during updates by UpdateHub?

Symmetric partitioning is a widely adopted strategy to keep devices safe during OTA updates. Here we cover how this strategy is used on the device when using OTA updates through UpdateHub.

Domarys Correa
O.S. Systems
4 min readMay 28, 2020

--

Someone inspecting a ship with a magnifying glass

In a connected world, an Over The Air solution is a must-have. It is always a good choice, because even devices that initially don’t have an external network connection, may at some point have to communicate with other devices, machines, or servers.

Choosing a good storage use strategy, to apply OTA updates on devices in the field, during the initial product development cycle, has a major impact. It reduces costs and risks, with late changes, and guarantees your device stays safe throughout its all life cycle. One of the most adopted strategies is the symmetric partitioning, which we’ll cover below.

Symmetric partitioning

Symmetric partitioning is a widely adopted strategy to keep devices safe, during OTA updates. It ensures devices are kept in a working state even during faulty updates and this is one of its notorious advantages. For a greater level of understanding, we cover below how this configuration works on the device, to receive OTA updates using UpdateHub.

Before we cover the “Why it is used during updates by UpdateHub?” aspect, we need to understand that UpdateHub is a client-server solution, and that symmetric partitioning has an important role here. Its adoption as a strategy for the internal device’s storage allows the update to be applied while the device is kept in use, allow for rebooting the device when convenience and etc. For a deeper understanding of how UpdateHub solution works, we suggest the article: How an OTA update is executed by UpdateHub Agent?

Let’s start from the device:

A example of symmetric partitioning

In device

Considering the purpose of this configuration in OTA updates, the partitions work independently. A variable in the bootloader (U-Boot, for example) indicates the partition to be used, and the other remains inactive. To UpdateHub, we also configured mechanisms to assist the failure treatment, as the use of an internal control variable that counts the number of boots, for example. If the device reaches a limit of boot attempts, that variable turns to the old and inactive partition, so the system is rebooted with the old image to avoid any risk. This setting allows the device full-operating, even in case of failure, with no physical intervention.

Now, let’s understand how this works:

UpdateHub update flowchart

At image (a), the device is running and the bootloader variable is configured to Partition A, while Partition B is inactive.

At image (b), Partition A is active and the device keeps working while Partition B receives a new updated image from UpdateHub Agent.

At image ©, the device is rebooted after recording the image, and the variable turns to Partition B.

After all (d), the device restarts with the updated image, and Partition A is now inactive.

Why symmetric partitioning?

Project decisions related to the internal device’s storage strategy are critical. Any update to the storage can affect device availability and considering the advantages of symmetric partitioning, it is the logical choice for UpdateHub use. Let’s see some of the benefits of this choice:

  • Reduce the probability of a broken device after an updated, which means, fewer device replacements, decreasing the physical assistance needed;
  • OTA (over-the-air) updates don’t interrupt ongoing processes, occurring while the system is running;
  • The device restart time is regular;
  • In case of errors during data transfer, only the unused partition is affected;
  • Avoids problems caused by the lack of space to store the data needed for the update, since as the data is received by the device, they can be installed without the need to store all the information before starting the update installation.

This kind of setting is very usual in enterprise OTA solutions, precisely because it keeps the device working safely and reduces the risks of unsuccessful updates. For this reason, when we work with Embedded Systems, it’s important to consider an enterprise solution rather than to develop a proprietary one. Specialized companies spend a lot of time thinking in detail for you don’t need to do.

--

--

Domarys Correa
O.S. Systems

I am a computer scientist, a geek, rock music fan, terror games and movies addict, chocolate lover and the crazy cat lady.