Issue
- Creation of new folder fails with IOException
- I have hit the underlying operating system's limit for the number of files/subfolders per folder. With FileSystemStore or AdvancedFileSysteStore you can run into this problem.
Environment
- Portal 6.2
- DXP 7.0
- DXP 7.1
Resolution
- Reduce the number of Documents and Media folders in your system
- Migrate to DBStore
- Use an underlying file system that supports more than this limit, or configure the current one to support more (if possible)
As per the wikipedia entry for Ext4:
Unlimited number of subdirectoriesExt4 allows an unlimited number of subdirectories.
(In ext3 a directory can have at most 32,000 subdirectories.)[[15]|https://en.wikipedia.org/wiki/Ext4#cite_note-15] To allow for larger directories and continued performance, ext4 turns on HTree indices (a specialized version of a B-tree) by default. This feature is implemented in Linux 2.6.23. In ext3 HTrees can be used by enabling the dir_index feature.
As per Ext4 configurations:
dir_index
Use hashed b-trees to speed up name lookups in large directories. This feature is supported by ext3 and ext4 file systems, and is ignored by ext2 file systems.
dir_nlink
Normally, ext4 allows an inode to have no more than 65,000 hard links. This applies to regular files as well as directories, which means that there can be no more than 64,998 subdirectories in a directory (because each of the '.' and '..' entries, as well as the directory entry for the directory in its parent directory counts as a hard link). This feature lifts this limit by causing ext4 to use a link count of 1 to indicate that the number of hard links to a directory is not known when the link count might exceed the maximum count