Plugin error from cutadapt: [Errno 28] No space left on device

Hello, I am running the following command:
qiime cutadapt trim-single --i-demultiplexed-sequences demux.qza --p-front ^primersequence --p-adapter primersequence$ --p-times 2 --p-cores 4 --p-error-rate 0 --p-match-read-wildcards --p-match-adapter-wildcards --o-trimmed-sequences trimmed1.qza --verbose

The program runs eventually till the last sample, and then it gives me this error:

Traceback (most recent call last):
File “/data/rbsat/Miniconda/envs/qiime2-2019.4/lib/python3.6/site-packages/q2cli/”, line 311, in call
results = action(**arguments)
File “</data/rbsat/Miniconda/envs/qiime2-2019.4/lib/python3.6/site-packages/>”, line 2, in trim_single
File “/data/rbsat/Miniconda/envs/qiime2-2019.4/lib/python3.6/site-packages/qiime2/sdk/”, line 231, in bound_callable
output_types, provenance)
File “/data/rbsat/Miniconda/envs/qiime2-2019.4/lib/python3.6/site-packages/qiime2/sdk/”, line 393, in callable_executor
spec.qiime_type, output_view, spec.view_type, prov)
File “/data/rbsat/Miniconda/envs/qiime2-2019.4/lib/python3.6/site-packages/qiime2/sdk/”, line 265, in _from_view
result = transformation(view)
File “/data/rbsat/Miniconda/envs/qiime2-2019.4/lib/python3.6/site-packages/qiime2/core/”, line 70, in transformation
new_view = transformer(view)
File “/data/rbsat/Miniconda/envs/qiime2-2019.4/lib/python3.6/site-packages/q2_types/per_sample_sequences/”, line 73, in _3
dirfmt, SingleLanePerSampleSingleEndFastqDirFmt)
File “/data/rbsat/Miniconda/envs/qiime2-2019.4/lib/python3.6/site-packages/q2_types/per_sample_sequences/”, line 56, in _single_lane_per_sample_fastq_helper
File “/data/rbsat/Miniconda/envs/qiime2-2019.4/lib/python3.6/site-packages/qiime2/plugin/model/”, line 87, in write_data
File “/data/rbsat/Miniconda/envs/qiime2-2019.4/lib/python3.6/site-packages/qiime2/core/”, line 35, in _move_or_copy
return shutil.copy(str(self), str(other))
File “/data/rbsat/Miniconda/envs/qiime2-2019.4/lib/python3.6/”, line 241, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File “/data/rbsat/Miniconda/envs/qiime2-2019.4/lib/python3.6/”, line 122, in copyfile
copyfileobj(fsrc, fdst)
File “/data/rbsat/Miniconda/envs/qiime2-2019.4/lib/python3.6/”, line 82, in copyfileobj
OSError: [Errno 28] No space left on device

I am not sure what is the problem, the server I am using has enough space there is 300GB+ to use.
Can anyone help me regarding this issue?

Hi @raghid_bsat!

These issues can be caused by too little space in the /tmp partition which can occur even if you have a lot of disk space.

This command will tell us about that:

df -ha

What does that say?

I have tried the following:
export TMP=’\data\usr\tmp’

echo $TMPDIR
gives me \data\usr\tmp

