[CentOS] Re: too many links error when creating directories

Fri Sep 28 05:12:55 UTC 2007
Robert Nichols <rnicholsNOSPAM at comcast.net>

chitgoks wrote:
> hi , our centos os has an ext3 file system. and i cant create any more
> directories, it gives me a too many links error, even when doing a manual
> mkdir.
> is there any workaround for this? without changing it to a different file
> system like reiserFS? we dont have a reiserfs module in the os so it will
> have to be installed. and can it be possible to install a reiserFS without
> having to reformat the os? just mount it after installing? please advise

The issue is the link count in the inode for the parent directory.  Each
subdirectory has a ".." link that points back to the parent, and the
maximum link count for an inode in an EXT2 or EXT3 filesystem is 32000.
A directory begins life with a link count of 2, so there is a hard limit
of 31998 subdirectories.

The limit for reiserfs is larger (max unsigned integer - 1000), so that
would avoid the problem.  Yes, you can certainly create a reiserfs
filesystem and mount it without having to reformat other filesystems on
your machine.  You will lose whatever data was on the partition that
you reformat.

Bob Nichols     "NOSPAM" is really part of my email address.
                 Do NOT delete it.