Giant Swap File fills hard drive to capacity

1

Today I had a most odd experience on our student computing server. Suddenly, you could not save a file and you got a "file system full" message. So I did a du -sh on all user directories to see what was happening. I discovered a home directory with nearly 12G in it.

I subsequently entered the home directory and found a swap file of enormous size. I deleted it. After the deletion, the directory was quite small, under 1M. What could have caused this to happen? Our network has been pogoing up and down quite a bit recently.

ncmathsadist

Posted 2014-12-17T22:55:35.080

Reputation: 313

1What do you name a "swap file"? It is for sure not the system swap of the memory management (this one uses a dedicated partition, and for sure does not write anything in a home directory). What was the file name? vim creates files with a .swp extension when editing files, for example. – Ale – 2014-12-17T23:00:54.873

It was an ordinary text file of small size that generated this huge swap file. This was not generated by the user, it was generated by the system in a moment of malfunction. It had a .swp extension. It was far too big to open and it had to be removed, as the file system was in vapor lock. – ncmathsadist – 2014-12-17T23:09:06.527

1You might consider using disk quotas to prevent a single user filling the disk. I started using that on our server years ago because of a similar problem (an error log file growing to the whole disk...). – Ale – 2014-12-17T23:12:51.440

No answers