Boot from SD? Consider log2ram, avoid excessive writes

If you followed the install instructions, you’ll be running everything from the SD card, leaving the four SATA slots for your network storage. If so, you are probably hitting the SD card really hard, as all logs will be written there.

Help avoid excessive writes by installing log2ram. This essentially reroutes your logs to RAM. Every day (or on shutdown), the logs will be written to the SD card. The obvious downside is that you’ll lose any unwritten logs during a power failure.

Installation is really easy:

echo "deb [signed-by=/usr/share/keyrings/azlux-archive-keyring.gpg] http://packages.azlux.fr/debian/ bullseye main" | sudo tee /etc/apt/sources.list.d/azlux.list
sudo wget -O /usr/share/keyrings/azlux-archive-keyring.gpg  https://azlux.fr/repo.gpg
sudo apt update
sudo apt install log2ram

Then reboot and you are good to go. https://github.com/azlux/log2ram has manual install instructions if you prefer.

2 Likes

If using OMV the Flashmemory Plugin handles this. I believe that when using the Pi installer script this is automatically installed.

OMV-Extras - Why Is The Flashmemory Plugin Required?

Of course if you are not using OMV the advice in the first post is really good to know!

1 Like

Ah, thanks, Frenezaj. I wasn’t aware of the flashmemory plugin. Hopefully this helps some people who aren’t running OMV, then. :slight_smile:

I have deployed one of these so dont use the SD card. The OMV & OS runs from here.

2 Likes