Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the features of Docker storage driver

2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Xiaobian to share with you what the characteristics of Docker storage driver, I hope you have something to gain after reading this article, let's discuss it together!

Pluggable storage drive architecture

Docker's storage driver architecture is pluggable, allowing you to easily "plug in"Docker with storage drivers that fit your environment and use case. Each Docker storage driver is built on top of a Linux file system or volume management system, and is free to implement image and container layer management in its own way. This means that some storage drives perform better than others in different scenarios.

Once you decide which driver is best, you can set the driver into Docker before Docker daemon starts, so you can run Docker daemon on that storage driver, and all new containers will be created using that driver. The following figure shows the supported driver technologies and their corresponding Docker storage driver names.

TechnologyStorage driver nameOverlayFSoverlay / overlay2AUFSaufsBtrfsbtrfsDevice MapperdevicemapperVFSvfsZFSzfs The docker info command can be used to see which storage driver the current daemon is using.

$ docker infoContainers: 0 Running: 0 Paused: 0 Stopped: 0Images: 1Server Version: 1.12.6Storage Driver: overlay2 Backing Filesystem: extfs... output truncated ...

The output above indicates that the Docker daemon uses overlay2 as its storage driver and its Backing Filesystem is extfs. That is, in my environment, the overlay2 storage drive operates on the ext file system. Back-end file systems refer to file systems where Docker host's local storage area/var/lib/docker is created.

Storage drivers can run on certain backend file systems, but there are also unsupported backend file systems. The corresponding relationship between them is as follows:

Storage driver Backend file system unsupported Backend file system overlay ext 4 xfsbtrfs aufs overlay zfs eCryptfsauftext 4 xfsbtrfs aufs overlay zfs eCryptfsauftext 4 xfsbtrfs aufs eCryptfsbtrfsbtrfs onlyN/Adevicemapperdirect-lvmN/Avfsdebugging onlyN/Azfszfs onlyN/A To set the storage driver, add the parameter--storage-driver= when dockerd starts, or set the DOCKER_OPTS option to the/etc/default/docker file. The following command shows how to use the devicemapper storage driver in the dockerd command.

$ dockerd --storage-driver=devicemapper &$ docker infoContainers: 0Images: 0Storage Driver: devicemapper Pool Name: docker-252:0-147544-pool Pool Blocksize: 65.54 kB Backing Filesystem: extfs Data file: /dev/loop0 Metadata file: /dev/loop1 Data Space Used: 1.821 GB Data Space Total: 107.4 GB Data Space Available: 3.174 GB Metadata Space Used: 1.479 MB Metadata Space Total: 2.147 GB Metadata Space Available: 2.146 GB Thin Pool Minimum Free Space: 10.74 GB Udev Sync Supported: true Deferred Removal Enabled: false Data loop file: /var/lib/docker/devicemapper/devicemapper/data Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata Library Version: 1.02.90 (2014-09-01)Execution Driver: native-0.2

The choice of storage drive will affect the performance of your container application, so it is important to understand the differences and pros and cons between storage drives before choosing the right one.

Shared storage systems and storage drives

Many enterprises derive storage resources from shared file systems such as SAN and NAS. In general, this results in better performance and higher availability, as well as advanced features such as overprovisioning, copy deletion, compression, etc.

Docker storage drives and data volumes can both run on the storage provided by these shared storage systems, allowing Docker to take advantage of the superior performance and availability these systems offer.

What storage drive is used?

There are many ways to influence your choice of storage drive, but there are two things to remember:

No driver fits all user scenarios;

Storage drives are constantly being upgraded and improved;

In addition, the following content can also provide some guidance.

stability

For a more stable Docker environment, you should consider a few suggestions:

▪ Use the default storage driver for your OS distribution. When Docker is installed, it selects the default storage driver based on your system, and stability is a major aspect of its selection.

Follow the configuration specified in the CS Engine compatibility matrix. CS Engine is a commercial version of Docker Engine based on the open source Engine. However, it has a limited set of supported configurations that use the most stable and mature storage drives.

experience and professional skills

Choose a store where you and your team both have experience. For example, if you are using RHEL OS, you may have experience with LVM and Device Mapper, so you should use devicemapper storage driver.

If you have no experience with Docker's storage drivers and you want to use a simple and stable Docker environment, then you might consider using your distribution's default Docker storage drivers.

After reading this article, I believe you have a certain understanding of "what are the features of Docker storage driver". If you want to know more about it, please pay attention to the industry information channel. Thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report