Why do I get "No space left on device" when running mail
10,338
overflow 1.0M 0 1.0M 0% /tmp
You have only 1 MB
of tmp space
EDIT:
In this way you can increase size of /tmp
sudo dd if=/dev/zero of=/usr/temp-disk bs=2M count=1024
sudo mke2fs -j /usr/temp-disk
sudo mke2fs -j /usr/temp-disk
sudo chmod 1777 /usr/temp-disk
sudo umount /tmp
sudo mount -t ext3 -o rw,noexec,nosuid,loop /usr/temp-disk /tmp
df -h
Related videos on Youtube
Author by
hazymat
Updated on September 18, 2022Comments
-
hazymat over 1 year
First of all I've checked these two solutions on serverfault but I'm still having issues.
Here's my problem:
root@myserver:/# mail /tmp: No space left on device
- Firstly I checked the filesystem usage by running
df -k
but all filesystem usage was under 25% - Then I ran
df -i
to check inode usage; maximum was 4% usage - I have emptied
/tmp
and/var/tmp
and still get above error
Pertinent information:
- I'm running Debian 6, postfix
- Recently had to remove a number of rogue scripts which were planted in user www directories. They looked like this: https://stackoverflow.com/questions/3328235/how-does-this-giant-regex-work these were being used to send high volumes of spam, and I've checked the mail logs and mail queue to ensure spam is no longer being sent. As a result, mail logs had grown very quickly. I have archived the large mail logs to another machine / deleted them, and done the same with all other large files in /var/log
Here's the output of df -h
Filesystem Size Used Avail Use% Mounted on /dev/xvda 20G 4.0G 15G 22% / tmpfs 249M 0 249M 0% /lib/init/rw udev 10M 112K 9.9M 2% /dev tmpfs 249M 0 249M 0% /dev/shm overflow 1.0M 0 1.0M 0% /tmp
-
hazymat over 11 yearsYeh - having problems with the mini-markdown in the comment box, newlines not allowed...
-
MadHatter over 11 yearshazymat, edit it into your question instead.
-
hazymat over 11 years@MadHatter Just trying to edit into the original question but formatting / tabs not lining up - give me a few secs...
-
hazymat over 11 years@MadHatter Done :)
-
David Schwartz over 11 yearsYour
/tmp
has switched to overflow. Do you have a/etc/init.d/mountoverflowtmp
script? See the documentation. Do you have sufficient swap?
- Firstly I checked the filesystem usage by running
-
hazymat over 11 yearsThanks. I realised now mail is not part of postfix, I was just including the fact I run postfix as an aside. I don't have issues with the MTA itself, just the mail client.
-
hazymat over 11 yearsThank you. I see your point - 1MB available space is not enough to run mail. How did it get that way? Can a filesystem mount automatically shrink if another requires more space? Sorry for the basic question. It's just that I never changed the available space myself, and mail always used to work.
-
Suku over 11 yearsSee my edit in answer. In that way you can increase
/tmp
space -
Suku over 11 yearsRe: FS size; no, filesystem will not get shrink, although there are exceptional cases. In your case, asfaiu, increasing the size of
/tmp
will fix the issue. -
adaptr over 11 yearsI'll edit the tags.
-
David Schwartz over 11 years@hazymat: To answer the "how did it get that way" question, see this page.
-
hazymat over 11 yearsDavid. Thanks so much for providing that link. Very interesting to learn.