0

When tab-autocompleting in terminal, I'm getting the error:

-bash: cannot create temp file for here-document: No space left on device

This would appear to mean that /tmp/ is full, but it's mounted on my hard disk, which itself has lots of space left.

/tmp only contains one thing: a folder called /tmp/.mount_VCeNjK/. I can't find out anything about it, because even sudo and su can't chmod it, read it, umount it, rm it, or stat it. They complain about permissions and say that it's busy.

What can I do? I'm nothing without my autocomplete.

5
  • 2
    /tmp is usually mounted in memory since it's tmpfs filesystem. Run df command, see what's the actual usage it reports. You can further analyze what takes up most memory via ncdu or just du running over /tmp. There's also a way to increase /tmp size: askubuntu.com/a/199708/295286 Jan 19, 2019 at 23:42
  • 1
    sudo lsof +D /tmp/.mount_VCeNjK/ will show you which processes have the directory (or files and directories underneath) open. When these processes finish (or are killed), you'll probably be able to sudo rm -rf. But be aware that this will have side effects that I can't predict, so you MUST proceed with care.
    – waltinator
    Jan 20, 2019 at 4:13
  • @SergiyKolodyazhnyy Most Linux systems don't actually mount /tmp using tmpfs, see mount | grep tmp for an example. Jan 20, 2019 at 8:54
  • @KristopherIves Fair enough, but I wouldn't say "most", I'd say "some" do (also this ). As far as Ubuntu goes, I had /tmp mounted as tmpfs in previous releases of Ubuntu, hence assuming it's default. Could have happened that I mounted it there myself at some point, but I don't recall doing so. There's apparently discussion on centos forum which suggests it may depend on amount of RAM Jan 20, 2019 at 9:20
  • @SergiyKolodyazhnyy never been default in Ubuntu indeed.
    – vanadium
    Jan 20, 2019 at 11:40

1 Answer 1

0

It's possible (although not common) for a ext4 file system to have remaining space but nothing reserved for inode meta data, essentially meaning the disk is "full" of a very large (millions) of small individual files.

You can run df -i to see the "IUse%" metric of a file system.

1
  • This did it, thanks. Some folders in /var/log and /var/lib/motion had slowly been filling up Jan 22, 2019 at 15:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .