Ext3 problem

From: Kasper Dupont (kasperd_at_daimi.au.dk)
Date: 09/29/04


Date: Wed, 29 Sep 2004 23:01:43 +0200

Assume I execute this shell code.
  touch _ ; while ln _ $(uuidgen) ; do true ; done
A stupid thing to do I know, but still I think it
ought to be possible to clean up after doing this.

Eventually the code will give me an error about no
more diskspace. At that point removing all the
links actually doesn't help on an ext3 filesystem.
Even if I remove all the links I just created, the
disk space is still used.

It seems I can only free the space by creating a
new directory and moving the remaining contents to
the new directory, and finally removing the old
directory. Let's for a moment ignore the fact that
I couldn't create the new directory due to lack of
disk space, and instead consider a more fundamental
problem.

If I had executed the code in my home directory, I
cannot clean up myself. I would need to contact an
administrator and have him create a new home
directory for me and move all the files in order
for the disk space to be freed again.

Even worse if the shell code was executed in the
root of a filesystem. Typically only root can do
that, but some people might use a seperate filesystem
for /tmp. In that case there seems to be no way to
free the disk space again except from mkfs.

Can it really be true, that there is a way to allocate
space on an ext3 filesystem, that can only be freed
again by the use of mkfs? And are there any suggestions
on how to improve on this?

-- 
Kasper Dupont


Relevant Pages

  • Re: Lost 6gb Hard drive space?
    ... Enquire, plan and execute. ... Please tell the newsgroup how any ... > Two days ago I checked my remaining disk space and it said that I had 20gb ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Desktop file is replicated on every start
    ... Enquire, plan and execute ... I just ran out of disk space on drive C, ...
    (microsoft.public.windowsxp.help_and_support)