16-5-25 Fix docker become read-only

As a default, docker will create 2 files in /var/lib/docker/devicemapper/devicemapper/

-rw——- 1 root root 100G May 25 13:43 /var/lib/docker/devicemapper/devicemapper/data
-rw——- 1 root root 2.0G May 25 13:43 /var/lib/docker/devicemapper/devicemapper/metadata

If the total size of docker meet the 100G limitation, all docker will become read-only.

To fix this, we need to increase the size of data file:

1. Stop docker.

2. Remove data and metadata under /var/lib/docker/devicemapper/devicemapper/

3. Modify /etc/sysconfig/docker, add argument in the files:
other_args="–storage-opt dm.basesize=50G –storage-opt dm.loopdatasize=1024G –storage-opt dm.loopmetadatasize=20G"

4. Start docker.

發表迴響

你的電子郵件位址並不會被公開。