LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-04-2015, 02:36 PM   #1
deepGC
LQ Newbie
 
Registered: May 2015
Posts: 21

Rep: Reputation: Disabled
Need larger tmp space - error writing temporary file: No space left on device


Hello,

I am performing work on a particularly large set of files (around 5GB in total). I get the message: error writing temporary file: No space left on device when trying to run my script and presume it's because of the 2GB limit on my tmp folder.

How do either:

a) increase the size of my tmp folder
b) tell my process to use another folder instead of tmp?
 
Old 06-04-2015, 04:18 PM   #2
Sefyir
Member
 
Registered: Mar 2015
Distribution: Linux Mint
Posts: 634

Rep: Reputation: 316Reputation: 316Reputation: 316Reputation: 316
As a quick fix, you can bind another location to act as tmp.
For example, to bind /home/bob/newtmp to /tmp
Code:
mount -B /home/bob/newtmp /tmp
Now everything written to /tmp will actually be written to /home/bob/newtmp (hopefully this new location has plenty of space

As a alternative, if you have lots of ram, just create a tmpfs to mount onto tmp. If you have too little ram and copy too many files to it, this can crash your computer, or at least make it goof and have something go wrong.
Code:
mount -t tmpfs tmpfs -o size=1024M /tmp
This will create a 1024M tmpfs to /tmp. You probably want more then 2gb, so adjust as needed.
 
Old 06-04-2015, 07:12 PM   #3
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,137

Rep: Reputation: 855Reputation: 855Reputation: 855Reputation: 855Reputation: 855Reputation: 855Reputation: 855
A lot of prgrams will obey the TMP setting in the envs, try setting that first, eg
Code:
TMP=/path/to/newfolder /path/to/my/script
 
Old 06-05-2015, 09:17 PM   #4
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
You can use gparted-live to resize /tmp easily.
 
Old 06-06-2015, 02:30 AM   #5
ugjka
Member
 
Registered: May 2015
Location: Latvia
Distribution: Arch, Centos
Posts: 368
Blog Entries: 5

Rep: Reputation: 264Reputation: 264Reputation: 264
If you have systemd then your /tmp is likely using your ram

Code:
systemctl mask tmp.mount
This will make your /tmp use your harddrive instead of ram.

Last edited by ugjka; 06-06-2015 at 02:31 AM.
 
Old 06-06-2015, 02:43 AM   #6
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Perhaps 'TMP' Environment variable is wrong. Right one is 'TMPDIR'.
 
Old 06-06-2015, 05:55 AM   #7
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,137

Rep: Reputation: 855Reputation: 855Reputation: 855Reputation: 855Reputation: 855Reputation: 855Reputation: 855
whoops ! My bad, brain ache day!
 
  


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
LXer: Linux: No space left on device while df command shows lot of free space LXer Syndicated Linux News 0 08-26-2013 02:50 PM
"No space left on device" error on /tmp. How to increase space on /tmp? anilp Linux - Newbie 12 01-24-2011 01:40 PM
Sort Big files, /tmp/sortA3aLjF: No space left on device arvinarvin Linux - Newbie 3 08-03-2010 07:27 PM
Having problem with /tmp "No space left on device" Error jim.thornton Linux - Newbie 13 05-26-2009 07:12 PM
Core dump is larger than file space left on disk? goodkodiak Linux - Software 2 01-24-2009 12:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:13 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
Open Source Consulting | Domain Registration