Systemd-journald disk wear-out

482 views Asked by At

I'm trying to incorporate journald into a platform running a Yocto based image. The board has eMMC flash storage which can wear out with too frequent writes but I want the logs to be persistent.

Right now with syslog, it logs to tmpfs and then uses logrotate to compress them and saves them to peristent storage once the logs grow past a certain size. However, this makes querying them more difficult.

I don't see a way to configure journald to log to tmpfs and rotate to the eMMC flash. The journald rotating simply deletes the logs that're older than a certain size.

Any help or guidance would be appreciated and I'm happy to provide any additional information.

Thanks, Rohit

1

There are 1 answers

0
arlac77 On

As a 1st. step increase the sync interval (5minutes is the default)

[Journal]
SyncIntervalSec = 30m