Re: Strange Linux behaviour!?

From: DervishD
Date: Fri May 07 2004 - 19:42:21 EST


Hi Timothy :)

* Timothy Miller <miller@xxxxxxxxxxxxxx> dixit:
> >?Have you checked whether you're out of inodes?
> What happens when Linux runs out of inodes?

It returns ENOSPC on write operations on the filesystem.

> Why would it?

Because you created lots of dirs and files ;)

> Doesn't it create more?

EXT2 and EXT3 doesn't, the number of inodes is specified when doing
mke2fs and it's fixed. Don't know what happens under other
filesystems, but for me doesn't make much sense to create more
inodes: inodes themselves occupy disk space, and if you've run out of
inodes, you probable are near to run out of disk space too. Moreover,
disk structures are a bit complex and adding inodes is not an easy
task in most filesystems :?

I've been seeing this problem lately on myself. I have a disk to
store temporarily backups and large files in general, so I formatted
it with ext2 using one inode per megabyte of data. This filesystem
usually have 10-50 files, no more, and even with 1/1MB inode ratio,
there were more than 10000 inodes. But when I accidentally
uncompressed one of the backups in the disk, I run out of inodes
*FAST*. I mean, the disk was 80% empty and I didn't have free inodes,
but this is not the common case, since usually you will have an inode
per 4kB of data, so if you don't have free inodes it will usually
mean that your disk space will exhaust soon, too. This is the common
case, I think, so it doesn't worth the effort of adding a few more
inodes just for making the agony longer ;)

Raúl Núñez de Arenas Coronado

--
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/