We cannot create more than 65000 sub-directories on a ext4 file systems and one suspicion we have is that the directory was created with an older version of ext4 or a different feature set.
I know how to find some basic information:
> stat .
File: ‘.’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 801h/2049d Inode: 2 Links: 24
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2017-12-04 09:41:00.892098776 +0000
Modify: 2017-12-04 09:58:37.576216794 +0000
Change: 2017-12-04 09:58:37.576216794 +0000
Birth: -
I'm interested in the more detailed ext4 flags, e.g. if the directory is linear or hash-based.
How can we view the settings of the inode, e.g. the flags?
Use
stat
on the directory.However you are actually hitting a limit of the file system and this can cause performance issues with your storage. The common solution is to partition your namespace in a more structured way, or, depending on what your requirements are, a more flexible filesystem such as xfs, zfs or btrfs.
With the tool debugfs I was able to extract some more information:
And for determining if a directory is linear or hash-based (I guess one could also parse the flags above):