In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains the "docker migration data directory method is what", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "docker migration data directory method is what" it!
View disk use # du-hs / var/lib/docker/ 237G / var/lib/docker/# docker system dfTYPE TOTAL ACTIVE SIZE RECLAIMABLEImages 7 2 122.2GB 79.07GB (64%) Containers 22 61.96GB 0B (0%) Local Volumes 000B 0BBuild Cache 000B 0B disk cleanup (do not use easily) # docker system prune command can be used to clean disks Delete closed containers, useless data volumes, and networks to mirror without tag. The # docker system prune-a command deletes Docker images without containers. Note that these two commands delete temporarily closed containers and Docker images that are not used for the time being. Migrate data [stop docker] # systemctl stop docker [create a new docker directory] # mkdir-p / home/docker/lib [migrate / var/lib/docker directory] (Note: you can mv directly to ensure that the disk is large enough) # rsync-avz / var/lib/docker / home/docker/lib/ [add configuration] to check whether / etc/systemd/system/docker.service.d/devicemapper.conf exists. If it doesn't exist, create a new one. # mkdir-p / etc/systemd/system/docker.service.d/# vi / etc/systemd/system/docker.service.d/devicemapper.conf (Note: added configuration for devicemapper.conf: synchronize the parent folder at the same time The actual directory should be in / home/docker/lib/docker) [Service] ExecStart=ExecStart=/usr/bin/dockerd-- graph=/home/docker/lib/docker [reload docker] # systemctl daemon-reload# systemctl restart docker# systemctl enable docker [check docker info] # docker info | grep "Docker Root Dir" is changed to: / home/docker/lib/docker [check Image] # docker images [Clean original data] and delete the files in the / var/lib/docker/ directory after confirming that the container has no problem. # rm-rf / var/lib/docker Thank you for your reading. The above is the content of "what is the method of docker migrating data directories". After the study of this article, I believe you have a deeper understanding of what is the method of docker migrating data directories, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.