preloader
image

sdmon

While working on the OIOS (OGI-IT IoT OS) and the Raspberry Pi, the question arose to what extent data stored on the Raspberry Pi’s SD card was “safe”. Although this data is only available exclusively on the SD card for a relatively short period of time before it is transferred to the higher-level system (LIMS), data loss should be avoided even then. Such data loss can occur when the maximum number of write cycles on the SD card has been reached. If there is a possibility to query the remaining service life of the card, the SD card can be changed in good time and data loss can thus be prevented.

Although an attempt was made in the SD card specification to introduce a uniform interface to query the remaining “lifetime” of the card, many of the card manufacturers are sticking to proprietary and “secret” solutions.

After a long search and our refusal to enter into NDAs (Non Disclosure Agreements) for the disclosure, we finally found a manufacturer who describes the possibility of the query in his data sheet. This is how sdmon came about, a Linux program for the raspberry pi that displays the remaining service life of the SD card. It only works with a few professional SD cards. However, the first version also showed an error in the Linux kernel driver for the Raspberry Pi. Since we had not entered into an NDA, the sdmon source code could be made public under GPLv2 (see Github link), which in turn allowed the driver developers to fix this bug as well.