Hide Forgot
I stopped docker and ran rm -rf /var/lib/docker I then tried to start docker and it failed with: level=fatal msg="Error starting daemon: error initializing graphdriver: Unable to take ownership of thin-pool (dockerVG-docker--pool) that already has used data blocks" Eventually Vgoyal pointed me to: https://access.redhat.com/documentation/en/red-hat-enterprise-linux-atomic-host/version-7/getting-started-with-containers/#changing_docker_storage_configuration Which describes deleting the lv and restarting docker. This solved my problem. However this document was completely undiscoverable. The error message does not show up in the doc. Nor does the doc describe that deleting /var/lib/docker requires deleting the lv. I would like for searched on the error message from docker to point me to a solution.
I wrote a KCS solution (https://access.redhat.com/solutions/2281281) that includes the issue (deleting the /var/lib/docker directory), the error message that occurs when starting docker, and a pointer to the docs that addresses the problem. Yoana, could you check with Eric Paris and make sure this addresses the issue? Thanks!
I feel like the kcs kinda misses telling users the actual problem. Nor does it really make it clear the solution. IF you are using device mapper (instead of loopback) /var/lib/docker contains metadata informing docker about the contents of the device mapper storage area. If you delete /var/lib/docker that metadata is lost. Docker is then able to detect that the thin pool has data but docker is unable to make use of that information. The only solution is to delete the thin pool and recreate it so that both the thin pool and the metadata in /var/lib/docker will be empty.
I took another shot at correcting this solution: https://access.redhat.com/solutions/2281281. Eric, let me know if that covers the issue or requires further changes. Feel free to make edits yourself. Once you okay it, I'll publish it as verified.
Hi Eric, does the KCS solution cover what you had in mind for this BZ? I think in this case the guide won't need updating since the article is more to the point.
It is good. I do not believe one line is quite right ``` # rm /etc/sysconfig/docker-storage-setup ``` The directions should likely tell you to - stop docker - lvremove - configure /etc/sysconfig/docker-storage-setup - start docker
Eric, what do you mean with "configure /etc/docker-storage-setup"? Edit the file directly?
That line might be better written as: - stop docker - lvremove - configure docker-storage-setup according to https://access.redhat.com/documentation/en/red-hat-enterprise-linux-atomic-host/version-7/getting-started-with-containers/#managing_storage_with_docker_formatted_containers - start docker
Ok, edited. Thanks, Eric. https://access.redhat.com/solutions/2281281
looks great!