1 1
broodwich82

How to completely disable log2ram?

Recommended Posts

Hello, I've searched through various threads on here and can find no comprehensive answer on how to disable log2ram completely, forever, and preferably end up with only one /var/log with mainstream logrotate settings. This is for a situation where I'm using an actual hard drive and don't need to worry about destroying flash memory. I suspect it is more involved than just 'systemctl disable log2ram'. Any additional pointers would be very helpful, thank you!

Share this post


Link to post
Share on other sites

The ones to look for... again, it's there for a good reason, just like armbian-zram-config.service (which some might be aware of as docker and k8 can have issues with swap in general)

$ systemctl list-unit-files | grep armbian*
armbian-firstrun-config.service            enabled        
armbian-firstrun.service                   disabled       
armbian-hardware-monitor.service           enabled        
armbian-hardware-optimize.service          enabled        
armbian-ramlog.service                     disabled       
armbian-resize-filesystem.service          disabled       
armbian-zram-config.service                disabled 

to disable the ramlog service - systemctl disable armbian-ramlog.service as sudo

Share this post


Link to post
Share on other sites

Thanks for the responses, folks. Why would it be a problem to disable ramlog on a system that has / on a spinning disk? I want the 50MB of RAM back.

 

Edit: also, I'm using this as a development box for something that generates a lot of logs, 50MB was not enough for more than a week before it was filling up, etc ... so I just want logging to work how it does on a vanilla linux box, seeing as I've got a real disk, unless there's a good reason.

Edited by broodwich82
forgot a thing

Share this post


Link to post
Share on other sites

FYI neither of the above answers was correct because ram logging is provided by log2ram on the Cubieboard2 image I am using. I found the answer as to how to disable it elsewhere: http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=3448

 

Quote

# systemctl stop rsyslog.service
# systemctl stop syslog.socket
# lsof /var/log
(make sure it's empty)
# systemctl stop log2ram
# systemctl disable log2ram
# mv /var/log /var/oldlog
# rsync -avPHAXx /var/oldlog /var/log
# reboot

After the reboot, remove /var/oldlog if you don't really need it

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
1 1