# Problem with ext4

## Martux

Hello!

I was playing with the new gentoo-sources-2.6.28 and new ext4 support.

I have a 2GB partition for portage which i formatted with ext4. During resyncing the tree i got an error "no space left on device" even over 1GB was still free. What went wrong? What are the recommended mount options to get the best out of ext4? ATM i am using reiserfs(3) for the portage tree partition. Does switching to ext4 even make sense?

----------

## Hu

Perhaps you ran out of inodes?

----------

## Martux

Shouldn't mkfs.ext4 take care of this automagically?

How many inodes should be set for a 2GB portage partition?

----------

## outermeasure

 *Martux wrote:*   

> Shouldn't mkfs.ext4 take care of this automagically?
> 
> How many inodes should be set for a 2GB portage partition?

 

The portage main tree uses something around to 130k inodes, so you should give it a bit more, say 200k?

----------

## Ian

I just ran into this same problem...any definite solutions?

----------

## SlashBeast

Its ext4 bug imho, i have the same problem, 70% free space and no space free error, forced fsck solved problem (fsck from fstab says something about "no problems found".)

----------

## Hu

 *Martux wrote:*   

> Shouldn't mkfs.ext4 take care of this automagically?

 

No.  mkfs.ext4 has no way to guess whether you are using this partition to store huge numbers of small files or small numbers of huge files.  The two workloads require different inode/size ratios.

 *SlashBeast wrote:*   

> Its ext4 bug imho, i have the same problem, 70% free space and no space free error, forced fsck solved problem (fsck from fstab says something about "no problems found".)

 

This could be a different problem.  An inode shortage will not be fixed by anything short of adjusting the inode/size ratio.  An fsck will not do this, so if fsck fixes it, you have some other problem.

----------

