linux_wiki:docker

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux_wiki:docker [2018/04/09 01:07]
billdozor created
linux_wiki:docker [2019/07/20 18:13] (current)
billdozor [Docker: Storage]
Line 40: Line 40:
     * This thin logical volume will be used by the docker daemon directly to automatically setup a file system and allocate space for docker data and metadata.     * This thin logical volume will be used by the docker daemon directly to automatically setup a file system and allocate space for docker data and metadata.
     * **NOTE:** This space is NOT used for docker container image storage. (/var is the default)     * **NOTE:** This space is NOT used for docker container image storage. (/var is the default)
 +
 +\\
 +If you ever need to increase docker container data storage OR metadata storage, they can be resized individually.
 +  * Resize docker pool metadata example (increase by 1 GB)<code bash>lvextend --size +1G -n vglocal/lvdockerpool_tmeta</code>
 +  * Resize docker pool storage example (increase by 10 GB)<code bash>lvextend --size +10G -n vglocal/lvdockerpool_tdata</code>
  
 \\ \\
Line 84: Line 89:
   * Log out/log back in   * Log out/log back in
   * Verify the user can run docker commands without using sudo<code bash>docker run hello-world</code>   * Verify the user can run docker commands without using sudo<code bash>docker run hello-world</code>
 +
 +----
 +
 +====== Troubleshooting ======
 +
 +  * **Symptom**: Docker service fails to start
 +  * **Error Seen In Logs**: Error starting daemon: error initializing graphdriver: devicemapper: Non existing device vglocal-lvdockerpool
 +  * **Why**: /var/lib/docker contains metadata telling docker about the contents of device mapper storage. When /var/lib/docker is removed, metadata is lost. Then docker will detect the thin pool has data, but docker is unable to use it.
 +  * **Official Documentation**: https://access.redhat.com/solutions/2281281 
 +
 +__**The Fix**__
 +
 +  * Stop docker<code bash>systemctl stop docker</code>
 +  * Remove the docker thin pool logical volume<code bash>lvremove /dev/vglocal/lvdockerpool</code>
 +  * Re-create it (example using 100% of /dev/sde1)<code bash>lvcreate --extents 100%PVS --thin --name lvdockerpool vglocal /dev/sde1</code>
  
 ---- ----
  
  • linux_wiki/docker.1523250442.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)