Having problem with /tmp "No space left on device" Error
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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.
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'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.
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?
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
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.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,634
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.