Hello! I'm running a few scripts right now on a server and whenever I run bamCompare I get the 'no space left of device' error.
$ df -H
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 16G 16G 0 100% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 16G 4.0K 16G 1% /dev
tmpfs 3.2G 380K 3.2G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 16G 0 16G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/xvdf 30G 29G 1.2M 100% /software
/dev/xvdg 985G 748G 196G 80% /data
After the error occurs I am also unable to tab-complete and I get this error message:
-bash: cannot create temp file for here-document: No space left on device
Looking in the /tmp/ directory (size 848KB), it is filled with files that look like this
-rw------- 1 ubuntu ubuntu 4.6M Jul 17 11:25 _deeptools_szwlxqn_.bg
Restarting the server fixes the 'no space left' error, but it will simply happen again if I try to run bamCompare on my files. I hope someone knows what might be going on here. I'm clearly not very experienced with linux. THANK YOU!
Your
/data/
directory is the one with space for analysis - it has 1TB. Your root directory (/
) is mounted on a 16GB device.What this means is that if you're running analysis outside
/data/
, (that is, if/tmp/
is being used), you'll run out of space really fast. Try setting the temp folder location in bamCompare (a quick google search says you need to set a parameter in a config file (see here, you will need to dig deeper).In other news you also need to make space in your root directory
Some errant file may have been saved there. Look at a listing of
/
and check.Is it possible to reallocate more space for the root directory? Can't find much to remove..
Your directory cannot be larger than the disk it sits on. If
/dev/xvda1
has 16G capacity only,/
cannot be larger. I'm not sure if it is possible to mount the/
folder on a different device without reinstalling the OS.For each folder under
/
that is mounted on/dev/xvda1
, rundu -sh
. Point the largest (which would also be the one that grows the most, like a data directory or a tmp folder) to a new disk.The config parameter is deprecated now, and instead you can just set the environment variable TMPDIR to whatever temporary directory you want.