Strange Diskspace Consuming

Home » CentOS » Strange Diskspace Consuming
CentOS 3 Comments

Hi,

I do a tgz-backup some maildir-folders with n*1000 off files and a lot of GB in storage. The backuped maildirs are removed after the tar.

My assumption was, that the free diskspace should be bigger after that, but from what I get with df, it looks like I’m loosing space.

Currently the tgz is saved on the same disk/mountpoint.

Any hint, why removing the maildirs dont free diskspace as expected?

It is still an ext3 filesystme

Regards and thanks for hints . Götz

3 thoughts on - Strange Diskspace Consuming

  • The files might still be in use by some process and in that case the space will not be freed until that process closes the files.

    Try this:
    lsof -nn|grep deleted

    That shows all files that are still in use by a process but are marked as deleted on the filesystem.

    Regards, Dennis

  • There are a few things you should be measuring:

    1: how much space does the maildir consume?
    2: how much space does the backup tar.gz consume?
    3: what is the growth rate of maildirs during the backup?

    The growth rate is something you should monitor continuously. The others you can, potentially, measure during the backup. Call “df” and
    “du -s /maildirpath” before the backup, and again after the archives are made, and again after the maildirs are removed.