df -ha gives me the following:
Filesystem Size Used Avail Use% Mounted on
rootfs - - - - /
sysfs 0 0 0 - /sys
proc 0 0 0 - /proc
devtmpfs 7.8G 0 7.8G 0% /dev
securityfs 0 0 0 - /sys/kernel/security
tmpfs 7.8G 0 7.8G 0% /dev/shm
devpts 0 0 0 - /dev/pts
tmpfs 7.8G 785M 7.0G 10% /run
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
cgroup 0 0 0 - /sys/fs/cgroup/systemd
pstore 0 0 0 - /sys/fs/pstore
cgroup 0 0 0 - /sys/fs/cgroup/blkio
cgroup 0 0 0 - /sys/fs/cgroup/pids
cgroup 0 0 0 - /sys/fs/cgroup/devices
cgroup 0 0 0 - /sys/fs/cgroup/net_cls,net_prio
cgroup 0 0 0 - /sys/fs/cgroup/cpu,cpuacct
cgroup 0 0 0 - /sys/fs/cgroup/memory
cgroup 0 0 0 - /sys/fs/cgroup/hugetlb
cgroup 0 0 0 - /sys/fs/cgroup/freezer
cgroup 0 0 0 - /sys/fs/cgroup/perf_event
cgroup 0 0 0 - /sys/fs/cgroup/cpuset
configfs 0 0 0 - /sys/kernel/config
/dev/mapper/vg0-root 30G 28G 1.4G 96% /
selinuxfs 0 0 0 - /sys/fs/selinux
mqueue 0 0 0 - /dev/mqueue
hugetlbfs 0 0 0 - /dev/hugepages
debugfs 0 0 0 - /sys/kernel/debug
nfsd 0 0 0 - /proc/fs/nfsd
/dev/sda1 969M 163M 740M 18% /boot
/dev/mapper/vg0-data 381G 40G 342G 11% /data
/dev/mapper/vg0-var 20G 916M 19G 5% /var
sunrpc 0 0 0 - /var/lib/nfs/rpc_pipefs
systemd-1 0 0 0 - /proc/sys/fs/binfmt_misc
tmpfs 1.6G 0 1.6G 0% /run/user/1018
tmpfs 1.6G 0 1.6G 0% /run/user/1023

it shows that data has a lot of space available

a small update,
I have been trying to export tmp and tmpdir over and over and somehow it worked.
I am not sure now what are the exact commands that made it work.

I have some questions that might clarify it.
1.When I log in to my server, I need to export the tmp again right?
2. Do I need to EXPLICITLY make a directory called tmp in /data/usr/ before I use the export command?
3. Also, what is the exact command that should be used? I am kind of new to the linux environment,
should I use:
export TMP=’/data/usr/tmp’ or export TMP=’/data/usr/tmp/’ or
export TMPDIR=’/data/usr/tmp’ or export TMPDIR=’/data/usr/tmp/’

meaning, should I include a slash at the end? and should I export to TMP or TMPDIR?
4. Should I do the export command Before or After I activate the qiime2-2019.4 environment?

Thank you,

Hi @raghid_bsat,

Glad to hear you were able to get it working, I think I might have a hunch on what went wrong the first time, if you ran the commands as described above.

In your last post, you listed:

 export TMP='\data\usr\tmp'

However, these backslashes (\) are interpreted differently than a regular slash (/). And so the temporary directory wasn’t configured the way you expected.

In your most recent reply, it looks like you have it working with slash (/), so I think that may be what was happening.

Regarding your questions:

  1. Yes, export only lives as long as a shell session, you can make it “permanent” by including it in your ~/.bashrc file so that every session exports that variable at the start, but that’s up to you.

  2. Yes, there should be a directory that already exists for TMPDIR to work correctly (which I think is part of why the original exports weren’t working).

  3. All 4 of those options should work just as well. The trailing slash is nice because it’s obvious that it is a directory, but the computer doesn’t actually care, it treats everything as a file and knows that that particular path is a directory-file, not a regular one. TMPDIR is probably the most robust variable to use, but most systems that look for those variables understand that there’s a few ways to spell it. Python is indifferent as to the particular spelling in this case.

  4. Either should work, TMPDIR is looked up once a command is actually called, so you can change it at any point before then.

Perfect, thank you for your help.
Will this post be deleted once it’s closed or can I look it up later if I get the same problem?

Nope, this post will live on (and be searchable for others)! There is a bookmark feature in Discourse which you can also use to find things later, it can be found at the bottom of the thread :slight_smile:

1 Like