Creating RAM based directory/mount

The /tmp directory seems to be a volatile directory in RAM.
Is it possible to create such directories or even mount points yourself?

You can create mount points through the luci system->mount points page.

As far as ramdisks, it has been a long time since I messed with those but I believe it was somewhat complicated and luci doesn't have it as an option. Why not just make a directory within /tmp? If you want it to be there after a reboot you could put mkdir /tmp/ramdisk in rc.local. If you want it to look like a mounted drive you can also ln -s /tmp/ramdisk /mnt/ramdisk /mnt is where foreign filesystems are normally mounted.

I wanted to avoid /tmp just because I find felt 'weird' to use a directory called /tmp for my application. On the other hand, it is the perfect name, it is indeed just temporary, I will just go for that. I like the symbolic link option you posted. Thanks.
Does the tmp ramdisk have a fixed size, if so, how can I find out how large it is?

i believe it is roughly 1/2 of your ram, not sure if it is dynamically sized.

df or df -h will show you approx size

Indeed /tmp is half the total RAM (about 30M).
Remember these two characteristics

  • if you use its "disk" space you are consuming RAM, preventing programs to use it
  • if your programs use RAM, let's say 8M out of total 10M, despite "df -h" showing the same available "disk" space, you won't be able to consume more than 2M of that space. Thus, "df -h" lies when comes to tmpfs (at least AFAIK)