Docker Server Re-Initialization: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= If Docker is already running, re-initialize Docker: This will destroy any containers or images currently on the host. # systemctl stop docker # rm -rf /var/l...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
=Internal=
=Internal=


=Overview=


Docker state can be reset - for example in the case of re-initializing the external storage - by following the procedure below. This is necessary because the Docker server caches a  "Base Device UUID" that does not match the signature of a re-initialized external storage.


=Procedure=


<pre>
systemctl stop docker
</pre>


If there is any content in /var/lib/docker/, it must be deleted. Files will be present if Docker has been used.


If Docker is already running, re-initialize Docker:
<pre>
rm -rf /var/lib/docker/*
</pre>


This will destroy any containers or images currently on the host.
<pre>
# systemctl stop docker
systemctl start docker
# rm -rf /var/lib/docker/*
</pre>
# systemctl restart docker
If there is any content in /var/lib/docker/, it must be deleted. Files will be present if Docker has been used prior to the installation of OpenShift Container Platform.


Then go to https://docs.openshift.com/container-platform/3.5/install_config/install/host_preparation.html#reconfiguring-docker-storage
{{External|https://docs.openshift.com/container-platform/3.5/install_config/install/host_preparation.html#reconfiguring-docker-storage}}
</font>

Latest revision as of 01:44, 24 May 2017

Internal

Overview

Docker state can be reset - for example in the case of re-initializing the external storage - by following the procedure below. This is necessary because the Docker server caches a "Base Device UUID" that does not match the signature of a re-initialized external storage.

Procedure

systemctl stop docker

If there is any content in /var/lib/docker/, it must be deleted. Files will be present if Docker has been used.

rm -rf /var/lib/docker/*
systemctl start docker
https://docs.openshift.com/container-platform/3.5/install_config/install/host_preparation.html#reconfiguring-docker-storage