TMP full or Drive Critical: /dev/loop0 (/var/tmp) is xx% full

Started on the old forum in July 2012 · view the original in the archive · old links redirect here

#clean-tmp #mysql-tmp #resize-tmp #tmp-full

No replies · 599 views · started 14 years ago · 1 min read

Sanju Kr Developer · 104 posts #1

if you are getting error on site due to tmp of full or getting emails Drive Critical: /dev/loop0 (/var/tmp) is 97% full then you have to follow steps below.

First you have to resize the tmp partation

Edit /scripts/securetmp

nano /scripts/securetmp

and fine the line my $tmpdsksize

my $tmpdsksize     = 512000;    # Must be larger than 250000

Change to this line for 2GB:

my $tmpdsksize     = 2097152;    # Must be larger than 250000

Save the file then run these commands to resize /tmp partition:

umount -l /tmp
umount -l /var/tmp
rm -fv /usr/tmpDSK
/scripts/securetmp

You can use the following steps to move the MySQL /tmp directory location:

nano /etc/my.cnf

Place the following line into the file under the [mysqld] section:

tmpdir=/mysqltmp

Save the file

  1. Create the /mysqltmp directory
mkdir /mysqltmp
chmod 1777 /mysqltmp
  1. Restart MySQL and check that the tmpdir is now /mysqltmp
/etc/init.d/mysql restart
mysqladmin var | grep tmpdir

You should see the following return:

mysqladmin var | grep tmpdir
| slave_load_tmpdir                       | /mysqltmp
| tmpdir                                  | /mysqltmp

This presumes / partition itself has sufficient space. I would like to hope / partition would have more space than /tmp was provided on most systems.

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close