Home  >  Article  >  Operation and Maintenance  >  What should I do if the docker image is missing?

What should I do if the docker image is missing?

藏色散人
藏色散人Original
2022-01-20 14:38:086130browse

Solutions to the missing docker image: 1. Add hard disk space to root; 2. Divide space from home to root; 3. Back up data; 4. Unmount; 5. Create 1.8t "lv home"; 6. Mount and restore the data.

What should I do if the docker image is missing?

The operating environment of this article: centOS6.8 system, Docker version 18.09.x, Dell G3 computer.

What should I do if the docker image disappears?

Docker images mirror disappears solution

50,93 there is a situation where the mirror disappears

[root@h50 /]# df -h
文件系统             容量  已用  可用 已用% 挂载点
devtmpfs              24G     0   24G    0% /dev
tmpfs                 24G     0   24G    0% /dev/shm
tmpfs                 24G  428M   24G    2% /run
tmpfs                 24G     0   24G    0% /sys/fs/cgroup
/dev/mapper/cl-root   50G   43G  8.0G   85% /

The remaining 85% of root

overlay 50G 43G 8.0G 85% /var/lib/docker/overlay2/9e1d9bbd368c8ebafde39dcaaa66afecde95bfab7db51b13fe92aa5c7995cc9e/merged

The mirror uses the space under root

cat /var/lib/kubelet/config.yaml
evictionHard:
  imagefs.available: 15%
  memory.available: 100Mi
  nodefs.available: 10%
  nodefs.inodesFree: 5%

If less than 15% of imagesfs is evicted, eviction will occur.

It should be followed by This is related

Try to add hard disk space for root, divide the space from home to root

Add 7 t space on 93

Add space for root on lv

resize2fs /dev/mapper/centos-root 发生错误
xfs_growfs /dev/mapper/centos-root

Data backup

scp -r /home/ root@10.10.108.93:/root/home50/*

Unmount

umount -l /home
lvextend -L +80g /dev/centos/root

Need to update xfs after adding

xfs_growfs /dev/mapper/centos-root

Unable to mount and need to be repaired

xfs_repair /dev/cl/home

Due to the long repair time of several T

Delete lv home

lvremove /dev/centos/home

Create 1.8t lv home

lvcreate -n home -L 1.9T /dev/centos

Format to xfs system

mkfs.xfs /dev/centos/home

hang Load

mount /dev/mapper/centos-home /home

Restore data back

Increase home size

lvextend -L +1.8t /dev/centos/home
xfs_growfs /dev/mapper/cl-home

Restore home size at this time

Restore data back

scp -r root@10.10.108.93:/root/home52/* /home/

2. Reduce

xfs does not support reduction. lvreduce cannot be used, but resize2fs cannot be used. An error will be reported: Couldn't find valid filesystem superblock. This means that the reduced logical partition needs to be reformatted through the mkfs.

Pay attention to the boot mount

cat /etc/fstab
60上
lvreduce -L 5t /dev/centos/home
lvextend -L +1.8t /dev/centos/root
xfs_growfs /dev/mapper/centos-home

Recommended learning: "

docker video tutorial

"

The above is the detailed content of What should I do if the docker image is missing?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn