Docker Community Forums

Share and learn in the Docker community.

What is the default value of dm.mountopt & dm.blkdiscard under Devicemapper options for docker v1.13?

docker

(Selfflying) #1

I deployed docker-engine-1.13 with devicemapper storage (direct-lvm) on centos7.2. Howerver. I find the save problem with the issue(Delete data in a container devicemapper can not free used space #18867). And “the discard operation is not supported” error occured, I would like to find out if any storage-opt is not correctly specified when the docker is deployed with direct-lvm.

Fallowing is from docker document of v1.13

  1. dm.mountopt
    Specifies extra mount options used when mounting the thin devices.
    Example use:
    $ sudo dockerd --storage-opt dm.mountopt=nodiscard

  2. dm.blkdiscard

Enables or disables the use of blkdiscard when removing devicemapper devices. This is enabled by default (only) if using loopback devices and is required to resparsify the loopback file on image/container removal.

Disabling this on loopback can lead to much faster container removal times, but will make the space used in /var/lib/docker directory not be returned to the system for other use when containers are removed.

Example use:
$ sudo dockerd --storage-opt dm.blkdiscard=false