Docker Community Forums

Share and learn in the Docker community.

How to expand Metadata partition

How to expand docker-docker–pool_tmeta ? Appreciate any clues. I could expand ‘Data Space Available’ and not ‘Metadata Space Available

sometimes i see this message when i try to create a container

Thin Pool has X free metadata blocks which is less than minimum required Y free metadata blocks.
Create more free metadata space in thin pool or
use dm.min_free_space option to change behavior

> lsblk >
> --
> nvme1n1                                259:0    0  50G  0 disk 
> └─nvme1n1p1                            259:1    0  50G  0 part 
>  ├─docker-docker--pool_tdata          253:1    0  50G  0 lvm  
>  │ └─docker-docker--pool              253:2    0  50G  0 lvm  
>  │   └─docker-259:5-394463-aaa8
>                  253:3    0  10G  0 dm   /var/lib/docker/devicemapper/mnt/aaa88928d
>  └─docker-docker--pool_tmeta          253:0    0  24M  0 lvm  
>    └─docker-docker--pool              253:2    0  50G  0 lvm  
>      └─docker-259:5-394463-aaa88928
>                                       253:3    0  10G  0 dm   
> --


> docker info >
> --
>  Data Space Used: 337.1MB
>   Data Space Total: 53.63GB
>   Data Space Available: 53.3GB
> Metadata Space Used: 2.712MB
>  Metadata Space Total: 25.17MB
>  Metadata Space Available: 22.45MB
> --

Use this for ext3/4 based file systems

resize2fs /dev/centos/var
Alternatively, use this for xfs based file systems

xfs_growfs /dev/centos/var
After the file system has been resized the space should be ready to use. If you run a ‘df’ command to view the disk space you should see that it’s been increased successfully.

[root@CentOS7 mnt]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 9.8G 1.4G 8.5G 14% /
devtmpfs 908M 0 908M 0% /dev
tmpfs 914M 0 914M 0% /dev/shm
tmpfs 914M 8.6M 905M 1% /run
tmpfs 914M 0 914M 0% /sys/fs/cgroup
/dev/sda1 497M 96M 402M 20% /boot
/dev/mapper/centos-var 10G 33M 10G 1% /mnt
In this example I have run a ‘mount /dev/centos/var /mnt’ to mount the logical volume to /mnt, as shown above /mnt is correctly reporting a size of 10G.

Thank you lewish95.
Still having problem…
Does this grow both docker-docker–pool_tdata and docker-docker–pool_tmeta ? I am not seeing docker-docker–pool_tmeta being grown beyong 24M. Not sure where us this 24M default value being picked.

lewish95 is a bot. Looks like it plagiarized the answer from here.

1 Like