LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 10-05-2011, 06:23 PM   #1
themess
LQ Newbie
 
Registered: Jul 2008
Location: Indiana
Distribution: Debian
Posts: 25

Rep: Reputation: 0
Volume /tmp has only ??? Mb free


I've only been running Linux for a year. Have been using Debian Squeeze since it was released. AMD64, ext4 for all partitions. During installation, I selected separate /home, /usr, /var, and /tmp partitions. If I recall correctly, the recommended size for /tmp struck me as too low, and I increased it. Gparted shows it as 380 meg. Every several weeks or days I get a message that

"Volume /tmp has only ??? Mb free"

and the computer is sluggish at those times.

1) I have little experience with Gparted to resize partitions, although I used to use Partition Magic. Is it safe to take several unused gig from /home to put into /tmp? I would, of course, only do that immediately after backing up.

2) Is there a better way to manage what stays in /tmp?

A bit of searching turned up methods to automatically search /temp for files old enough that they should not be needed any more (say, <3 days old). While it is possible to automatically delete those files, Linux in a Nutshell says that this can introduce security risks and advises manual deletion.

How can I learn more about what goes into /tmp, and what has to stay?

Thanks
 
Old 10-05-2011, 07:53 PM   #2
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,066

Rep: Reputation: 333Reputation: 333Reputation: 333Reputation: 333
You have /tmp on its own partition?
 
Old 10-05-2011, 09:33 PM   #3
themess
LQ Newbie
 
Registered: Jul 2008
Location: Indiana
Distribution: Debian
Posts: 25

Original Poster
Rep: Reputation: 0
Yes. /tmp is a separate partition.
 
Old 10-05-2011, 10:31 PM   #4
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,066

Rep: Reputation: 333Reputation: 333Reputation: 333Reputation: 333
OK. Not sure why anyone would do that but it is your box.

Have you thought of just opening the /tmp file to see what is in it when this happens? I know you can get the details through your terminal but I like to look at things and see all the stuff as a whole.

What goes in there depends on what you are doing. Not sure what you would have to do to get it that large. Mine is currently at 32Kb. I have only been up for about a day though.

I have several installs for different reasons and rarely have this OS up for more than 3 days.
Code:
tom@debian:~$ ls /tmp
gedit.tom.278690278  keyring-6z7xvg  libgksu-l4sn9j  orbit-Debian-gdm  orbit-root  orbit-tom  plugtmp  ssh-ZqxnpDGC2874  virtual-tom.UrSx7j
tom@debian:~$
The gedit stuff is a 0bytes socket. The rest are directories 3 of which are empty.

The best way to manage your /tmp file is leave it in /.

As for making it bigger, you can most certainly do that. I have no idea what the possible size of it can be. You may find something about that with a search. I would do it in increments, probably to .5, .75 and then 1Gb. Surely 1Gb should do it unless you have a habit of doing a lot of intensive things at once for a long time.
 
Old 10-05-2011, 11:46 PM   #5
evo2
Senior Member
 
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 4,833

Rep: Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024
I'd have thought 380 Mb would be large enough for /tmp in most cases.

I'm guessing this is a single user machine and there for it is *your* files that take up the space. You could consider setting the TMPDIR environment variable to somewhere with more space: Eg in your .bashrc add something like

Code:
export TEMPDIR=$HOME/.tmp
many programs will respect that variable.

Another option would be to install tmpreaper (from package of same name) and configure /etc/tmpreaper.conf to your liking.

In terms of finding out what is using all the space: just look. du is your friend.
eg
Code:
du -sckh /tmp/* | sort -h
Cheers,

Evo2.
 
Old 10-06-2011, 01:53 PM   #6
themess
LQ Newbie
 
Registered: Jul 2008
Location: Indiana
Distribution: Debian
Posts: 25

Original Poster
Rep: Reputation: 0
Thanks for the replies.

This is a single user machine.
At this moment, I'm not having problems.
Nautilus shows

Type: folder (inode/directory)
Contents: 53 items, totalling 49.8 KB (some contents unreadable)
Free Space: 256.2 MB

Gparted shows

Partition /dev/sda8
File System ext4
Mount Point /tmp
Label TMP
Size 380.00 MiB
Used 104.84 MiB
Unused 375.15 MiB

Running in a terminal window

du -sckh /tmp/* | sort -h

shows

0 /tmp/OSL_PIPE_1000_SingleOfficeIPC_739726f52f1874ec7bae468785b1f
1.0K /tmp/kde-root
1.0K /tmp/kde-tom
1.0K /tmp/keyring-lVnlMC
1.0K /tmp/orbit-root
1.0K /tmp/plugtmp
1.0K /tmp/seahorse-rlWrjw
1.0K /tmp/ssh-lYzgMv2113
1.0K /tmp/virtual-tom.3qPGIt
3.0K /tmp/libgksu-CtzJlZ
3.0K /tmp/libgksu-lXQ2hP
4.0K /tmp/orbit-tom
12K /tmp/lost+found
25K /tmp/sv8an.tmp
55K total

The different values for how much of /tmp is being used are huge.
 
Old 10-06-2011, 02:47 PM   #7
John VV
Guru
 
Registered: Aug 2005
Posts: 12,157

Rep: Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597Reputation: 1597
Quote:
I'd have thought 380 Mb
NO that is way way way too small
normally /tmp is a folder in the / partition

an example
Imagemagick stores images it is working on in /tmp
if you have a 500 meg image then Imagemagick WILL CRASH if you only have 320 meg of space in tmp

the /tmp folder is used by a LOT of programs
it needs to be big
that is why it normally in a folder on the / partition and not it's own partition
 
Old 10-06-2011, 04:22 PM   #8
evo2
Senior Member
 
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 4,833

Rep: Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024
Quote:
Originally Posted by John VV View Post
NO that is way way way too small
Do you really need to YELL?

Quote:
normally /tmp is a folder in the / partition
Normally? Personally I'd hate to see my system bought to it's knees because of some program filling the / partition by writing a huge file to /tmp.

Quote:
an example
Imagemagick stores images it is working on in /tmp
if you have a 500 meg image then Imagemagick WILL CRASH if you only have 320 meg of space in tmp
Pretty poor coding if that will cause it to crash. File a bug?

If users want temporary files that large they can set their TEMPDIR environment variable or configure the program creating the files to write them elsewhere. If the program doesn't provide ways to allow writing temporary files to another location it has a serious bug.

Quote:
the /tmp folder is used by a LOT of programs
it needs to be big
that is why it normally in a folder on the / partition and not it's own partition
See above.

Evo2.
 
Old 10-06-2011, 05:17 PM   #9
evo2
Senior Member
 
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 4,833

Rep: Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024
Hi,

Quote:
Originally Posted by themess View Post
The different values for how much of /tmp is being used are huge.
Please show the output of:
Code:
df -h /tmp
If this differs from the du total there could be a number of reasons (the web is lousy with questions and answers on this topic).

Probably the most common cause is that a file is deleted while it is still open and being written to.

Evo2.
 
Old 10-08-2011, 07:57 PM   #10
themess
LQ Newbie
 
Registered: Jul 2008
Location: Indiana
Distribution: Debian
Posts: 25

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by evo2 View Post
Hi,


Please show the output of:
Code:
df -h /tmp
If this differs from the du total there could be a number of reasons (the web is lousy with questions and answers on this topic).

Probably the most common cause is that a file is deleted while it is still open and being written to.

Evo2.
tom@Gigabyte:~$ df -h /tmp
Filesystem Size Used Avail Use% Mounted on
/dev/sda8 368M 98M 252M 28% /tmp
tom@Gigabyte:~$
 
Old 10-08-2011, 08:54 PM   #11
evo2
Senior Member
 
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 4,833

Rep: Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024Reputation: 1024
Quote:
Originally Posted by themess View Post
tom@Gigabyte:~$ df -h /tmp
Filesystem Size Used Avail Use% Mounted on
/dev/sda8 368M 98M 252M 28% /tmp
tom@Gigabyte:~$
Ok, so there seems to be about 98MB unaccounted for. Did you manually delete anything in /tmp?

Also, when you ran du on /tmp did you do so as root?

Evo2.
 
Old 10-09-2011, 06:57 PM   #12
themess
LQ Newbie
 
Registered: Jul 2008
Location: Indiana
Distribution: Debian
Posts: 25

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by evo2 View Post
Ok, so there seems to be about 98MB unaccounted for. Did you manually delete anything in /tmp?

Also, when you ran du on /tmp did you do so as root?

Evo2.
Both ways, nearly identical results.

The way I read it, 98 MB is used.

I manually deleted a few KB of files from /tmp a few weeks ago.

At this point, I'm wondering what Nautilus is actually displaying. I have thought that "/" (the root directory) covers the entire collection of hard drives on this machine, and that / is identical to "File System". However, given that GParted shows a separate /tmp partition, with a different size than Nautilus reports, I'm far from sure. So I'll probably shut the system down, and boot from a live distributions such as Mepis or System Rescue CD to see what it reports on my HD for /tmp. It is sounding to me as if there is a /tmp partition, and a /tmp directory in another partition. I could easily be mistaken.
 
  


Reply

Tags
gparted, tmp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LVM free space problem after resizing the logical volume wdorninger Linux - Enterprise 0 11-06-2009 07:00 AM
How do I shrink a volume group once I have created free space in it? Mountain Linux - General 5 10-28-2009 08:54 PM
LVM2 volume size / free space ,mismatch Grismar Linux - Newbie 4 09-28-2009 03:47 AM
Newbie - X won't let me login because not enough free disk space in /tmp sart1 Linux - Software 1 06-02-2005 10:22 PM
/tmp not enough free space jang Linux - General 12 02-10-2005 03:21 AM


All times are GMT -5. The time now is 07:15 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration