Re: ext3: deleting files doesn't free up space

From: Daniel K.
Date: Mon Jan 10 2011 - 01:16:15 EST


Dan Carpenter wrote:
I filled up my partition last night.
I deleted 5 gigs of movies.
The "Used" number went down to 125G.
The "Free" number stayed at 0.
I rebooted the system but it's still the same.

$ echo foo > foo
bash: echo: write error: No space left on device

$ df .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 136236548 130363620 0 100% /media/old_sys

Check out the -m option to tune2fs, which sets the reserved-blocks-percentage for the FS - the percentage of blocks reserved to the super user, which is 5% by default.

Presumably, root has filled the partition completely, and 5G worth of deleted user data is not enough to get under the 5% limit to allow for new data to be written by users.

As this partition is used for /home you might as well turn the feature off, as root should not need to have space reserved in that area of the filesystem.

tune2fs -m 0 /dev/sda1

should give regular users access to the reserved blocks.


Daniel K.
--
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/