[[email protected] ~]# docker versionclient: version: 1.9.1 API version: 1.21 Package version: docker-common-1.9.1-40.el7.centos.x86_64 go version: go1.4.2 Git commit: ab77bde/1.9.1 Built: OS/Arch: linux/amd64Server: Version: 1.9.1 api version: 1.21 package version: docker-common-1.9.1-40.el7.centos.x86_64 go version: go1.4.2 Git commit: ab77bde/1.9.1 Built: os/arch:&nBsp; linux/amd64
Start Docker to find the following log;
June 18:00:11 localhost Systemd:docker-storage-setup.service:main process exited, code=exited, status=1/failure
June 18:00:11 localhost systemd:failed to start Docker Storage Setup.
June 18:00:11 localhost Systemd:unit Docker-storage-setup.service entered failed state.
June 18:00:11 localhost Systemd:docker-storage-setup.service failed.
Analysis: said to be Docker-storage-setup.service can not run. This service calls the Docker-storage-setup command, and this command
is to see the/etc/sysconfig/docker-storage-setup file.
Man Docker-storage-setup:storage_driver: The default is "Devicemapper", which is what we need, the other is "" "Null value, and" overlay ", Devicemapper is dependent on LVM, This is true on the earlier centos7, which can be an error in this version (perhaps slightly newer).
After interviewing the VG with DEVS option, still not.
Baidu a mistake, no this related, said the data volume was completed, the error data is full of errors caused.
Google does, and Bing, has found a few related issues:
1. It is also the cause of/etc/sysconfig/docker-storage-setup.
2./etc/sysconfig/docker-storage the contents of this file is not writable, is to be generated with docker-storage-setup, and this command is to read/etc/sysconfig/ Docker-storage-setup the configuration of this file.
3. Search for such a sentence:
Also, in a cloud (openstack/aws/etc.) scenario with the Devicemapper backend, Docker-storage-setup can Also expand the roo T volume group to fill the space allocated for the root disk if Growpart=true is set.
To use the Devicemapper option, use the Growpart = True option to enable LVM tuning. By default, this option is false.
This option is turned on by relying on the/usr/bin/growpart command.
Solution :
1. Stop the Docker service
2. Delete the/var/lib/docker directory
3. Add in the/etc/sysconfig/docker-storage-setup file
Storage_driver= "Devicemapper"
Growpart= "true"
The 4./usr/bin/growpart command uses Yum search results to cloud-utils-growpart-0.27-20.el7.centos.x86_64. Yum installs this package.
5. Start Docker to view the log information is OK, view the/etc/sysconfig/docker-storage file, already has the following content:
docker_storage_options= "--storage-driver devicemapper--storage-opt dm.fs=xfs--storage-opt dm.thinpooldev=/dev/ Mapper/centos-docker--pool--storage-opt dm.use_deferred_removal=true--storage-opt dm.use_deferred_deletion=true "
Although there are also errors on the firewall, but that is another cause. This question is OK.
Notice
1.storage_driver= "Devicemapper" is required for LVM support. It is best to install the system when it is installed on the LVM. Otherwise, create a new VG such as "CentOS" and then add it to the/etc/sysconfig/docker-storage-setup.
Vg= "CentOS"
This has also been verified.
2. This error was first discovered because the/VAR/LIB/LDAP directory could not be read and written to container after the-V/ROOT/LDAP:/VAR/LIB/LDAP data volume was enabled. Then look at the log to find this error. After the problem is solved, the discovery is still unable to read and write. and hundred, the original is the SELinux did not shut down caused.
# Setenforce 0
Solve the problem successfully. So you might want to say, is it okay to turn off selinux if you don't solve the problem above? I think as long as I find this error, I will solve, and perhaps not affect now, but Docker storage (data volume) is an important function, always because of this error to produce other errors.
3. Tried another option, storage_driver= "overlay", so that, also do not error, and in the/var/lib/docker directory file also changed. The specific role is unclear.
This article is from the "Sea Breeze" blog, please be sure to keep this source http://beyondhf.blog.51cto.com/8953234/1792029
Questions about Docker-storage-setup error in Docekr