log2ram support

  • New to LibreELEC, but not OSMC. Am configuring a new RPi4 libreElec on 9.1.002. Tried to install log2ram, which failed completely, since all directories it needs write access to are read only. Is log2ram functionality a benefit under LibreELEC? (and if not, other suggestions as to reducing SSD writes under this OS, if not log2ram?). Thanks.

  • Go to Best Answer
  • I would like to think (!!!?!?!) that surely these guys are already doing whatever they can, to reduce SDCard utilisation in LibreElec.

    Perhaps I'm wrong though - I do have a weekly job set up to back up my SDCard in full, so I can just 'burn' a new one in 5 minutes for $10 and I'm done - I even keep a spare.

  • You realise that on anything with 1GB+ RAM we already load the entire OS into RAM? .. and the amount of read/write generated by Kodi on /storage is not particularly high - not high enough to make those solutions worth chasing.

  • /var (and thus /var/log) are already in RAM so log2ram won't provide any benefit. Also note that by default the systemd journal is only kept in RAM (without being written to /var/log/journal) unless you add "debugging" to the kernel command line - which enables permanent journal logging to /storage.

    Kodi's log (/storage/.kodi/temp/kodi.log) will always be written to SD card (though that's not too many writes, unless you enable debug logging in kodi).

    so long,

    Hias

  • Thanks HiassofT for the information. It is something I could not find anywhere else.

    I noticed that .kodi/temp has more stuff than just kodi.log, kodi.old.log and crashes.

    It has archive_cache and temporary scrapping information. I've never had to go back to any of these in 4 years and thought it would be wise to move them all to ram. And to do it in a way that could be reverted if I ever needed to investigate an issue.

    This is what I ended up doing. It works fine for me, but it might be a nicer way to do it.

    Code
    # cd /storage/.kodi
    # mv temp temp_original
    # ln -s /var/log temp
    # reboot

    Upon reboot all the folder structure inside temp gets created. Remember that the initial temp folder was moved to temp_original.

    If you need to investigate anything, even by enabling debug, you can still go to /storage/.kodi/temp/kodi.log it will all be there.

    The only caveat is that it will dissapear after reboot. But this can be sorted temporarily by undoing the above temporarily:

    Code
    # cd /storage/.kodi
    # mv temp temp_in_ram
    # mv temp_original temp

    Edited once, last by felichas (May 7, 2021 at 3:01 PM).