Var log directories not recreating after a reboot

I’m having an issue with var log not creating services directories.

Required Information:

  • DietPi version |
    G_DIETPI_VERSION_CORE=9
    G_DIETPI_VERSION_SUB=1
    G_DIETPI_VERSION_RC=1
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’
    G_LIVE_PATCH_STATUS[0]=‘not applicable’
  • Distro version | bookworm 0
  • Kernel version | Linux PI5 6.6.16-v8-16k+ #1732 SMP PREEMPT Tue Feb 13 13:13:56 GMT 2024 aarch64 GNU/Linux
  • Architecture | arm64
  • SBC model | RPi 5 Model B (aarch64)
  • Power supply used | 5v 5A from RBPI.org
  • SD card used | X1001 hat and 500Gig MMVE m.2 EVO Plus SSD.

Additional Information:

  • Software title | Log System
  • Was the software title installed freshly or updated/migrated? migrated, and updated.
  • Can this issue be replicated on a fresh installation of DietPi? Not Sure, I have only on current version.

Expected behaviour
DietPi-RAMlog #2 - during boot on the virtual tmpfs var og should have files created in directories.

Actual behaviour
Upon reboot of the Pi 5, files apache2, apt, letsencrypt are not created in the var log directory. Causing Apache to fail with:

in journalctl:
Starting apache2.service - The Apache HTTP Server…
(2)No such file or directory: AH02291: Cannot access directory ’ var log apache2’ for error log of vhost
Failed to start apache2.service - The Apache HTTP Server.

Manual creation of the varl log apache2, with a start of apache works, and serving files.

I did notice that when I went back into dietpi-software Log System was set to None (when previously was DietPi-RAMlog #2) I reset to DietPi-RAMlog #2, rebooted and the /logs director did not have the directories. Some of the standard files in the directory are missing as well, such as syslog…

What file would create the directories for services>?

All seemed to be working fine until 5PM when the log file stopped rotating. Upon reboot the error above happened.

Any Help would be appreciated.

do you see Apache logs being available within /var/tmp/dietpi/logs/dietpi-ramlog_store ??

After multiple reboots and changes from none, to full, #1 and back to DietPi-RAMlog #2, the log files all reappeared and cron is moving the files hourly. The next time it happens, I’ll do a log dump and search for an error before a reboot.

Hoping it is not my aggressive config.tx settings.

For completeness: There is a log file about the last attempt to store files from /var/log persistently on shutdown and restore them at boot:

cat /var/tmp/dietpi/logs/dietpi-ramlog.log

If this failed for some reason, this log should give a hint.

1 Like