http://shanker.blog.51cto.com/1189689/1783910
Recently, we have been studying Mesos, marathon container cloud platform with Docker, Mesos framework has been set up, and marathon can implement simple Docker application management, and then try to build Mesosphere Company's dc/today. OS Platform (https://dcos.io/), using this platform can easily implement the container-based cloud computing platform resource scheduling, management, application allocation, load balancing, dynamic expansion, failover and so on. The Dc/os bottom system is also based on Docker, and according to the official documentation we have changed the Docker default filesystem Devicemapper on the CentOS7 system to OVERLAYFS.
Docker initially supported the filesystem is AUFS, is a kind of union file system, the principle is to hang multiple directories in the same virtual directory, the entire file system is a hierarchical concept, see figure:
Then the Redhat series system is not support Aufs, when Docker becomes more and more popular, Redhat company release I also have to plug in, and then Redhat company on this aufs study a bit, and then say "Well, we're good, I'm going to develop a new set of file systems to run Docker ". Later, the system was based on the Devicemapper technology that was introduced after kernel2.6. The main use of Docker is Snapshot and thinly-provisioned Snapshot, this Snapshot in the LVM logical volume management scenario used to create virtual snapshots, Thin-provisioning is a technology that uses virtualization to reduce physical storage deployment to maximize storage space utilization. When these two technologies are combined, Devicemapper gives the Redhat system the final solution for the Docker file system. In fact, this scheme is also based on layered theory to create snapshots for each layer of mirroring. As shown in figure:
However, the performance of devicemapper is not so good, Dc/os the official website gives the explanation is to appear unknown issue and no longer Docker inside the run Docker, Devicemapper creates LOOP-LVM by default to build snapshots of mirrors and containers. However, in a production environment, Docker officially recommends using a direct-attached LVM volume to build the mirrors and containers, and then use the following method to load the Docker daemon when it launches:
1 2 3) 4 5 |
{"Storage-driver": "Devicemapper", "storage-opts": ["Dm.thinpooldev=/dev/mapper/docker-thinpool "," Dm.use_deferred_removal=true "]} |
Run Docker info in your system to see what file system you are using:
This is the Cent6.5 system, found to be using Devicemapper, and the data file is loop0: