[comp.unix.questions] mkdir has stopped working - SCO Xen

neese@adaptx1.UUCP (04/19/91)

>/* ---------- "mkdir has stopped working - SCO Xen" ---------- */
>One of my 386 machines running Xenix 2.3.2 has suddenly refused to let
>any user, including root, from making a directory. The mkdir test command
>generates  
>        mkdir: cannot make directory test
>I can create files ok.
>
>Any clues please!

Check the amount of files/directories in the directory you are trying to
create one in.  If the total is more than 999, the mkdir command will fail.
You can only have up to 1000 entries in each subdirectory.  I don't know
whether this is a file system limit or a limit imposed by mkdir.

			Roy Neese
			Adaptec Senior SCSI Applications Engineer
			UUCP @  neese@adaptex
				uunet!cs.utexas.edu!utacfd!merch!adaptex!neese

nanook@eskimo.celestial.com (Robert Dinse) (04/21/91)

In article <285400001@adaptx1>, neese@adaptx1.UUCP writes:
# #/* ---------- "mkdir has stopped working - SCO Xen" ---------- */
# #One of my 386 machines running Xenix 2.3.2 has suddenly refused to let
# #any user, including root, from making a directory.
# #I can create files ok.
# 
# Check the amount of files/directories in the directory you are trying to
# create one in.  If the total is more than 999, the mkdir command will fail.
# You can only have up to 1000 entries in each subdirectory.  I don't know
# whether this is a file system limit or a limit imposed by mkdir.

     It appears to be a file system limit. I took a "secure mkdir" that was
posted on the net a while back, mutilated it to add yet more security, and
I still can't make more than 999 directories in a directory. My original
intent wasn't to fix that particular problem, but the fact that it does the
same thing (and it calls mknod directly) tells me it's something in the
operating system and not just the mkdir command.

FFAAC09@cc1.kuleuven.ac.be (Nicole Delbecque & Paul Bijnens) (04/22/91)

>In article <285400001@adaptx1>, neese@adaptx1.UUCP writes:
># Check the amount of files/directories in the directory you are trying to
># create one in.  If the total is more than 999, the mkdir command will fail.
># You can only have up to 1000 entries in each subdirectory.  I don't know
># whether this is a file system limit or a limit imposed by mkdir.

It is a system limit: max number of links to a file.
See /usr/include/sys/param.h, where you find something like:
   #define MAXLINK 1000
For every directory you make, you make a link to the parent directory.
--
Polleke   (Paul Bijnens)
Linguistics dept., K. University Leuven, Belgium
FFAAC09@cc1.kuleuven.ac.be

weimer@garden.ssd.kodak.com (Gary Weimer (253-7796)) (04/26/91)

In article <1991Apr24.045214.17664@bilver.uucp>, bill@bilver.uucp (Bill
Vermillion) writes:
|> Is this a problem only under Xenix.
|> 
|> I can create 1000+ files in an Esix directory and then make subdirectories.
|> Or are you saying 1000 directories is the limiting factor.
yes.
|> I don't see this limit in the manual . 

WHAT?!?!?! You think they're going to DOCUMENT something like that?!?!

:-) (I think....)

weimer@ssd.kodak.com ( Gary Weimer )

dkeisen@leland.Stanford.EDU (Dave Eisen) (04/26/91)

In article <1991Apr24.045214.17664@bilver.uucp> bill@bilver.uucp (Bill Vermillion) writes:
>>Check the amount of files/directories in the directory you are trying to
>>create one in.  If the total is more than 999, the mkdir command will fail.
>>You can only have up to 1000 entries in each subdirectory.  I don't know
>>whether this is a file system limit or a limit imposed by mkdir.
>
>Is this a problem only under Xenix.
>I don't see this limit in the manual . 
>

I suspect this is a Xenixism. From the manual for mknod (S):


mknod will fail and the file will not be created if one or more of the 
following are true:

......

  The directory to contain the new file cannot be extended. [ENOSPC].


There is a similar entry for all of the rest of the system calls that
create links (open, creat, link, ...).



-- 
Dave Eisen                           dkeisen@leland.Stanford.EDU
1101 San Antonio Raod, Suite 102     (Gang-of-Four is being taken off the net)
Mountain View, CA 94043
(415) 967-5644