Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

/tmp 100 percent full fsck or sync ?

Status
Not open for further replies.

GrahamBright

Programmer
Oct 31, 2003
65
AT
Hi,

I noticed that on one HP A class 500 Server that the /tmp file system on dev/vg00/lvol12 is 100 percent full. The file system is 850 megabytes in size. A bdf now shows 9 bytes available. I removed a log file created by a misbehaving process, however /tmp is still 100 percent full, and that was 24 hours ago.

Will fsck or sync reclaim the disk space. Not too sure about running either on a life system.

Last resort is a reboot which I would like to avoid as much as possible.

Any ideas?

Graham.

 
Found a solution

fuser -c /tmp

shows all running processes pids using this filesystem

Stopped the snmpdm process and some additional processes kill -9

filesystem is now only 1 percent full :)

 
If you are removing files from /tmp, if the file is open by a process

rm filename

may not release the disk space (as you found)

Safest way is to leave the file there and use >filename to zero it. It can then be removed on reboot (/tmp should clear if set, good practice to do this).

In this case you could resolve, however, take the case of a file getting a bit large (eg log file) that is used by a application you cannot stop :

One way, cp the file to file.old
>file

Martin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top