0

I know there are lots of posts on in the stack exchange web with problems similar to mine but I have not found one that quite helps yet. As you can see from the output below df shows my /tmp directory to be completely full. This has happened to me before in the past and it was easy to spot the large file(s) causing the problem.

$ df -h /tmp/
Filesystem      Size  Used Avail Use% Mounted on
-               1.0M  1.0M     0 100% /tmp    

This time there are no large files, in fact du and ls will confirm this

$ du -h /tmp/
0   /tmp/.ICE-unix
0   /tmp/.X11-unix
56K /tmp/

$ ls -lahtr
total 60K
drwxrwxrwt  2 root root   40 Mar  7 22:17 .X11-unix
drwxrwxrwt  2 root root   40 Mar  7 22:17 .ICE-unix
-rw-------  1 root root    1 Mar  9 09:37 fileVZLNrC
-rw-------  1 root root    0 May  1 14:02 file6lz1VS
-rw-------  1 root root    0 May  1 14:28 file7ELZD8
drwxr-xr-x 24 root root 4.0K Jun 27 10:45 ..
-rw-rw-r--  1 vlc  vlc     0 Jun 27 21:02 camp_report_log2
-rw-rw-r--  1 vlc  vlc    36 Jun 28 06:00 usage
-rw-rw-r--  1 vlc  vlc     0 Jun 28 06:00 load_span
-rw-r--r--  1 root root    1 Jun 28 15:57 voa_somali.log
-rw-r--r--  1 root root    1 Jun 28 15:57 vision_pm.log
-rw-r--r--  1 root root    1 Jun 28 15:57 vision_am.log
-rw-r--r--  1 root root    1 Jun 28 15:57 sc_serv.log
-rw-r--r--  1 root root    1 Jun 28 15:57 scoop.log
-rw-r--r--  1 root root    1 Jun 28 15:57 ranmase.log
-rw-r--r--  1 root root    1 Jun 28 15:57 okazyon.log
-rw-r--r--  1 root root    1 Jun 28 15:57 n4e.log
-rw-r--r--  1 root root    1 Jun 28 15:57 kiskeya_sunday.log
-rw-r--r--  1 root root    1 Jun 28 15:57 intersection.log
-rw-r--r--  1 root root    1 Jun 28 15:57 ghana.log
-rw-r--r--  1 root root    1 Jun 28 15:57 bbc_somali.log
drwxrwxrwt  4 root root  440 Jun 28 15:57 .

So I am still getting errors like these

$ crontab -e
/tmp/crontab.0kGihV/crontab: No space left on device

$ echo 'test' | mail -s 'test' user@mail.com
mail: cannot send message: No space left on device

What else could casue the /tmp dir to fill?

BryanK
  • 103
  • 2

2 Answers2

0

Um, considering that the size of the partition that you have given yourself for /tmp is only 1MB, I think you're lucky your system runs at all.

You should probably consider enlargin the /tmp partition, or allowing the OS to use space in the root partition for /tmp. This last you can accomplish be commenting out whatever you have in /etc/fstab that is mounting your /tmp partition.

Charles Green
  • 21,339
  • I am still new to admin tasks... what is the best way to enlarge the /tmp partition? – BryanK Jun 28 '14 at 20:37
  • There's a pretty good guide at http://www.howtogeek.com/114503/how-to-resize-your-ubuntu-partitions/ I don't think that you can change the size of /tmp while it is being used, and you may need to alter other partitions to make space. A reasonable alternative, depending upon the size of the '/' partition, is to simply let the OS use that space. It will create a /tmp directory (if it does not exist) and go on from there. – Charles Green Jun 28 '14 at 20:42
0

It's possible there's a file on /tmp which can't be unlinked because there are processes which still have an open handle. You can list these processes with:

sudo lsof +D /tmp

When these processes exit you should be able to reclaim the space in /tmp. However unless you are working on an embedded system with ~512M of space or less you can probably afford to have /tmp be larger.

If you want /tmp mounted on the same drive as / it's sufficient to comment out (add a leading # to the beginning of the line) the line containing /tmp from /etc/fstab, you'll need to either remount the appropriate partitions or reboot and let the system remount everything for you for the changes to take effect.

In order to mount /tmp on its own partition you need to create the partition of the right size in advance. Luckily the things in /tmp should not be precious, so it should be enough to make a new partition, update fstab and reboot.

Joe
  • 376
  • it turns out I had deleted files with an open handle, after killing them the space was freed, and thank you for additional information. – BryanK Jun 28 '14 at 21:05