# tmp weirdness



## wonslung (May 18, 2010)

I was noticing a problem with a particular web application i have....it was acting like it was out of space, so i did a df -h

It was showing /tmp was 100% full...when i went to tmp, i could only find a couple largish files....after deleting those, it's STILL showing 98% full...i'm totally lost as to why this should be.....

this is a ls -al

```
drwxrwxrwt  10 root     wheel       512 May 18 05:41 .
drwxr-xr-x  19 root     wheel       512 Mar 31 07:50 ..
drwxrwxrwt   2 root     wheel       512 Mar 22 16:14 .ICE-unix
drwxrwxrwt   2 root     wheel       512 Mar 22 16:14 .X11-unix
drwxrwxrwt   2 root     wheel       512 Mar 22 16:14 .XIM-unix
drwxrwxrwt   2 root     wheel       512 Mar 22 16:14 .font-unix
drwxrwxr-x   2 root     operator    512 Mar 22 13:21 .snap
drwxr-xr-x   2 root     wheel       512 Mar 27 07:05 .webmin
drwxr-xr-x   3 root     wheel       512 Mar 22 15:58 cherokee
srwxr-xr-x   1 root     wheel         0 Apr 21 18:49 cherokee-admin-scgi.socket
-rw-r--r--   1 ovh      wheel        55 May 18 05:41 cpu_stats
-rw-rw-rw-   1 rtuser1  wheel     12181 May 18 05:41 errors.log
drwxr-xr-x   6 root     wheel       512 Apr 11 09:19 screens
-rw-------   1 www      wheel       325 Apr 21 19:22 sess_2ai2n45764dh0noe05bfrao506
```

and a du -h

```
2.0K	./.snap
2.0K	./.X11-unix
2.0K	./.XIM-unix
2.0K	./.ICE-unix
2.0K	./.font-unix
2.0K	./screens/S-root
2.0K	./screens/S-rtuser1
2.0K	./screens/S-rtuser2
2.0K	./screens/S-wonslung
 10K	./screens
2.0K	./.webmin
2.0K	./cherokee/rrd-cache
4.0K	./cherokee
 44K	.
```


and here is a df -h


```
Filesystem                    Size    Used   Avail Capacity  Mounted on
/dev/ad4s1a                   496M    374M     82M    82%    /
devfs                         1.0K    1.0K      0B   100%    /dev
/dev/ad4s1b                   496M    449M    6.8M    99%    /tmp
/dev/ad4s1e                   989M    290M    620M    32%    /var
/dev/ad4s1f                   449G    309G    104G    75%    /usr
procfs                        4.0K    4.0K      0B   100%    /proc
devfs                         1.0K    1.0K      0B   100%    /var/named/dev
```


any idea what could cause this and better yet, how do i fix it


----------



## wonslung (May 18, 2010)

followup:

Weirdly enough, umount -f /tmp mount -a seems to have fixed it.

```
/dev/ad4s1b                   496M     42K    456M     0%    /tmp
```


----------



## crsd (May 18, 2010)

http://www.freebsd.org/doc/en/books/faq/disks.html#DU-VS-DF


----------



## SirDice (May 18, 2010)

If a process still has the file open deleting it won't release the space.


----------



## wonslung (May 18, 2010)

crsd said:
			
		

> http://www.freebsd.org/doc/en/books/faq/disks.html#DU-VS-DF




ick....

i read this wrong


----------



## wonslung (May 18, 2010)

SirDice said:
			
		

> If a process still has the file open deleting it won't release the space.



This may be true, but there wasn't that much space to be FOUND.

I had 2 log files in /tmp which took up maybe 10-20 MB of space.  everything else was just plain invisible.

the only thing i can figure is something was still holding the space and i couldn't find the process.


anyways, i'll monitor it and see if it happens again....this is the first time i've ever seen this before.


----------



## DutchDaemon (May 18, 2010)

See if the mountpoint itself doesn't contain files (boot in single-user mode, don't mount any devices, and check the /tmp directory).


----------

