mkdir: Too many links

  • Follow


Hello,

I noticed that there is a limit on the amount of links (or directories) 
in a directory. Apparently a directory can contain about 2^15 
subdirectories (32765) but after that the following message appears:

mkdir: Failed to make directory "blah"; Too many links

I'm running Solaris 9 4/03 64bit with kernel patch 117171-17. This all 
takes place on UFS filesystem on SVM device.

Is this limit a limit of UFS or Solaris?
Are there other filesystems available that do not have this limit or do 
have a higher limit?
Can this be tuned somehow?

Regards,
Frank
0
Reply Frank 2/8/2005 4:32:14 PM

Jay G. Scott wrote:
[...]
> 
> yes.
> 
> RTM:  specifically, mkfs, tunefs, newfs, and similar.  i know it's there but i
> haven't had to do it, so where it is, i don't remember.  there's a default
> number of inodes determined by file system size, and you're going
> to alter that.
> 
> j.
> 
[]

I know about the inode density (-i option to newfs), but that is not the 
problem here. There are lots of inodes free on the filesystem, but the 
thing is that in a "directory" there can only be 2^15 subdirectories or 
links. This is another limit.

Regards,
0
Reply Frank 2/8/2005 5:07:02 PM


Frank <no@spam.org> wrote:
> Hello,

> I noticed that there is a limit on the amount of links (or directories) 
> in a directory. Apparently a directory can contain about 2^15 
> subdirectories (32765) but after that the following message appears:

> mkdir: Failed to make directory "blah"; Too many links

> I'm running Solaris 9 4/03 64bit with kernel patch 117171-17. This all 
> takes place on UFS filesystem on SVM device.

> Is this limit a limit of UFS or Solaris?

UFS.

> Are there other filesystems available that do not have this limit or do 
> have a higher limit?

No.

> Can this be tuned somehow?

No.  It's fundamental.  The inode contains the number of links for each
inode.  Creating a subdirectory means increasing the link count of the
parent directory.  At some point, the limit of the number of links that
the inode can record is reached.

You would have to change the on-disk format of an inode to modify it.

http://groups-beta.google.com/group/comp.unix.solaris/browse_thread/thread/b3fedfc2f09af135
-- 
Darren Dunham                                           ddunham@taos.com
Senior Technical Consultant         TAOS            http://www.taos.com/
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >
0
Reply Darren 2/8/2005 5:17:52 PM

Darren Dunham <ddunham@redwood.taos.com> wrote:
>> Are there other filesystems available that do not have this limit or do 
>> have a higher limit?

> No.

Oops.  Read that wrong.

Actually, I don't know what limits are present in other filesystems
(other than VxFS appears to have the same one).

QFS/SAM-FS.. ??
Multi-TB UFS.. ??

ZFS may well remove that limit.

-- 
Darren Dunham                                           ddunham@taos.com
Senior Technical Consultant         TAOS            http://www.taos.com/
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >
0
Reply Darren 2/8/2005 5:24:26 PM

In article <4208e98d$0$28978$e4fe514c@news.xs4all.nl>,
Frank  <no@spam.org> wrote:
>Hello,
>
>I noticed that there is a limit on the amount of links (or directories) 
>in a directory. Apparently a directory can contain about 2^15 
>subdirectories (32765) but after that the following message appears:
>
>mkdir: Failed to make directory "blah"; Too many links
>
>I'm running Solaris 9 4/03 64bit with kernel patch 117171-17. This all 
>takes place on UFS filesystem on SVM device.
>
>Is this limit a limit of UFS or Solaris?
>Are there other filesystems available that do not have this limit or do 
>have a higher limit?
>Can this be tuned somehow?

yes.

RTM:  specifically, mkfs, tunefs, newfs, and similar.  i know it's there but i
haven't had to do it, so where it is, i don't remember.  there's a default
number of inodes determined by file system size, and you're going
to alter that.

j.

>
>Regards,
>Frank


