/dev/loop0 is 100 full no free space

/dev/loop0 is 100 full no free space

Hello Everyone If you are getting this error ” Error writing file ‘/tmp/MYGtS5ZY’ (Errcode: 28 – No space left on device)” because  we don’t have enough space to create temp files needed by MySQL on the server so request you to please do the needful to allocate some space for tmp files of MySql or delete previous tmp files so that our query can execute smoothly.

Current Disk Usage Information

DeviceSizeUsedAvailablePercent UsedMount Point
100%/dev/loop02.3G2.2G0100%/tmp
45*/dev/vda160G25G36G41%/

IO Statistics

DeviceTrans./SecBlocks Read/secBlocks Written/SecTotal Blocks ReadTotal Blocks Written
vda29.52 185.93 1910.38497334251100360
scd00.00 0.00 0.00360

100% utilization of /dev/loop

If you are facing OOM (Out Of Memory errors) and start looking into memory utilization in your system using various commands like “df -a”, then you will notice locations like /dev/loop0, /dev/loop1 and so on have 100% memory utilization that is no free space is left.

Current Disk Usage – ImageCurrent Disk Usage
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 8.7M 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/vda1 60G 25G 36G 41% /
/dev/loop0 2.3G 2.2G 0 100% /tmp

What is /dev/loop?

/dev/loop is a virtual / loop device which is basically a file in Linux system which acts as a block device. It is used for mounting disk images like Snap. /dev/loop is read only so the size is fixed once created and cannot be modified.

There are many instances of /dev/loop:

  1. /dev/loop0
  2. /dev/loop1
  3. /dev/loop2
  4. /dev/loop3