SUMMARY: AdvFS restriction ? Can't create more than 32768 directories !

From: Claude Scarpelli <claude_at_genoscope.cns.fr>
Date: Fri, 06 Apr 2001 18:36:18 +0200

The problem : when a directory contains 32678 directories, there is no
ways to create any additional directory or file ! I'm running 4.0F,
file system type is AdvFS. I think this is an AdvFS restriction, since
I'm not aware of such a restriction in UNIX (POSIX). I've been unable
to find a reference to this restriction in the Releases Notes. Did I
miss something ?


Answers:

1) Yes, there is a restriction, probably a Tru64 v4.0 restriction. The
   problem comes from the link count number stored in the inode of the
   parent directory. In Tru64 v4.0, this link count is stored in a
   signed short variable, leading to a 2**15 limit (see
   /usr/include/sys/vnode.h).

2) Tru64 v5 stores this link count number in an unsigned short variable,
   leading to a 2**16 limit (see /usr/include/sys/vnode.h and
   /usr/include/sys/types.h).

3) Just to let you know, Solaris 2.6 stores this link count in an
   unsigned long value (32 bits).

4) These limits should be mentionned in the Releases Notes. Compaq
   people asked me to report it to the documentation maintainer. I'll
   do.

5) In Tru64 v4.0, there is propably a bug which prevent to create a
   file when 32766 directories have already been created (see the end
   of my original message). This bug is not present in Tru64 v5. I've
   been asked by Compaq people on the list to report it to my local
   Compaq support. I'll do.



I thank all the people who answer, especially Compaq people.

Original message:

Dear Managers,

The problem : when a directory contains 32678 directories, there is no
ways to create any additional directory or file ! I'm running 4.0F,
file system type is AdvFS. I think this is an AdvFS restriction, since
I'm not aware of such a restriction in UNIX (POSIX). I've been unable
to find a reference to this restriction in the Releases Notes. Did I
miss something ?

vesuvio3$ mkdir /tmp/claude
vesuvio3$ cd /tmp/claude
vesuvio3$ i=1
vesuvio3$ while mkdir d-$i
> do
> i=`expr $i + 1`
> done
mkdir: cannot access directory .
.: No such file or directory
vesuvio3$ ls -1 | wc -l
     32766
vesuvio3$

32766 directories, plus . and .. = 32768 = 2**15 !

vesuvio3$ df -k .
Filesystem 1024-blocks Used Available Capacity Mounted
on
tmp_domain#tmp 1680288 273449 1348456 17% /tmp
vesuvio3$


Look at the strange errno value returned by open(2) :
vesuvio3$ trace touch foo
[.....]
open ("foo", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 (No such file or directory)

open(2) returns -1, and errno is set to ENOENT.


I'm pretty sure I have directories that contains more than 32768
files.

Can someone comment on that ?



-- 
------------------------------------------------------------------------------
Claude Scarpelli                            | Defenestrate: to exit a window
Centre National de Séquençage - GENOSCOPE   | onscreen. (Time International
2, rue Gaston Crémieux, F-91000 EVRY FRANCE | Vol 146, No. 20, Nov 13, 1995)
Received on Fri Apr 06 2001 - 16:37:42 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:42 NZDT