Jump to content
  • 0

Migrate from ramlog to disk


wurmfood
 Share

Question

Is there an accepted procedure for moving from using ramlog to logging to disk? I've looked but everything I can find is about setting up ramlog.

 

I assume it's more complicated than just creating a partition (or ZFS dataset) and mounting it /var/log, disabling ramlog, and rebooting.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Armbian is a community driven open source project. Do you like to contribute your code?

  • 0

Well, for anyone else interested in trying this, here's the basic order I did:

  • stop armbian-ramlog
  • disable armbian-ramlog
  • create a zfs dataset and mount it at /var/log
  • cp -ar everything from /var/log.hdd to the new /var/log
  • modify /etc/logrotate to disable compression (since the dataset is already using compression)
  • modify /etc/default/armbian-ramlog to disable it there as well
  • modify /etc/default/armbian-zram-config to adjust for new numbers (I have ZRAM_PERCENTAGE and MEM_LIMIT_PERCENTAGE at 15).
  • reboot
Link to comment
Share on other sites

  • 0

Sorry, the line about disabling was just to make sure you disable the armbian-zram-config service by setting ENABLED to false.

 

As a warning, though, I found some problems with this if you log to a zfs share. It seems you have to make sure zfs gets loaded before the logging starts up, otherwise you can get a kernel panic on occasion. I didn't really dig into how to fix this, so I just log and swap to a usb drive instead now.

Link to comment
Share on other sites

  • 0
5 hours ago, wurmfood said:

Sorry, the line about disabling was just to make sure you disable the armbian-zram-config service by setting ENABLED to false.

 

As a warning, though, I found some problems with this if you log to a zfs share. It seems you have to make sure zfs gets loaded before the logging starts up, otherwise you can get a kernel panic on occasion. I didn't really dig into how to fix this, so I just log and swap to a usb drive instead now.

Thank you for clarifying and pointing that out.
Logging to a USB drive as a swap seems like a neat workaround.
It would be better though, if we could work out how to avoid the kernel panics without having to change when zfs mounts.

Link to comment
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.

Guest
Answer this question...

×   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.

Loading...
 Share

×
×
  • Create New...