1 1

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

Didn't get to this and found /var/log full again... still wondering if there is a reason I shouldn't disable log2ram when using a spinning disk?

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



# 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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

1 1