mkdir(): Too many links in * on line *

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)

By now I’m working on an foto upload script and encountered the following error:

mkdir(): Too many links in * on line *

When I took a deeper look at it I discovered sth:

shell # ls -d */ | wc -l

my command counts all (sub)directories in the current directory

Then I typed that number into google and found the following:
“You can’t have more than 31,998 subdirectories in any given directory on an ext3 file-system.”

So as I look it the issue could just be resolved be improving the directory structure.
If you have another idea just leave me a comment πŸ˜‰

Another way to resolve it would to mount the data system as ext4.
But sure you should convert it first. Be sure that you’ve a backup before you migrate to ext4 file system. It also resolves the issue because ext4 doesn’t have such limits.
Sadly for migrating it you’ve to unmount it,…

So far that are all possible solutions πŸ™‚

This entry was posted in Linux, PHP. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *