From: Tony Walton on
User-Agent: Unison/1.5.2

On 2005-02-08 17:51:14 +0000, gl(a)csdsun1.arlut.utexas.edu (Jay G. Scott) said:

> In article <4208e98d$0$28978$e4fe514c(a)news.xs4all.nl>,
> Frank <no(a)spam.org> wrote:
>> Hello,
>>
>> I noticed that there is a limit on the amount of links (or directories)
>> in a directory.

{snip}
>> Can this be tuned somehow?
>
> yes.

... is the wrong answer.

The link count for a directory (or in fact for any file on a UFS
filesystem) is limited to 32767, as the link count in the inode is a
short int (see /usr/include/sys/fs/ufs_inode.h). This means you can
have a maximum of 32765 subdirectories in a directory (the other two
links already being taken by '.' and '..').

--
Tony

From: Roland Mainz on
Tony Walton wrote:
> > In article <4208e98d$0$28978$e4fe514c(a)news.xs4all.nl>,
> > Frank <no(a)spam.org> wrote:
> >> Hello,
> >>
> >> I noticed that there is a limit on the amount of links (or directories)
> >> in a directory.
>
> {snip}
> >> Can this be tuned somehow?
> >
> > yes.
>
> .. is the wrong answer.
>
> The link count for a directory (or in fact for any file on a UFS
> filesystem) is limited to 32767, as the link count in the inode is a
> short int (see /usr/include/sys/fs/ufs_inode.h). This means you can
> have a maximum of 32765 subdirectories in a directory (the other two
> links already being taken by '.' and '..').

How will ZFS deal with the problem ? Just increase the datatype for the
link counter to 2^32 or 2^64 or will a completely different approach be
used ?

----

Bye,
Roland

--
__ . . __
(o.\ \/ /.o) roland.mainz(a)nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 7950090
(;O/ \/ \O;)
From: Casper H.S. Dik on
Frank <no(a)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.
From: Joerg Schilling on
In article <42090D9D.24472664(a)nrubsig.org>,
Roland Mainz <roland.mainz(a)nrubsig.org> wrote:

>> The link count for a directory (or in fact for any file on a UFS
>> filesystem) is limited to 32767, as the link count in the inode is a
>> short int (see /usr/include/sys/fs/ufs_inode.h). This means you can
>> have a maximum of 32765 subdirectories in a directory (the other two
>> links already being taken by '.' and '..').
>
>How will ZFS deal with the problem ? Just increase the datatype for the
>link counter to 2^32 or 2^64 or will a completely different approach be
>used ?

There is a completely different approach that works on UNIX (my Masther Thesis
http://cdrecord.berlios.de/old/private/wofs.ps.gz) and I believe that the
way UNIX used to do it, is completely brain damaged.

In my WOFS, a directory is just an empty special file that says: "I am a
child of this directory".

If I remember my discussion with Jeff Bonwick correctly, ZFS does not
have '.' & '..', simular to my wofs. As I did tell Jeff that my WOFS
does not even have '.' & '..' in the readdir() result, I remember
he told me that zfs synthesizes the these entries.

--
EMail:joerg(a)schily.isdn.cs.tu-berlin.de (home) Jýrg Schilling D-13353 Berlin
js(a)cs.tu-berlin.de (uni)
schilling(a)fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily