From: Stephen Tweedie (sct@dcs.ed.ac.uk)
Date: 05/07/93


From: sct@dcs.ed.ac.uk (Stephen Tweedie)
Subject: Re: Where did my swap-file memory go?
Date: Fri, 7 May 1993 20:41:18 GMT


> Please help me to get my hard disk space back! I used to have a swap
> file of size 6M. Then I decided that 6M is not enough, so I "rm" the
> old swap file, and add in another 10M swap file. According to my
> calculation, I should have 10-6=4M less hard disk space. However,
> when I use df to check, I have 10M less hard disk. In another word,
> "rm" does not really delete the file for me. Could someone tell me
> what is happening here and how I can get the 6M disk memory back?
> Thanks in advance.

In general, whenever you have wierd filesystem behaviour like this,
the first thing to do is to reboot and run "fsck" on the partition (or
xfsck, e2fsck or whatever, depending on the filesystem type).

Another problem might be that you have linked your swap file to
/dev/swap - this was common on older Linux releases. In this case you
should just delete /dev/swap.

Cheers,
 Stephen Tweedie.