Ask Your Question

/tmp folder full? Need LVM help

asked 2018-06-22 22:09:04 -0500

revolucion09 gravatar image

updated 2018-06-22 22:10:19 -0500

Hi all,

I've installed Fedora 28 recently, utilizing a / /home /swap partitioning under LVM format.

However, since I am doing some Hadoop data science stuff, many of my processes write down into /tmp, and if I don't clean it up manually between process and process, I get 'Out of space' error on my system (on all of it, even bash command history checking, etc). Then I do rm -rf /tmp/* and everything comes back to normal.

The strange thing is, I don't have any special /tmp partitioning, so why is there a limit on it's size? I think my limit is 7.9GB but no idea where is this set. My home partition has about 100 GB free and my root partition has about 30 GB so I am sure im not running out of space.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-23 00:00:16 -0500

vtrefny gravatar image

/tmp is by default mounted in tmpfs so files in /tmp are stored in memory and its default size is half of your RAM. If you have 16 GiB RAM, tmp size will be 8 GiB, you can use df -h to see size and available free space for all filesystems including tmpfs.

You can disable tmpfs using sudo systemctl mask tmp.mount

Btw. /tmp is for temporary files and applications should not use it to store large amount of data and should remove everything when closed. I'd consider reporting this as a bug to the application you are using.

edit flag offensive delete link more


Thank you, I didn't know about this. But, I have 8gb of ram and my tmp dir is 8 as well, so you might be wrong?also, if it's in memory does it mean it goes to my RAM?

revolucion09 gravatar imagerevolucion09 ( 2018-06-23 00:56:25 -0500 )edit

Run man tmpfs for more information.

villykruse gravatar imagevillykruse ( 2018-06-23 05:28:59 -0500 )edit

It uses memory and swap as much as needed. Thereby it competes with space needed for running your programs.

villykruse gravatar imagevillykruse ( 2018-06-23 05:32:44 -0500 )edit

Programs is supposed to use the environment variable TMPDIR for the location of temporary files. So in your .bash_profile you can add export TMPDIR=/var/tmp or export TMPDIR=$HOME/tmp to specify where you want temporary files to be created. Some programs ignores that, so it might not work.

villykruse gravatar imagevillykruse ( 2018-06-23 05:36:49 -0500 )edit

Question Tools

1 follower


Asked: 2018-06-22 22:09:04 -0500

Seen: 199 times

Last updated: Jun 23 '18