docker storage backend and container-generated data storage

146 Views Asked by At

I am learning about Docker storage and I am little bit confused about

Question 1 :
Do we have for each docker host 1 backend store ( to store layers of images and writable-layers of containers ) ?

and if we configure a container-generated data store ( to persist the data wrote by a container (Volumes,Bind mounts,tmpfs mounts) ) are we going have 2 stores ( backend and container-generated-data store ) or is it just one store ?

Question 2 : suppose we have configured a volume to persist container-generated data , is it still gonning to be a a union fs layer somewhere else that is going to be persisted even if the container is removed ?

Question 3 : containers are runnable images , but concretly can you explain to me what are they ? are they just a unionFs layer ?

Question 4 :
if we uninstall or stop docker is the thin pool on loopback device saved or is it removed ?

and what if we configure a thin pool on a logical volume and we uninstall docker will we still have the images and the container-generated data on the logical volume ?

Question 5 : how do we configure docker to use a group volume ( or a logical volume ) in a remote machine ?

Question 6 : what is the different between the persistant storage configured for kubernetes/okd/openshift cluser and the persistant storage configured for docker and does the configuration for docker storage conflict with the one of kubernetes ? https://docs.okd.io/latest/install_config/persistent_storage/index.html https://docs.okd.io/latest/install_config/persistent_storage/index.html

1

There are 1 best solutions below

0
On BEST ANSWER

Answer 1 :

Yes we have one and only one docker backend storage for each docker host

  1. backend store : is used to store only the images and the container layer

  2. volumes

    • if volume bind : then store in filesystem else in :
    • /var/lib/docker/volumes/

3 . Bind mounts : stored anywhere on the host system
4 . tmpfs mounts : stored anywhere on the host system

Answer 2 :

volumes are not used to persist all the container layer but a specific folder

Answer 3 :

containers are just layers on top of the image layer where the process that it runs are isolated using

Answer 4 :

writable layer using backend store on loop back device is ephemeral so it won't be persisted after stop of docker container nore uninstall of docker engine.

Answer 5 :

use SAN or NAS

Answer 6 :

docker storage is used to store images and container kubernetes is used to persist data of containers