Re: disk full or not? you decide...

Andreas Dilger (adilger@turbolinux.com)
Wed, 11 Jul 2001 14:16:42 -0600 (MDT)


Shawn Veader writes:
> we are using reiserfs on a system running 2.4.3 we noticed recently
> that the partition reported itself as being full. after a reboot
> the system reported having 6G freed. now again after a day of use
> the space has dissappered.
> ----
> does anyone know why this is happening? our guess is that the logs
> to reiser are getting quite large. how do we flush them and force
> a garbage collection? we save and remove several large files on this
> partition as the system is running. therefore, i figure that the
> space is kept around till the log is flushed in case it is needed for
> replaying the journal. am i totaly off?

The problem is that something is keeping these files open, and the
space cannot be freed until the process exits (or closes the files).
You can use lsof to tell you which files are open, and which process is
using them. If it is your own code that is causing this problem, you
need to ensure that you close all of the files that you open when you
are done with them.

The reiserfs journal is a fixed size, so it cannot be that.

Note also that on reiserfs, if you have such a process which keeps
files open after they are deleted and then you have a crash, the file
is "orphaned" and the space is "lost" until you run reiserfsck again.
It may be that Chris Mason's patch for this is in the latest kernels,
but it may not be, and it might not be in the kernel you are running.

Cheers, Andreas

-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/