Keith Owens <kaos@xxxxxxx> writes:
> On Tue, 23 Sep 2003 10:43:07 +0200,
> Nicolas Kowalski <Nicolas.Kowalski@xxxxxxx> wrote:
>>We have several servers here using XFS filesystems ; they work
>>perfectly well, except for one of them, reporting a wrong filesystem
>>space usage. It seems that this filesystem grows everyday since its
>>installation last July. No reboot has been done since 54 days (and I
>>would not like to do one, as it is an important production server).
>>
>>Here are the details:
>>
>>Linux olan 2.4.21-xfs-olan #1 Wed Jul 30 09:29:56 CEST 2003 i686 unknown
>>
>>olan:/var# df .
>>Filesystem 1k-blocks Used Available Use% Mounted on
>>/dev/sda4 5750784 4388576 1362208 77% /var
>>
>>olan:/var# du -s
>>2692296 .
>
> There is a file on /var that has been deleted (does not appear in du)
> but is still being written to by a program so it still occupies disk
> space (appears in df). Not an XFS problem, this occurs with all file
> systems. 'lsof /var' will tell you which files are open on /var.
That's it. I found the following lines in the `lsof /var` output:
postmaste 300 postgres 1w REG 8,4 1713276353 13514284
/var/log/postgres.log.1 (deleted)
postmaste 300 postgres 2w REG 8,4 1713276353 13514284
/var/log/postgres.log.1 (deleted)
So, when I restarted PostgreSQL, the filesystem was cleaned up.
Thanks a lot !
--
Nicolas
|