Re: how many inodes on a tmpfs mount

From: Ralf Mardorf <ralf-mardorf_at_riseup.net>
Date: Fri, 11 Nov 2022 10:57:06 UTC
On Fri, 2022-11-11 at 10:22 +0000, Steve O'Hara-Smith wrote:
> On Fri, 11 Nov 2022 10:22:01 +0100
> Per olof Ljungmark <peo@nethead.se> wrote:
> 
> > We ran out of inodes on a 2G md tmpfs mount, can someone please tell  
> > how I can calculate this number? As I understand it is a function of  
> > the size of the filesystem, but how to get the figure?
> 
> 	df -i will return the number of free and used inodes - but bear in
> mind that with ZFS the inodes belong to the pool not the filesystem.

Hi,

I suspect that the OP knows that df -i shows the free and used inodes.
IIUC the OP wants to know how to calculate the amount of available
inodes for a tmpfs (not a file system on a disk). Probably the OP want's
to know how much GiB tmpfs are needed, to hold a given amount of inodes.
In my experiences with tmpfs (on Linux, not FreeBSD), it can happen that
tmpfs runs out of inodes. I tend to build some packages on disk instead
of tmpfs, a package for a small disk space sized icon theme could suffer
from countless inodes. I increased tmpfs from around 4 GiB to around 8
GiB and probably got rid of not having enough tmpfs inodes for my needs.

Regards,
Ralf