Create RAMDISK on Libreelec v 8.x

  • Hi ,

    I'm running LibreElec on Odroid hardware and want to create a 50MB Ramdisk. I have other mount scripts for Samba mounts that work. But this one for RAMDISK fails - Here is a copy of the script I've tried. Please advice on how to resolve this:

    The mount script is named per LE requirements - script is named 'storage-.tmp-RAMDISK.mount' and located under /storage/.config/system.d

    Here is what I did and the error I get:

    systemctl enable storage-.tmp-RAMDISK.mount

    systemctl start storage-.tmp-RAMDISK.mount

    systemctl status storage-.tmp-RAMDISK.mount. results in:

    storage-.tmp-RAMDISK.mount - RAMDISK mount script

    Loaded: loaded (/storage/.config/system.d/storage-.tmp-RAMDISK.mount; enabled; vendor preset: disabled)

    Active: failed (Result: exit-code) since Tue 2018-11-27 12:25:48 EST; 24s ago

    Where: /storage/.tmp/RAMDISK

    What: tmpfs

    CPU: 4ms

    Nov 27 12:25:48 librelec systemd[1]: Mounting RAMDISK mount script...

    Nov 27 12:25:48 librelec systemd[1]: storage-.tmp-RAMDISK.mount: Mount process exited, code=exited status=255

    Nov 27 12:25:48 librelec systemd[1]: Failed to mount RAMDISK mount script.

    Nov 27 12:25:48 librelec systemd[1]: storage-.tmp-RAMDISK.mount: Unit entered failed state.


  • Yes, top reports over 1GB free memory:

    top - 13:02:46 up 47 min, 1 user, load average: 2.51, 2.44, 2.35

    Tasks: 125 total, 2 running, 123 sleeping, 0 stopped, 0 zombie

    %Cpu(s): 2.2 us, 1.6 sy, 0.5 ni, 95.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st

    KiB Mem : 1856264 total, 1067008 free, 218696 used, 570560 buff/cache

    KiB Swap: 0 total, 0 free, 0 used. 1439412 avail Mem

  • It looks like it worked with lower value of 20m and then I did a umount and tried it again with 50m and that worked too. (the only thing different is I emptied the destination folder a few minutes ago)

    No idea why it didn't work the first time. But now it seems to have survived a reboot as well.

    Thanks for confirming that the script was correct and suggesting to try lower value.