DCA · Question #3
Which of the following constitutes a production-ready devicemapper configuration for the Docker engine?
The correct answer is C. Utilize the '--storage-opt dm.directlvm_device' Docker daemon option, specifying a block device. For a production-ready Devicemapper configuration, Docker should be configured to use a dedicated block device in direct-lvm mode.
Question
Which of the following constitutes a production-ready devicemapper configuration for the Docker engine?
Options
- ACreate a volume group in devicemapper and utilize the '--dm.thinpooldev' Docker daemon option,
- BFormat a partition with xfs and mount it at '/var/lib/docker'
- CUtilize the '--storage-opt dm.directlvm_device' Docker daemon option, specifying a block device
- DNothing, devicemapper comes ready for production usage out of the box
How the community answered
(33 responses)- A3% (1)
- B3% (1)
- C88% (29)
- D6% (2)
Why each option
For a production-ready Devicemapper configuration, Docker should be configured to use a dedicated block device in direct-lvm mode.
While `--dm.thinpooldev` specifies a thin pool, using `dm.directlvm_device` is the more automated and recommended production-ready approach for Devicemapper, managing the thin pool on a dedicated block device.
Formatting a partition with XFS and mounting it at `/var/lib/docker` is a recommended setup for the `overlay2` storage driver, not for the `devicemapper` driver which uses block devices directly or via LVM.
Utilizing the `--storage-opt dm.directlvm_device` Docker daemon option with a specified block device configures Devicemapper in direct-lvm mode, which is the recommended and production-ready setup for optimal performance and reliability.
The default loopback mode of Devicemapper is explicitly documented as suitable only for testing and development due to performance and stability limitations, not for production use.
Concept tested: Docker Devicemapper production configuration
Source: https://docs.docker.com/engine/security/production-setup/#devicemapper
Topics
Community Discussion
No community discussion yet for this question.