"No space left on device" error on /tmp. How to increase space on /tmp?
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.
"No space left on device" error on /tmp. How to increase space on /tmp?
cp: writing `/tmp/tmpX2KZDc/system.image': No space left on device
However, when I right-click on properties, I see it has 51 items, totalling only 130.5 KB!
this is a dual boot system with Win XP and Ubuntu 10.10 (~58Gb partition)
Quote:
anil@anil-HP-EliteBook-8440p:/tmp$ mount
/dev/sda5 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev
Tried to find if my filesystem was full - is not full.
Maybe you have some opened and then deleted files on this device. Did you tried copying after reboot? How large is file "system.image"? You can also have some space reserved for root (by default this is 5%), check if root also cannot copy this file.
Last edited by eSelix; 01-21-2011 at 04:25 AM.
Reason: Silly typo "bye" instead "by" :)
Maybe you have some opened and then deleted files on this device. Did you tried copying after reboot? How large is file "system.image"? You can also have some space reserved for root (bye default this is 5%), check if root also cannot copy this file.
I think system.image is up to 250Mb. It is flashed to a device.
More info: I was running a python build script tool and got this error.
Exception: Command cp -Rfp /home/anil/mydroid/myfs/* /tmp/tmpX2KZDc
failed
Here is a partial output from the console. "No space left on device" error.
---
mke2fs 1.41.12 (17-May-2010)
Filesystem label=android_fs
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
64000 inodes, 256000 blocks
12800 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
32 block groups
8192 blocks per group, 8192 fragments per group
2000 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185
This filesystem will be automatically checked every 22 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
cp: writing `/tmp/tmpX2KZDc/system.image': No space left on device
---
Last edited by anilp; 01-24-2011 at 04:06 PM.
Reason: corrected size of system.image
just try using Disk Usage Analyser.and check how your disk space is distributed in filesystem.
There you can track the files having more space.If it is an unwanted file,delete and recover space.
In case of improper shutdown also there is possibility of file locking.
More info: I was running a python build script tool and got this error.
So, are you compiling something? Maybe during compilation your free space (16GB) is eated entirely. I was compiled recently to other architecture and it needed very large amount of free space (some GB) to create about 5MB image file.
So, are you compiling something? Maybe during compilation your free space (16GB) is eated entirely. I was compiled recently to other architecture and it needed very large amount of free space (some GB) to create about 5MB image file.
I asked the vendor and they said system.image is only 256 Mb.
At the point it fails, apparently it has already created the image.
To me, it seems the problem is with /tmp.
Can you modify this script to pause before erroneous "cp" command and then check free space on /tmp and amount of data to copy? Something like:
Code:
df -h /tmp
du -hs /home/anil/mydroid/myfs
If this is python then you can use
Code:
os.system("some linux command")
with appropriate spaces at the begin of the line.
I have no other ideas, I vote for really finite free space.
And if you want to incrase space for /tmp - if you have more free space on hard drive (other partition or not allocated space), you can temporary remount /tmp directory there. If not, then partition resizing is possible, but not recommended by me. Backup is needed before doing this.
Your problem appears to be with the cp step. you should also probably
let them know how big the myfs directory is, du -sh myfs
When I do the steps manually one by one from the console, it works. The vendor also does not know why or what the problem is.
I am wondering; when the error says
Quote:
cp: writing `/tmp/tmpX2KZDc/system.image': No space left on device
Is it referring to the main /tmp? or is it the tmp directory that it created? (/home/anil/mydroid/27.7.2/mydroid/tmp)
This "tmp" is not on your PC filesystem. First is created file "filesystem.img" with size 262143999 bytes (250MB), next this file is formated as ext3 filesystem and mounted in subdirectory "tmp" (not related to /tmp) created in working directory. And then data is copied there.
You did not enter -h parameter in "du" command but I think there are 4k blocks. So you have about 243MB on prepared filesystem and about 254MB (65048*4096) to copy. Try incrasing this value if you have access to this script, but I don't known if incrased image file fit into your device, or remove some unnecesary files/packages from compilation.
Also I don't known why these command works executed step by step.
Try increasing this value if you have access to this script, but I don't known if increased image file fit into your device, or remove some unnecessary files/packages from compilation.
Also I don't known why this command works executed step by step.
If you see the attached screen-shot, I right-clicked on the myfs folder and chose properties.
It says the size is only 62Mb.
"Display values are in units of the first available SIZE from
--block-size, and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environ‐
ment variables. Otherwise, units default to 1024 bytes (or 512 if
POSIXLY_CORRECT is set)."
These env variables are not set
Quote:
~$ env | grep -i SIZE
~$
Thank you for your help!
Last edited by anilp; 01-24-2011 at 04:07 PM.
Reason: attached screenshot and size of myfs
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.