Docker 101 : Storage drivers and volumes drivers

Storage drivers deal with the images, the UFS filesystem - Union File System -, storage, docker image layers and the COW - Copy On write - system for storing data on the writable layer of the image.

Below some examples of storage drivers:
  • ZFS.
  • BTRFS.
  • Overlay.
  • Overlay2.
If we want the storage to be persistent, we need to to create volumes which are managed by volume drivers.
The "local volume driver" manages the volumes created on the host's filesystem in "/var/lib/docker/volumes".

There are other volume drivers plugins that allow us to create volumes - provision storage - on other platforms such as,  Azure File storage, VMware vSphere Storage, Portworx, ...

Below is an example of how we could use volume drivers.
Mongodb is the image we use, it uses the storage provided by the volume driver plugin:

  • source : location of the volume.
  • target : location on container "mountpoint".


Leave as a comment: