Re: mkdir error message -- what does this mean?

From: David Christensen <dpchrist_at_holgerdanske.com>
Date: Sat, 01 Oct 2022 20:09:54 UTC
On 10/1/22 09:09, doug wrote:
> 
> 
> On Fri, 30 Sep 2022, Steve O'Hara-Smith wrote:
> 
>> On Fri, 30 Sep 2022 14:48:09 -0400
>> Paul Procacci <pprocacci@gmail.com> wrote:
>>
>>>      31 EMLINK Too many links. Maximum allowable hard links to a single
>>> file has been exceeded (limit of 32767 hard links per file).
>>>
>>> I betcha the parent directory has at least this many number of 
>>> objects in
>>> it.
>>
>>     DIRHASH has a lot to answer for, time was we'd jump through hoops
>> when writing applications to avoid having huge numbers of files in a
>> directory, now nobody notices any problems until they hit the limit.
>>
> 
> I hit this limit long, long ago. Maybe Version 4 or 5, made the change 
> and forgot all about it. I guess mergermaster and freebsd-update rolled my
> number forward or the default was made bigger than anything I have now. 
> The only reason for my comment is a bunch of cyrus accounts have inboxes 
> with 200-300k emails. They happily make and delete folders that 
> subdirectories of /var/spool/imap/user/user-name.


Perhaps the OP should switch to ZFS:

https://en.wikipedia.org/wiki/ZFS#Capacity

"ZFS is a 128-bit file system, so it can address 1.84E+19 times more 
data than 64-bit systems such as Btrfs. The maximum limits of ZFS are 
designed to be so large that they should never be encountered in 
practice. For instance, fully populating a single zpool with 2**128 bits 
of data would require 3.0E+24 TB hard disk drives.

Some theoretical limits in ZFS are:

     16 exbibytes (2**64 bytes): maximum size of a single file
     2**48: number of entries in any individual directory
     16 exbibytes: maximum size of any attribute
     2**56: number of attributes of a file (actually constrained to 
2**48 for the number of files in a directory)
     2**56 quadrillion zebibytes (2**128 bytes): maximum size of any zpool
     2**64: number of devices in any zpool
     2**64: number of file systems in a zpool
     2**64: number of zpools in a system"


David