Where has all my disk space gone?

Barry Margolin barmar at think.com
Wed Apr 24 05:45:11 AEST 1991


In article <1991Apr23.174228.11278 at aucs.AcadiaU.ca> peter at aucs.acadiau.ca (Peter Steele) writes:
>df reports the following:
>
>Filesystem                 Type  kbytes     use   avail %use  Mounted on
>/dev/dsk/ipc1d2s3           ffs  945670  589136  356534  62%  /u2
>
>According to this, we have 589136 kbytes in use on this drive. However,
>du does not seem to agree with df:
>994268  /u2
>
>The total of 994268 blocks in use converts to 497134 kbytes, a difference
>of 92002 kbytes--not a small amount.

If a process opens a file and then deletes it, the file still exists on
disk until all the processes that have it open either close it or die.
This is probably the most common cause of missing disk space.  It can
happen if someone deletes a log file, not realizing that there's still a
process writing to it; the log will continue to grow, and there will be no
way to stop it.

It's also possible that a file system error resulted in orphan files.

The easiest way to recover that space in either case is to shut down and
fsck.  In the first case, a less drastic measure requires finding the
process(es) that have the deleted file(s) open and kill them.

--
Barry Margolin, Thinking Machines Corp.

barmar at think.com
{uunet,harvard}!think!barmar



More information about the Comp.unix.questions mailing list