Re: How many directories can I have ?

From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 10/26/04


Date: Mon, 25 Oct 2004 20:23:05 -0400

In article <c99d2c79.0410251534.65a50464@posting.google.com>,
 see_my_signature_for_my_real_address@hotmail.com (Dr. David Kirkby)
 wrote:

> I have a Sun SPARC 20 running Solaris 9, fitted with a 9 GB disk. How
> many directories am I likely to be able to create on a file system
> before running out of inodes, or inducing other problems? I suspect
> there will be some limit that cuts in before disk space is exhausted.
>
> I know a few years ago seeing some odd warnings from a sytem at work
> which looked to me like a hardware failure. I emailed the sytem admin,
> who replied he thought the system was out of inodes. I can't recall
> what the symptons were, but it made me a little concerned yesterday,
> when I had a need to create 10000 or so directories.

There's no particular limit to directories. They use the same pool of
inodes as other files. If a filesystem has 10,000 inodes, you could
have 5,000 directories and 5,000 files, 1,000 directories and 9,000
files, or even 9,000 directories and 1,000 files (in this case, most of
the directories will probably be empty, unless the files have hard links
in several different directories).

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


Relevant Pages

  • Re: SMP on FreeBSD 6.x and 7.0: Worth doing?
    ... It'd be easy to rewrite it from scratch if IFS were recovered. ... In the slightly less intrusive Arla view of the world, cache files do appear in the UFS name space, but an independent namespace is maintained by the cache manager, each with two file system names: a normal path, and its NFS file handle, which can be used to open, stat, etc, the file without a normal file system namespace operation. ... The user application can allocate a set of inodes in some arbitrary directory tree using normal operations, but when it does so also query the NFS file handles for the files using getfh. ...
    (freebsd-stable)
  • Re: journaling fs and large mailbox format
    ... newfs'ing of the file system will be necessary. ... create a new data disk, formatted to fit your specs, then copy the data ... I'm not convinced that increasing the number of inodes in this way would be ... without seeing the files), that the inode problem is a symptom, and that ...
    (freebsd-hackers)
  • Designing Another File System
    ... I've been interested in file system design for a while, ... - - localization of Inodes and related meta-data to prevent disk thrashing ...
    (Linux-Kernel)
  • GPFS synchronous mirroring not working, maybe?
    ... nsd's using mmchdisk, when I created a file on the file system, it was ... sfs -r, ... LIVDB2# lslpp -L | grep gpfs ... Number of allocated inodes: 6168094 ...
    (comp.unix.aix)
  • Re: How many directories can I have ?
    ... > many directories am I likely to be able to create on a file system ... I suspect ... I emailed the sytem admin, ... > who replied he thought the system was out of inodes. ...
    (comp.sys.sun.admin)