/var/log to RAM disk

Started by waxhead, November 12, 2026, 11:40:37 PM

Previous topic - Next topic
Hi,

Under system->settings->miscellaneous it is possible to select "use memory file system for /var/log"
the information says that if you use /var/log as a RAM disk the log data will be lost on a reboot.

Why? It sound trivial to rsync the memory based /var/log to physical disk on a scheduled reboot/shutdown and vice versa on boot.
Yes, data will still be lost on a crash / power outage , but for planned restarts I don't see why loosing log data would be necessary.

Just off the top of my head:

1. It tries to reduce disk writes which writing the disk negates.
2. Deferring the write to reboot can take a long time especially on slower disks where you don't want the writes either. People had issues with other backup facilities that did exactly the same thing in the past which are now all removed because they would block the box from rebooting.
3. A power loss still kills all your current logs.
4. It's not 2004 anymore and ZFS is much better than UFS ever was. The same goes for hardware like disks unless you still use a CF card.


Cheers,
Franco

Quote from: franco on <strong>Today</strong> at 07:11:34 AM4. It's not 2004 anymore and ZFS is much better than UFS ever was. The same goes for hardware like disks unless you still use a CF card.
I think on-board eMMC is also still a thing with certain mini PC / router boxes, but at least one vendor I know of has started dropping that due to rising costs.
N5105 | 8/250GB | 4xi226-V | Community