Ability to mount pihole.log as tmpfs


#1

This is useful to avoid excessive writes to the SD card.


#2

Just configured this manually.
Webpages (Mainpage and QueryLog) become much much much faster.


#3

This won’t be necessary with FTL, though (it will be even much much much much faster :slight_smile: ). You will loose your log on shutdown/power failure with tmpfs.


#4

loosing the log isn’t that serious from my point of view. I get a new one everyday anyway…

wtf is FTL?


#5

We implement logrotate support with the next release, so a history of your logs is saved.


#6

so what about leaving the latest log in tmpfs even with the risk of loss

forget about this…


#7

May be worth it to look into the FlashMemory Plugin for OpenMediaVault. They have a setup where periodically the logs are written to disk (I think it’s once a day) and on shutdown it does the same thing. That would allow the logs to persist through reboots, though you would lose the latest one in case of a power failure.


#8

Article - Debian Admin - A transient /var/log
Script based on above article - transientlog: for raspberry pi or other SD card linux
I stumbled upon this & I’m currently using it. It loads during start-up and saves on shutdown, and is possible to schedule saves.


#9

This is just oit of interest: Is this more like a hypothetical scenatio or are you actually having problems with SD card wearing out? I run Pi-hole for a long time, 24/7 with several active clients (about 30’000 queries a day). I still use the very same SD card I bought along my Raspberry Pi v1 (about 5 years old) and never have seen a single problem that I’d relate to the SD card.


#10

For me it’s anecdotal. I never had any problems to fix by applying such tweaks. Tweaks like this and disabling file timestamps etc are habits carried on from mechanical HDD days to SSDs before TRIM, and now it’s being more irrelevant, come to think of it. “If it ain’t broke, don’t fix it” – I like that because I forget it many times ; )


#11

This FAQ may help…


#12

Starting in v4.0, we actually don’t need the log file anymore.