-- 
Jay Scott		512-835-3553		gl@arlut.utexas.edu
Head of Sun Support, Sr. Operating Systems Specialist
Applied Research Labs, Computer Science Div.                   S224
University of Texas at Austin
0
Reply gl 2/8/2005 5:51:14 PM

Frank <no@spam.org> writes:

>I noticed that there is a limit on the amount of links (or directories) 
>in a directory. Apparently a directory can contain about 2^15 
>subdirectories (32765) but after that the following message appears:

Correct.

>mkdir: Failed to make directory "blah"; Too many links

>I'm running Solaris 9 4/03 64bit with kernel patch 117171-17. This all 
>takes place on UFS filesystem on SVM device.

>Is this limit a limit of UFS or Solaris?

UFS.

>Are there other filesystems available that do not have this limit or do 
>have a higher limit?

"ZFS" (which doesn't exist yet).

>Can this be tuned somehow?

No.

Casper
-- 
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
0
Reply Casper 2/8/2005 7:56:41 PM

In article <4208e98d$0$28978$e4fe514c@news.xs4all.nl>, Frank wrote:
> [UFS link limit per d]

OK, the others answered this already...

> Can this be tuned somehow?

The tuning I'd do is have a *lot* less than 32K links in a dir, as
some programs (and not just the exotic ones, see below) start behaving
ill with directories a lot smaller.

I have seen ls routinely SEGV on bigger directories, and node lookup
doesn't get faster by size, in my experience, although I don't know
which function governs the runtime of this...I mean the notation with
O(function(n)), IYKWIM; I don't know how that's called in English.

But maybe someone who understands this better than me cares to comment
on the robustness/performance issues involved..? 

lg, Bernd
-- 
There was only one road back to L.A.
0
Reply Bernd 2/9/2005 12:02:19 PM

Casper H.S. Dik wrote:
>>Is this limit a limit of UFS or Solaris?
> 
> 
> UFS.
> 
> 

Casper,

just curious:

Is there a similar limit for files (e.g. hard links)?

regards

Bernd
0
Reply Bernd 2/9/2005 7:06:29 PM

Bernd.Schemmer wrote:
> Casper H.S. Dik wrote:
> 
>>> Is this limit a limit of UFS or Solaris?
>>
>>
>>
>> UFS.
>>
>>
> 
> Casper,
> 
> just curious:
> 
> Is there a similar limit for files (e.g. hard links)?
> 
> regards
> 
> Bernd

I think its the exact same thing. So yes.

Regards,
Frank
0
Reply Frank 2/9/2005 8:59:28 PM

Bernd Haug wrote:
[]
> The tuning I'd do is have a *lot* less than 32K links in a dir, as
> some programs (and not just the exotic ones, see below) start behaving
> ill with directories a lot smaller.
[]


I fully agree, and am especially concerned about the 'restore from tape' 
times.

Thanx all who replied.

Frank
0
Reply Frank 2/9/2005 9:04:13 PM

Bernd.Schemmer <bnsmb@online.de> wrote:
> Casper H.S. Dik wrote:
>>>Is this limit a limit of UFS or Solaris?
>> 
>> 
>> UFS.
>> 
>> 
> 
> Casper,
> 
> just curious:
> 
> Is there a similar limit for files (e.g. hard links)?

A link is a link, regardless of what file type. So the limit on regular
files (or pipes, device nodes, you could even hardlink symlinks, etc.) is
the same.

-- 
Daniel

0
Reply D 2/9/2005 9:24:49 PM

"Bernd.Schemmer" <bnsmb@online.de> writes:

>just curious:

>Is there a similar limit for files (e.g. hard links)?

Yes; that is the limit (the number of hardlinks to a file or
directory)

Casper
-- 
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
0
Reply Casper 2/10/2005 7:49:39 AM

11 Replies
1139 Views

(page loaded in 3.003 seconds)

Similiar Articles:













7/20/2012 6:29:42 AM


Reply: