lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 5 Feb 2013 14:06:14 +0100 (CET)
From:	Lukáš Czerner <lczerner@...hat.com>
To:	Tvrtko Ursulin <tvrtko.ursulin@...lan.co.uk>
cc:	Prashant Shah <pshah.mumbai@...il.com>, linux-ext4@...r.kernel.org
Subject: Re: Maximum number of directories

On Mon, 4 Feb 2013, Tvrtko Ursulin wrote:

> Date: Mon, 04 Feb 2013 13:36:29 +0000
> From: Tvrtko Ursulin <tvrtko.ursulin@...lan.co.uk>
> To: Prashant Shah <pshah.mumbai@...il.com>
> Cc: linux-ext4@...r.kernel.org
> Subject: Re: Maximum number of directories
> 
> On Monday 04 February 2013 18:49:54 Prashant Shah wrote:
> > Hi,
> > 
> > On Mon, Feb 4, 2013 at 4:25 PM, Tvrtko Ursulin
> > 
> > <tvrtko.ursulin@...lan.co.uk> wrote:
> > > I was creating such a (crazy?) tree and hit -ENOSPC at ~31 million
> > > directories created in total with df showing only 40% use:
> > > 
> > > Inode count:              29868032
> > > Free inodes:              29848131
> > 
> > Since, each directory will use a inode entry, there is some mismatch
> > with ~31 million directories and 19901 inodes in use. The inode usage
> > count should be much larger. You have max 29 million inodes available
> > - so max can be 29 million directories.
> 
> Yeah, I totally forgot about the inode situation on ext filesystems. So is 
> tune2fs giving wrong stats for live (mounted) filesystems?

Not sure what situation you're referring to. Directory as any other
file is represented by an inode and there is a limited number of
inodes in the file system.

Using tune2fs on live/mounted file system is bad idea and the
information might not be correct (exactly for this reason it is
_NOT_ recommended to run fsck on live file system). Use 'df -i' if
you want to get information about inode count.

And to answer your previous question, yes the number of directory
entries is limited. The number depends on the size of the directory
entries (the name of the file) and the size of the file system
block. From my calculation on 4k file system it can hold 3870945
files with 255B long filenames in the single directory in the ideal
case, please correct me if I am wrong.

Unfortunately the problem might appear as the directory hash tree
gets more fragmented which will limit the number of directory
entries it can hold - this can be fixed with e2fsck -D.

Thanks!
-Lukas
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