No Space Left On Device Error

broken image


No Space Left On Device Error
  1. Error: Enospc: No Space Left On Device Write
  2. No Space Left On Device Error Download

We faced the problem mentioned in the title, and we found out the solution. We are more than glad to share it here with you. Enjoy the reading, check the rest of our blog posts, and may the power of our solutions be with you.

Error: Enospc: No Space Left On Device Write

Device

Error?

No Space Left On Device Error
No Space Left On Device Error
  1. Error: Enospc: No Space Left On Device Write
  2. No Space Left On Device Error Download

We faced the problem mentioned in the title, and we found out the solution. We are more than glad to share it here with you. Enjoy the reading, check the rest of our blog posts, and may the power of our solutions be with you.

Error: Enospc: No Space Left On Device Write

Error?

Do you know the feeling when your server starts to behave in a strange way, don't you? So, you spend hours debugging, as we did some time ago, just to find out the 'No Space Left On Device' error? It doesn't matter what you do; the error keeps to pop out. If your disk is really full, then it is an easy problem to solve. Just clean it up. But, if your disk is not full the issue becomes a little bit more complicated… but still easy solvable. It's possible that you have run out of inodes.

What are inodes?

  • Such difference between the output of du -sh and df -h may happen if some large file has been deleted, but is still opened by some process. Check with the command lsof grep deleted to see which processes have opened descriptors to deleted files. You can restart the process and the space will be freed.
  • Errno 28 No space left on device Please refer to the log file for more details. I have already rebooted the ESXi host in order to free some memory the ramdisks could be using.

So, you spend hours debugging, as we did some time ago, just to find out the 'No Space Left On Device' error? It doesn't matter what you do; the error keeps to pop out. If your disk is really full, then it is an easy problem to solve. Just clean it up.

Wikipedia says:

The inode (index node) is a data structure in a Unix-style file system that describes a file-system object such as a file or a directory. Each inode stores the attributes and disk block location(s) of the object's data. File-system object attributes may include metadata (times of last change, access, modification), as well as owner and permission data.

What does it mean in real life?
Files are not only using up your disk space, but they are also using disk inodes which hold information about them. In practice, if you keep a lot of big files most likely, you will run out of space. But, if you have a lot of very small files most likely, you will run out of inodes. Even though, there will be still potential free space on your drive.

How to check the number of inodes used?

Long story short, to check drive space we always use:

No Space Left On Device Error Download

df -h

Thus, to check the number of inodes just put:

df --inodes

Do you know what happened?
The output is a little bit different. We use only 38% of the disk space but already 62% of the disk inodes available.

How to identify files and folder consuming your inodes?

The last key question to be answered is how you can identify where those files that consume your inodes are hiding. We use a very simple command for it:

find / -xdev -printf '%hn' | sort | uniq -c | sort -k 1 -n

As an output, you will receive a list of folders and the number of inodes that are being used by them.

Now you just have to navigate to the right place and clean it up 🙂

How about trying hosting services with unlimited disk space?

In case of any questions or problems, contact us.





broken image