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

Vue uses vue-quill-editor rich text editor and uploads pictures to the server

Table of contents 1. Preparation 2. Define the gl...

Detailed explanation of Nginx rewrite jump application scenarios

Application scenario 1: Domain name-based redirec...

HTML insert image example (html add image)

Inserting images into HTML requires HTML tags to ...

Complete steps to install mysql5.7 on Mac (with pictures and text)

I recently used a Mac system and was preparing to...

CocosCreator general framework design resource management

Table of contents Problems with resource manageme...

Detailed installation process of Jenkins on Linux

Table of contents 1. Install JDK 2. Install Jenki...

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

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

Vue implements a simple shopping cart example

This article shares the specific code of Vue to i...

Nodejs uses readline to prompt for content input example code

Table of contents Preface 1. bat executes js 2. T...

How to make full use of multi-core CPU in node.js

Table of contents Overview How to make full use o...

Comparative Analysis of MySQL Binlog Log Processing Tools

Table of contents Canal Maxwell Databus Alibaba C...