Results 1 to 5 of 5
  1. #1

    How to clear tmp / resize tmpDSK on CentOS

    I've got a 2GB partition on my server which is running CentOS 64. There are a couple of problems I'm running into, as the disk is now 90% full.

    tmpwatch 12 /tmp -- this doesn't do anything, unfortunately. I'm not sure what will clear out more space nor whether any of this is going to make any difference in the long run.

    So let's talk about increasing the size of tmpDSK to, let's say 3GB or 4GB, which is rather huge but I think will solve all issues. I can't seem to follow the directions without having problems of commands not working, for example, the following.



    I'd appreciate it if someone could help me with the process with CentOS 64 as it seems to be a relatively routine task that is just not so easy to accomplish. Like much in Linux, it takes a time investment and there isn't a point and click to get this done easily.

    PS - it would also help to describe specifically the best way to back up the tmp directory, which I don't think was necessary the last time but you never know. Just saying "back up" didn't quite help as there seem to be many options. Many thanks for any assistance.

  2. #2
    Join Date
    Aug 2003
    Posts
    376
    Can you post the output of the commands you ran so that we can see what's failing?

  3. #3
    Join Date
    Dec 2005
    Posts
    3,110
    You shouldn't need a /tmp partition that large. If you need to increase it you are going to have the same issue again in future.

    Do you have any caching going on like eaccellerator or xcache? I suspect it may be caching data into /tmp which is what is taking up all of your space.

    Relocate it and you won't come across this again. It's also worth setting up a cron to flush out the cache now and again, or tweak the configuration of your caching agent so it limits how long files are cached for before they get refreshed or dropped.

  4. #4
    Join Date
    Aug 2003
    Posts
    376
    Just a quick note: If the OP is a host and is using mod_fcgid for PHP, moving the eaccelerator cache dir might not be so smart. In those circumstances, /tmp is more secure, as it will be mounted noexec.

  5. #5
    Join Date
    Dec 2004
    Posts
    39
    It seems you are using cPanel. By default, it create a 500MB tmp partition. It's too small sometimes. I had increased the tmp partition on many servers by following this instruction.

    (Sorry, I can't post link)
    thecpaneladmin.com/increasing-size-of-tmpdsk-tmp

    On centos, the command "Unmount /tmp" should be "Umount /tmp"
    Last edited by garconcn; 09-22-2011 at 04:34 PM.

Similar Threads

  1. how to clear tmp directory ?
    By ransome in forum Hosting Security and Technology
    Replies: 11
    Last Post: 03-21-2011, 12:17 PM
  2. Disk /usr/tmpDSK (/tmp) <-- cause?
    By TitanJeff in forum Web Hosting
    Replies: 4
    Last Post: 09-18-2010, 10:49 PM
  3. How Do I Resize /tmp?
    By x264-BB in forum Hosting Security and Technology
    Replies: 5
    Last Post: 10-08-2009, 08:46 AM
  4. How to clear /tmp files?
    By treck33 in forum Hosting Security and Technology
    Replies: 6
    Last Post: 09-07-2009, 11:22 AM
  5. How to restart server and clear tmp?
    By kgp43 in forum Hosting Security and Technology
    Replies: 8
    Last Post: 01-13-2006, 07:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •