Hello Matt,

Matt Jarvis:
> then I have a seperate application which copies down the logfiles from
> the tmpfs into the bottom layer of the aufs, and then deletes the copy
> from the tmpfs. My problem is that the aufs mount seems to do some
> cacheing so that over time the tmpfs fills up. Even when I stop the
> application and remove all files from the tmpfs, it still shows as
> having disk space used, until I unmount and remount the aufs. It takes a
> long time to fill up, perhaps 3-4 days of operation, so the amount of
> data is small. 

Generally, disk space for a file is not be de-allocated even if the file
is deleted, as long as the file is in-use.
For example,
{
        fd = open("file");
        err = unlink("file");
        sz = read(fd);
        sz = write(fd);
}
read/write after unlink(2) will not cause an error, since the disk
blocks for the "file" is not deallocated. In this case, when close(fd)
is issued, the file and the disk space for it is totally removed.

If any of your system processes opened the logfile, you need to stop
all of such process in order to free the disk space.


> My mount options are 
> 
> mount -t aufs -o dirs=/vid/ram/00:/vid/00/logs_rw
> udba=reval /vid/00/logs

I'd like to suggest to enable CONFIG_INOTIFY and CONFIG_AUFS_HINOTIFY,
and specify 'udba=inotify' aufs mount option, since you are modifying
files on the branches directly.
But inotify is unrelated to the disk space essentially.


Junjiro Okajima

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Reply via email to