error initializing graphdriver: devmapper: Base Device UUID and Filesystem verif

z597011036發表於2020-01-04

1.docker服務啟動報錯(此錯誤資訊是因為docker配置檔案與loop磁碟的UUID不一至導致)

[root@ecsnode03 ifly]# journalctl  -u docker -f
-- Logs begin at Wed 2019-12-11 22:59:33 CST. --
Dec 11 22:59:40 ecsnode03 systemd[1]: Starting Docker Application Container Engine...
Dec 11 22:59:41 ecsnode03 dockerd[1226]: time="2019-12-11T22:59:41.063315645+08:00" level=info msg="libcontainerd: new containerd process, pid: 1755"
Dec 11 22:59:42 ecsnode03 dockerd[1226]: time="2019-12-11T22:59:42.281844881+08:00" level=warning msg="devmapper: Usage of loopback devices is strongly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or use `man docker` to refer to dm.thinpooldev section."
Dec 11 22:59:42 ecsnode03 dockerd[1226]: time="2019-12-11T22:59:42.326215305+08:00" level=error msg="[graphdriver] prior storage driver \"devicemapper\" failed: devmapper: Base Device UUID and Filesystem verification failed: devmapper: Current Base Device UUID:304bc993-f955-4043-b2f8-637b26564757 does not match with stored UUID:55f465c2-a746-4c74-a4d4-ab10cdca595c. Possibly using a different thin pool than last invocation"
Dec 11 22:59:42 ecsnode03 dockerd[1226]: time="2019-12-11T22:59:42.326351360+08:00" level=fatal msg="Error starting daemon: error initializing graphdriver: devmapper: Base Device UUID and Filesystem verification failed: devmapper: Current Base Device UUID:304bc993-f955-4043-b2f8-637b26564757 does not match with stored UUID:55f465c2-a746-4c74-a4d4-ab10cdca595c. Possibly using a different thin pool than last invocation"
Dec 11 22:59:42 ecsnode03 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Dec 11 22:59:42 ecsnode03 systemd[1]: Failed to start Docker Application Container Engine.
Dec 11 22:59:42 ecsnode03 systemd[1]: Unit docker.service entered failed state.
Dec 11 22:59:42 ecsnode03 systemd[1]: docker.service failed.


2.排查方法及處理過程

(1).檢查docker資料存放目錄

[root@ecsnode03 ~]# vim /usr/lib/systemd/system/docker.service

[root@ecsnode03 ~]# vim /data/docker-mapper/devicemapper/metadata/deviceset-metadata

{"next_device_id":1,"BaseDeviceUUID":" bc801ce6-0b03-45ad-b538-04760fb4f2c2","BaseDeviceFilesystem":"xfs"}

(2).檢視磁碟loop的UUID是否一至,如果不一至請修改以上配置檔案。(我已經修改了)

[root@ecsnode03 ~]# lsblk -af
NAME                                        FSTYPE      LABEL UUID                                   MOUNTPOINT
loop1                                                                                                                                               
└─docker-253:2-805306452-pool                                                                                                                       
  ├─docker-253:2-805306452-d654b716ff01bd676554f1dfe572eebe1e63dc7831ad38cd4fafb075837c2b60 xfs               bc801ce6-0b03-45ad-b538-04760fb4f2c2   /data/docker-mapper/devicemapper/mnt/d654b716ff01bd676554f1dfe572eebe1e63dc7831ad38cd4fafb075837c2b60
  ├─docker-253:2-805306452-9d77d82e4a42bf3176ee91ba4b741271de22b49fa9b89892c9daa63d0a9000e5 xfs               bc801ce6-0b03-45ad-b538-04760fb4f2c2   /data/docker-mapper/devicemapper/mnt/9d77d82e4a42bf3176ee91ba4b741271de22b49fa9b89892c9daa63d0a9000e5
  ├─docker-253:2-805306452-e28211099cb7567d8f565b4b741b3a445a33e7f4404e6f3c6434d5123e286e66 xfs               bc801ce6-0b03-45ad-b538-04760fb4f2c2   /data/docker-mapper/devicemapper/mnt/e28211099cb7567d8f565b4b741b3a445a33e7f4404e6f3c6434d5123e286e66
  ├─docker-253:2-805306452-b326d2e147e7f69ac67187d957fd871c7fd70016766cfefe9fe22cb1bb553bf0 xfs               bc801ce6-0b03-45ad-b538-04760fb4f2c2   /data/docker-mapper/devicemapper/mnt/b326d2e147e7f69ac67187d957fd871c7fd70016766cfefe9fe22cb1bb553bf0


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25854343/viewspace-2671928/,如需轉載,請註明出處,否則將追究法律責任。

相關文章