Thanks, David.
Unfortunately, it's not limited to ext3. Happens in ext4 as well.
The commands:
mkdir -p /tmp/test/loop
cd /tmp/test
dd if=/dev/zero bs=1M count=1000 of=ext4.img
mkfs.ext4 -F -b 1024 -i 2048 ext4.img
mount -o loop ext4.img loop
mkdir loop/tmp
cd loop/tmp
nice -n 20 seq 1 500000 | nice -n 20 xargs touch >& /dev/null
ls -U | wc -l
date
grep warn /var/log/kern.log | tail -2
df -i .
df -h .
The output from the last five lines:
+ ls
+ wc -l
499310
+ date
Wed May 26 17:53:41 EDT 2010
+ grep warn /var/log/kern.log
+ tail -2
May 26 17:53:41 mnx-lucid kernel: [1405455.069927] EXT4-fs warning
(device loop0): ext4_dx_add_entry: Directory index full!
May 26 17:53:41 mnx-lucid kernel: [1405455.086388] EXT4-fs warning
(device loop0): ext4_dx_add_entry: Directory index full!
+ df -i .
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/loop0 512000 499322 12678 98% /tmp/test/loop
+ df -h .
Filesystem Size Used Avail Use% Mounted on
/dev/loop0 875M 30M 796M 4% /tmp/test/loop
Yes, a solution is to have larger block sizes. However, the file
system that is exhibiting this issue already has 4096 byte blocks.
And Linux can't mount a filesystem via the loopback with a blocksize
larger than 4096.
# mkfs.ext3 -F -b 8192 -N 1000000 fs.img
# tune2fs -l fs.img | grep -i 'block size'
Block size: 8192
# mount -o loop fs.img loop
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
# dmesg | tail -1
[1408478.274638] EXT3-fs: bad blocksize 8192.
The quick solution seems to be to create one or more subdirectories
and move some of the files into them.
Regards,
- Robert
On Wed, May 26, 2010 at 4:59 PM, David Dooling
<[email protected]> wrote:
> On Wed, May 26, 2010 at 03:42:01PM -0500, Mike B. wrote:
>> gotcha. I wonder if the file system itself is corrupt?
>
> Looks like it is just a limit of ext3.
>
> http://kerneltrap.org/mailarchive/linux-kernel/2008/5/18/1861684
>
> Looks like the workaround is to use a bigger block size.
--
Central West End Linux Users Group (via Google Groups)
Main page: http://www.cwelug.org
To post: [email protected]
To subscribe: [email protected]
To unsubscribe: [email protected]
More options: http://groups.google.com/group/cwelug