"tmpfs" missing as a storage option - solved

Hello all

Problem:
None of my apps have the tmpfs (Temporary directory created on the RAM) option available in the drop-down list of storage options. How do I fix it?

Detail (now significantly edited from my original post as I learn more about what I am trying to ask for help with):

For Frigate I am using TrueNAS’ official app but there is a problem which discussions on Frigate github have highlighted for me.

Namely, I have been advised that /tmp/cache ought to be in RAM but the app seems to write it to the backing store somewhere (a standalone 240 GB SATA/USB3 SSD in my case, mounted as "temporary") even though I can’t see it. It’s 60 GB in size and I can’t find it on my SSD to get at it to delete it; restarting the app doesn’t change it.

If it were in Docker there are ways to control it e.g.

volumes:
      #host : container
      - /etc/localtime:/etc/localtime:ro
      - /mnt/temporary/frigate/config:/config:rw
      - type: tmpfs
        target: /tmp/cache
        tmpfs:
          size: 1000000000

but I’m using the app, not Docker, and I don’t know how to do it in the app.

I see from a variety of posts that there should be a drop-down option for tmpfs :

but I don’t have that option in the Frigate app, nor in my other apps (jellyfin and tailscale for example):

and I don’t know why, nor do I know what to do.

For completeness, the Frigate discussion is here and I’ll mention the mounts which I have created in the app, in the hope that someone might realise how to correct this (my?) problem:

/mnt/temporary/frigate/config
/mnt/temporary/frigate/media
/mnt/temporary/frigate/cache

I can ssh into trueNAS and see that these are all on my SSD (temporary) but there’s no sign of /tmp/cache there.

(1) How do I tell the apps to do tmpfs alongside the existing ixvolume and host path options please?

(2) How do I find where this 60GB lives so I can manually delete it please?

I’ve just tried this:

root@truenas[~]# mkdir /mnt/temporary/frigate/tmpfs

followed by

root@truenas[~]# mount -t tmpfs ramdisk /mnt/temporary/frigate/tmpfs

and I can now select the tmpfs, represented by a different icon, when I choose host path:

and in Frigate, I see a different situation now:


I don’t know where that 7.73GB comes from but it must be part of my available RAM rather than my backing store.

Maybe I have found a solution! I don’t know whether this is a fix and, if so, whether it will be persistent between reboots/TN upgrades so I have documented it here for myself and in case it helps anyone in the future.

See here for additional details, where I limit the tmpfs size to 1 GB. A few tests with watch -n 1 ls -l and with df -h for /mnt/temporary/frigate/tmpfs confirm that this approach has worked.