Follow

How to use the Docker - devicemapper discard setting (for Docker thinpool)

Applies To

  • Docker (used in Control Center running Zenoss)

Summary

When using devicemapper storage options with a Docker thinpool, it is important to specify the correct discard settings.

Procedure

The mountopt=discard option enables continuous TRIM in device operations. Note that It is disabled by default because it generally has a significant performance impact under normal conditions. However, because Zenoss does not write significant amounts of data to container filesystems (as opposed to the DFS), the option does not significantly impact the Zenoss application.

If this option is not specified, long-running containers must have fstrim executed regularly. This signals the container filesystem to notify the underlying LVM thin pool of unused blocks. If this notification does not occur, there is a risk in certain scenarios of running out of blocks in the Docker thin pool and generating storage errors.

The Docker - devicemapper discard setting is specified by adding lines to /etc/sysconfig/docker, for example:

--storage-opt dm.mountopt=discard

Notes:

  • Each storage option requires its own --storage-opt line within the /etc/sysconfig/docker file.
  • Multiple storage options cannot be specified on a single --storage-opt flag.

 

See the Control Center Installation Guide section called Configuring Docker Engine for additional information.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk