Jump to content

/tmp always full. Why?


qeldroma
 Share

Recommended Posts

[title]/tmp always full. Why?[/title]

How does this "tmpfs" thing work? I got many errors concerning full /tmp-path, but i didn't find any docu for changing it....

 

I think I don't understand your question, would you make it a bit more clear?

 

Are you asking about the /tmp directory (or partition) because it is full?

 

or about problems with "tmpfs" mounts?

 

or maybe you want use a virtual /tmp partition, for example, by mounting /tmp as: "tmpfs /tmp tmpfs defaults 0 0" ???

 

Maybe telling us what are you trying to do, and what do you do to get that error might help

 

thanks :D

 

[edited] corrected a copy&paste from the wrong source typo

Link to comment
Share on other sites

...i saw "tmpfs" in my fstab, that's why i mentioned it. Don't know what it is, thought it is a type of ramdisk, becuase mounted on /tmp.

 

It's a standard installation of LM9.1

 

I get the error that /tmp is nearly full, but it is connected to this mystic "tmpfs", so i don't know how to handle...

Link to comment
Share on other sites

...i saw "tmpfs" in my fstab, that's why i mentioned it. Don't know what it is, thought it is a type of ramdisk, becuase mounted on /tmp.

 

It's a standard installation of LM9.1

 

I get the error that /tmp is nearly full, but it is connected to this mystic "tmpfs", so i don't know how to handle...

 

Do you have loads of ram? Makes sense to you to have a virtual tmp/ dir? If not, I suggest you to use a plain harddisk /tmp directory.

 

You haven't posted your fstab file, so I can't be sure, and I just can assume things. But my suggestion is to edit your fstab in text mode (not in X, even better if you do this at runlevel 1) and change the line (guessing):

tmpfs /tmp tmpfs defaults,size=XXMb 0 0

to

tmpfs /dev/shm tmpfs defaults 0 0

 

Then remount all your filesystems:

~# mount -a -o remount

I'm not sure if this command will work with tmpfs file systems, so in case something goes wrong, unmount and mount again by hand (or as the last resource reboot).

 

At this point you should have a real /tmp dir (check that its permissions are 1777, if not set them accordingly), and a virtual partition mounted at /dev/shm (its size is 0 or close[1], but as it is dynamic-sized you can use whenever you want, if you ever want to, its teorical limits would be your virtual memory size)

 

Having a "plain real /tmp hardisk directory" is very unlikely to get complaints about not having enough space unless you are really getting out of space in your drive (also, the "tmpwatch" command is meant to run from cron to empty the tmp directory *see man tmpwatch")

 

You can also have a dedicated /tmp partition as I do have:

/dev/hdb9 /tmp reiserfs notail,noexec,nosuid 0 0

 

HTH, and tell me if I'm answering your question or not.

 

Oops, in case you are interested in virtual filesystems you might want to take a look to the following article:

http://www-106.ibm.com/developerworks/libr...rary/l-fs3.html

 

[1] well, if you do a df you'll see that its size is the half-size of your ram, but that is a virtual size, and is not used, so all the ram is available for apps, unless you copy files into /dev/shm

Link to comment
Share on other sites

I also have a dedicated /tmp partition (2.3GB) as well as dedicated /var (1.1GB), /opt (2.9GB) on a 40GB drive.

 

The problem is that Mandrake's default partitioning when using separate /usr and /home partitions, only allocates about 480MB for the root (/) partition and this includes the space for /tmp, /var and /opt - which is wholey inadequate, especially if you are:

 

* installing non mandrake system programs (I have crossover plugin, moneydance, Posiedon -UML editor, Netbeans - Java development, smartCVS and wine) which normally go in /opt. (/usr/local is usually used for variations on a standard system product - e.g a newer version of mozilla than the one that was installed by Mandrake)

 

*printing large files (which normally go via /var)

 

*downloading large files (especially Mandrake ISO images!) which normally use /tmp

 

Replacing /tmp with a link to another partition directory e.g /home/tmp doesn't always work, some programs need the real directory

Link to comment
Share on other sites

that why i also have a 1GB /tmp partition and just symlink /var/tmp there. checkinstall uses /var/tmp instead of /tmp. i found that out when i tried to create a rpm for wine-cvs. :(

 

anyway, the empty at boot option in mcc doesnt alway run correctly. i have a crontab entry for tmpwatch that executes every 4 hours and another one at rc.local just to make sure. :)

 

ciao!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...