On Saturday 13 November 2004 19:14, James Knott wrote:
Anders Johansson wrote:
On Friday 12 November 2004 21:00, Colin Murphy wrote:
This is with Suse 9.1 on a Reiser filesystem.
Unfortunately I allowed my /tmp directory to fill up and even though I am deleting files I don't seem to be getting any space back.
Note that files that are held open by programs won't be deleted until the programs end, or otherwise close the files
I suppose one solution, would be to run a script at bootup, that deletes files that haven't been accessed in a while.
I don't know if you want to just delete everything, but perhaps a mail to root (or some other admin user) alerting him to the old (or unusually large, or whatever criteria) files might be an idea. But I'm not sure it's a complete solution. First it's a very common optimisation to mount partitions with the 'noatime' flag, to speed up disk accesses, in which case you can't tell when a file was last accessed. And secondly, if there is a process running amok filling up disk space, then the file(s) it creates will have been accessed very recently, perhaps even most recently, so your script would look at every file except the ones actually causing the problem. It is a good idea though to clean up old and unused junk. So setting CLEAN_TMP_DIRS_AT_BOOTUP to "yes" would be a good idea (if your applications store anything in /tmp that they expect to survive a reboot there's something wrong with them anyway), and you probably want to keep a close eye on the directories in /var, especially if you build a lot of rpms (the default temporary install root is in /var/tmp), and there could be runaway log files in /var/log, and it's a very good idea to use quotas on those file systems. If you then run your servers with different users, one server can never cause other servers from running out of space