LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-22-2009, 09:28 PM   #1
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Rep: Reputation: 19
Having problem with /tmp "No space left on device" Error


Hello:

When I login to root (via su -), I'm getting the following error:

Code:
Null message body; hope that's ok
/tmp/Rsoph96A: No space left on device
I am also getting other errors relating to the /tmp directory:
1. Uploading files via html/php fail because of this problem.
2. MySQL errors (I think 28) indicating a problem with the disk being full.

The think is that the partitions are not full. Here is the output from # df -h:

Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/simfs             40G   11G   30G  26% /
tmpfs                 3.9G  4.0M  3.9G   1% /tmp
As you can see, there is A LOT of available room.

I thought I had this fixed last week. I deleted everything in the /tmp directory and created two directories:

/tmp/sessions (chmod 777)
/tmp/uploads (chmod 777)

Then I edited the php.ini file and made sure to set these directories for save.session_path and upload_tmp_dir

It seemed to work but after a few days I'm in the same mess.

A little while ago my host for my VPS decided to run updates on all the VPS' and lock down the /tmp directories. However, in this process they messed up a LOT of programs that I had running. I spend 2 or three days completely offline, then I was finally able to get PHP re-compiled again, but was unable to get eAccelerator working correctly (I think it isn't compatible with PHP 5.2.9).

Anyway... I have no clue what they did to the /tmp directory, and I have no clue how to debug or fix this problem.

Can anyone help me with this please?
 
Old 05-23-2009, 10:34 AM   #2
janhe
Member
 
Registered: Jul 2007
Location: Belgium
Distribution: slackware64 13.1, slackware 13.1
Posts: 369

Rep: Reputation: 49
Your /tmp is a tmpfs, that means it isn't on your hard disk, but it is using your RAM to store its contents.

This means everything inside is lost when you reboot. This usually isn't a big problem, since it is /tmp

Only, you said you needed to create a few directories for your system to work.

My guess is that /tmp is completely empty, and that you cannot create anything inside it without being root.

Please post your /etc/fstab. If you recreate the directories, does everything work again?
 
Old 05-23-2009, 10:39 AM   #3
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
I've had exactly the same problem in the past, it occured for me when I was writing data that over stepped the bounds of the file I was trying to write to, so it had to be written to ramdisk. Reboot to clear it out, and fix whatever process failed when it gave you that error, that- or whatever you've been running which writes huge swathes of data.
 
Old 05-23-2009, 11:19 PM   #4
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by jamescondron View Post
I've had exactly the same problem in the past, it occured for me when I was writing data that over stepped the bounds of the file I was trying to write to, so it had to be written to ramdisk. Reboot to clear it out, and fix whatever process failed when it gave you that error, that- or whatever you've been running which writes huge swathes of data.
I'm sorry, I don't follow.
 
Old 05-23-2009, 11:20 PM   #5
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by janhe View Post
Your /tmp is a tmpfs, that means it isn't on your hard disk, but it is using your RAM to store its contents.

This means everything inside is lost when you reboot. This usually isn't a big problem, since it is /tmp

Only, you said you needed to create a few directories for your system to work.

My guess is that /tmp is completely empty, and that you cannot create anything inside it without being root.

Please post your /etc/fstab. If you recreate the directories, does everything work again?
Code:
# cat /etc/fstab
none    /dev/pts        devpts  rw      0 0
 
Old 05-24-2009, 03:48 AM   #6
janhe
Member
 
Registered: Jul 2007
Location: Belgium
Distribution: slackware64 13.1, slackware 13.1
Posts: 369

Rep: Reputation: 49
Now I cannot follow anymore. On my system, all partitions that are mounted when the system boots have an entry in /etc/fstab

I have no idea how your setup works.

The only shot I can take at it is: did you look what is inside /tmp . Do the problems remain when you recreate the directories you mentioned in your first post?

If that doesn't work, I cannot help you.

Maybe jamescondron can give a bit more detail?
 
Old 05-24-2009, 04:30 AM   #7
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
type 'ls -l /', /tmp entry shall like this:
drwxrwxrwt 14 root root 4096 2009-05-24 13:49 tmp
 
Old 05-24-2009, 09:19 AM   #8
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Your /tmp/ is mounted on ramdisk because it is being used to hold some kind of overflow. You could just empty it as root. You could just reboot. You could just leave it- pick a poison
 
Old 05-25-2009, 07:22 AM   #9
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Original Poster
Rep: Reputation: 19
Hi James,

The problem is that I can't keep going in and rebooting everytime this happens.

It seems as though my host has fixed it for now by changing the way /tmp is mounted. I'll keep my eye on it and let you know if I have any more problems.

Thank you for the help.
 
Old 05-25-2009, 07:24 AM   #10
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Okay, no worries Jim, If you have root, what happens if you do just do an rm on the contents?
 
Old 05-25-2009, 07:52 AM   #11
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,615
Blog Entries: 26

Rep: Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986
Hi,

Quote:
Originally Posted by jim.thornton View Post
Code:
# cat /etc/fstab
none    /dev/pts        devpts  rw      0 0
From the cli as root do a 'mount' then post the output. Your '/etc/fstab' is not complete.
 
Old 05-25-2009, 07:57 AM   #12
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Here is the solution.
The /tmp directory is mounted as a tmpfs filesystem.
do as following

umount /tmp

then see if the error occurs
 
Old 05-25-2009, 08:25 AM   #13
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,990

Rep: Reputation: Disabled
I seem to have read somewhere that you don't chmod 777 /tmp-files because then you can have executables in the /tmp space which could compromise security. chmod 666 should be better AFAIR. Perhaps you should read up on this when the main problem is solved.
 
Old 05-26-2009, 07:12 PM   #14
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Original Poster
Rep: Reputation: 19
I remember reading the same thing but then other posts that I was reading said 777.

As for the mount/umount. Will that work even if I'm on a VPS?
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
apt-get -f install fails due to "No space left on device" madkayaker Linux - Newbie 9 01-05-2014 09:39 PM
"No space left on device" error 1984 Slackware - Installation 6 03-08-2008 03:30 PM
"No space left on device" error using SystemV shared memory clalfa Programming 5 07-09-2007 07:34 AM
"no space left on device" error. ekkasit Linux - General 5 07-08-2007 02:50 PM
"no space left on device" - But df shows free space! monita Linux - General 7 03-30-2004 01:14 PM


All times are GMT -5. The time now is 08:19 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration