Solution to the problem of insufficient storage resource pool of Docker server

Solution to the problem of insufficient storage resource pool of Docker server

System environment:

  • Docker version: 19.03.13
  • Operating system version: CentOS 7.8

1. Problem Description

Recently, when executing the Docker run command to start the image, the Docker start image command could not be executed normally, and the following error message was prompted:

Error: Error response from daemon: devmapper: Thin Pool has 163051 free data blocks which is less than minimum required 163840 free data blocks. Create more free space in thin pool or use dm.min_free_space option to change behavior

2. Problem Analysis

According to the error message, the problem is that the Docker Thin Pool is running out of space. You need to create more free space for the pool or use the dm.min_free_space option to change the size of the pool's free space.

We use the following command to view the Docker information on the server and observe the resource usage:

$ docker info

The displayed content is as follows:

...
Data Space Total: 507.4GB
Data Space Available: 100.67GB
Metadata Space Used: 100.4MB
Metadata Space Total: 20.147GB
Metadata Space Available: 20.047GB
Thin Pool Minimum Free Space: 100.74GB
Deferred Removal Enabled: true
Deferred Deletion Enabled: true
Deferred Deleted Device Count: 0
...

From the above information, we can see that the Thin Pool Minimum Free Space = 100.74GB and the Data Space Available = 100.67, which means that the Data Space Available available space is lower than the minimum space required by the Thin Pool, which will cause the mirror to fail to start normally.

3. Problem Solving

1. Check Docker disk usage

We can use the following command to view Docker disk usage:

$ docker system df

TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 500 12 38.31GB 34.5GB (90%)
Containers 64 21 157MB 4.109MB (2%)
Local Volumes 37 18 0B 0B
Build Cache 0 0  

The following information is listed in total:

  • TYPE: resource type;
  • TOTAL: total number of resources;
  • ACTIVE: The number of resources in active state;
  • SIZE: the size of the space used by the resource;
  • RECLAIMABLE: the size of reclaimable resources;

The components are:

  • Images: the amount of storage space occupied by the image;
  • Containers: The amount of storage space occupied by the started container
  • Local Volumes: The storage space used by the locally mounted volumes;
  • Build Cache: The storage space occupied by the build cache;

If you want to view the system usage in detail, you can use the -v command to view the storage usage details of each resource.

2. Execute cleanup commands for reclaimable storage resources

Docker provides a storage resource recycling function. The command is as follows:

For details on the cleanup command, please refer to the official Docker documentation: docker system prune

$ docker system prune

This command will clean up all unused containers, networks, images (dangling and unreferenced), and volumes (optional). After executing this command, wait for a while, and after enough resources are recovered, the Docker image will return to normal.

Summarize

This is the end of this article about how to solve the problem of insufficient storage resource pool on Docker server. For more information about how to solve the problem of insufficient storage resource pool on Docker server, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed explanation of Docker modifying existing images (commit)
  • How to view files in Docker image
  • Docker Modify Docker storage location Modify container image size limit operation

<<:  A brief analysis of MySQL cardinality statistics

>>:  Detailed explanation of HTML form elements (Part 1)

Recommend

Mysql join query principle knowledge points

Mysql join query 1. Basic concepts Connect each r...

Explain TypeScript mapped types and better literal type inference

Table of contents Overview Using mapped types to ...

Use JS to zoom in and out when you put the mouse on the image

Use JS to zoom in and out when the mouse is on th...

5 ways to quickly remove the blank space of Inline-Block in HTML

The inline-block property value becomes very usef...

About the correct way to convert time in js when importing excel

Table of contents 1. Basics 2. Problem Descriptio...

XHTML Getting Started Tutorial: XHTML Web Page Image Application

<br />Adding pictures reasonably can make a ...

Specific use of Docker anonymous mount and named mount

Table of contents Data volume Anonymous and named...

JavaScript to achieve simple image switching

This article shares the specific code for JavaScr...

HTML left and right layout example code

CSS: Copy code The code is as follows: html,body{ ...

About the selection of time date type and string type in MySQL

Table of contents 1. Usage of DATETIME and TIMEST...

CSS3 property line-clamp controls the use of text lines

Description: Limit the number of lines of text di...

Docker installation Nginx tutorial implementation illustration

Let’s install Nginx and try it out. Please note t...