Docker daemon 无法启动: does not match with stored UUID错误解决办法

时间:2021-05-19

Docker daemon 无法启动: does not match with stored UUID错误

最近做项目,遇到Docker daemon 无法启动: does not match with stored UUID错误的问题,经过上网查找资料解决了问题,这里记录下解决办法。

Docker 默认使用loop设备存储镜像。使用/var/lib/docker存储。但是当根分区不够大的时候(Centos7默认安装只有50G),那就麻烦了。

这里提供下修改方法(以centos7操作系统为例):

1. systemctl stop docker

2. mount /dev/sdb1 /tmp

3. cp -arf /var/lib/docker/* /tmp

4. rm -rf /var/lib/docker

5. umount /tmp; mount /dev/sdb1 /var/lib/docker

6. systemctl start docker

如果执行第六步骤的时候报错:

Nov 03 15:35:47 master-57 dockerd[11586]: time="2016-11-03T15:35:47.950627346+08:00" level=error msg="[graphdriver] prior storage driver \"devicemapper\" failed: devmapper: Base Device UUID and Filesystem verification failed: devmapper:Current Base Device UUID:15b94e74-7712-44bc-b695-9c2c633b8b3a does not match with stored UUID:cba4570c-421a-4612-8030-e7734d6365c7. Possibly using a different thin pool than last invocation"Nov 03 15:35:47 master-57 dockerd[11586]: time="2016-11-03T15:35:47.950782770+08:00" level=fatal msg="Error starting daemon: error initializing graphdriver: devmapper: Base Device UUID and Filesystem verification failed: devmapper: Current Base Device UUID:15b94e74-7712-44bc-b695-9c2c633b8b3a does not match with stored UUID:cba4570c-421a-4612-8030-e7734d6365c7. Possibly using a different thin pool than last invocation"

那么按照下列方法修改:

stored UUID 存储在 /var/lib/docker/devicemapper/metadata/deviceset-metadata 里面。 替换成Current Base Device UUID即可。

感谢阅读, 希望能帮助到大家,谢谢大家对本站的支持!

声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。

相关文章