Place /var/log into ramdisk to reduce disk write and allow spindown of OS disk

  • Hi,


    I've done some searching on the forums, but couldn't find an anser to my question. Moreover, perhaps this is more or less a feature request; didn't know where to put it.


    The basic idea is to allow the OS disk to be spun down to save energy. How to achieve this?

    • Create a ramdisk of about 20MB
    • Mount it as /var/log (I'm assuming all OMV disk writes go here)
    • Use a cron job to flush/sync the contents of the ramdisk to disk

    I know that some NAS manufacturers use this trick to allow spindown of disks.


    Does anyone know if this is possible?
    If I need to configure this myself: does anyone have an overview of all processes that write to disk, when and where?

    • Offizieller Beitrag

    Just install the openmediavault-flashmemory plugin. It will do basically want you want except for #3 (not yet anyway - syncs when you shutdown). If you have UPS, you won't need to worry about #3.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Can't install it through the omv-extras plugin. It doesn't list the flashmemory plugin (or any other plugin for that matter) at all.
    Perhaps there is no PowerPC deb for it?


    I can always add a cronjob to do the sync somewhere in the middle of the night, or once per week right?

    • Offizieller Beitrag

    Try now. Just put it in regular omv-extras powerpc repo (stoneburner).


    I guess you could if the logs are that important to you :) Never tried it though.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Well, I'm assuming that rrd data is also stored there. That's nice info to keep :)


    Edit: though having something to process netflow information inside OMV would be even more nice :)

    • Offizieller Beitrag

    I don't look at the graphs much. Losing the rrd data wouldn't bother me :) You wouldn't lose it all. Just the new files since the last reboot. You could schedule a reboot once a week. That would sync the files.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    I guess you would need the entire OS to run from ram then. So, I guess you are out of luck.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I think it's enough to figure out what is reading from and writing to disk, and move that to a ram disk and use some scripting to flush it every now and then.
    Already turned off collectd and rrdtool, because they write a lot to disk and I don't really need it.


    Too op bad I can't run iotop to see it, because my kernel doesn't contain the required options.
    Maybe if you start hacking your MBL you will figure out how to add that option :)

    • Offizieller Beitrag

    I spent years with Gentoo configuring and building kernels. Not hard at all. Just need to find what enables it.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • iotop needs a kernel version 2.6.20 (that's ok!)
    and options for io accounting. Just need to figure out how to add it to the kernel during compilation.
    There are literally a million options in the make menuconfig :)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!