gpt4 book ai didi

docker - Docker aufs和devicemapper目录都存在

转载 作者:行者123 更新时间:2023-12-02 18:24:51 25 4
gpt4 key购买 nike

我试图清理服务器上的一些空间,发现/var/lib/docker/aufs/var/lib/docker/devicemapper都存在。

  Usage of /:   86.8% of 78.62GB   Users logged in:        0
ncdu 1.10 ~ Use the arrow keys to navigate, press ? for help
--- /var/lib/docker ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/..
35.3GiB [##########] /aufs
21.4GiB [###### ] /devicemapper
810.5MiB [ ] /tmp
188.3MiB [ ] /containers
96.3MiB [ ] /init
29.4MiB [ ] linkgraph.db
13.4MiB [ ] /graph
1.2MiB [ ] /execdriver
108.0KiB [ ] /volumes
36.0KiB [ ] /vfs
8.0KiB [ ] /trust
8.0KiB [ ] repositories-aufs
4.0KiB [ ] repositories-devicemapper

由于似乎一次只能启用一个,所以我有些困惑。当我运行 docker info时,好像启用了devicemapper而不是aufs:
root@bsc:/var/lib/docker/aufs# docker info
Containers: 115
Images: 326
Storage Driver: devicemapper
Pool Name: docker-253:1-1318913-pool
Pool Blocksize: 65.54 kB
Backing Filesystem: extfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 15.67 GB
Data Space Total: 107.4 GB
Data Space Available: 10.96 GB
Metadata Space Used: 25.83 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.122 GB
Udev Sync Supported: false
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.82-git (2013-10-04)
Execution Driver: native-0.2
Kernel Version: 3.13.0-36-generic
Operating System: Ubuntu 14.04.2 LTS
CPUs: 4
Total Memory: 7.798 GiB
Name: bsc
ID: HCND:CWXF:XVRP:OZ45:HDHS:LLNO:Z2T3:L4XZ:UE6N:AOTW:A5C5:PZ76

这是否意味着删除 /var/lib/docker/devicemapper目录是安全的?

最佳答案

看起来您的docker曾经使用aufs作为存储后端,但切换到了devicemapper。 (可能是由于升级了docker包导致的)

如果您(或您的包管理器)更改了存储后端,则docker不会将现有的容器和/或镜像转换为使用新的存储后端。因此,您将看到一个空的容器和图像列表。但是文件将保留在那里。因此,只要您不需要aufs目录中的容器和图像,就可以删除它。

关于docker - Docker aufs和devicemapper目录都存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31011827/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com