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.

dessert
  • 39,982
  • 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: https://askubuntu.com/a/199708/295286 – Sergiy Kolodyazhnyy Jan 19 '19 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 '19 at 04:13
  • @SergiyKolodyazhnyy Most Linux systems don't actually mount /tmp using tmpfs, see mount | grep tmp for an example. – Kristopher Ives Jan 20 '19 at 08: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 – Sergiy Kolodyazhnyy Jan 20 '19 at 09:20
  • @SergiyKolodyazhnyy never been default in Ubuntu indeed. – vanadium Jan 20 '19 at 11:40

1 Answers1

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.