github.com/gunjan5/docker@v1.8.2/daemon/graphdriver/devmapper/README.md (about) 1 ## devicemapper - a storage backend based on Device Mapper 2 3 ### Theory of operation 4 5 The device mapper graphdriver uses the device mapper thin provisioning 6 module (dm-thinp) to implement CoW snapshots. For each devicemapper 7 graph location (typically `/var/lib/docker/devicemapper`, $graph below) 8 a thin pool is created based on two block devices, one for data and 9 one for metadata. By default these block devices are created 10 automatically by using loopback mounts of automatically created sparse 11 files. 12 13 The default loopback files used are `$graph/devicemapper/data` and 14 `$graph/devicemapper/metadata`. Additional metadata required to map 15 from docker entities to the corresponding devicemapper volumes is 16 stored in the `$graph/devicemapper/json` file (encoded as Json). 17 18 In order to support multiple devicemapper graphs on a system, the thin 19 pool will be named something like: `docker-0:33-19478248-pool`, where 20 the `0:33` part is the minor/major device nr and `19478248` is the 21 inode number of the $graph directory. 22 23 On the thin pool, docker automatically creates a base thin device, 24 called something like `docker-0:33-19478248-base` of a fixed 25 size. This is automatically formatted with an empty filesystem on 26 creation. This device is the base of all docker images and 27 containers. All base images are snapshots of this device and those 28 images are then in turn used as snapshots for other images and 29 eventually containers. 30 31 ### Information on `docker info` 32 33 As of docker-1.4.1, `docker info` when using the `devicemapper` storage driver 34 will display something like: 35 36 $ sudo docker info 37 [...] 38 Storage Driver: devicemapper 39 Pool Name: docker-253:1-17538953-pool 40 Pool Blocksize: 65.54 kB 41 Data file: /dev/loop4 42 Metadata file: /dev/loop4 43 Data Space Used: 2.536 GB 44 Data Space Total: 107.4 GB 45 Data Space Available: 104.8 GB 46 Metadata Space Used: 7.93 MB 47 Metadata Space Total: 2.147 GB 48 Metadata Space Available: 2.14 GB 49 Udev Sync Supported: true 50 Data loop file: /home/docker/devicemapper/devicemapper/data 51 Metadata loop file: /home/docker/devicemapper/devicemapper/metadata 52 Library Version: 1.02.82-git (2013-10-04) 53 [...] 54 55 #### status items 56 57 Each item in the indented section under `Storage Driver: devicemapper` are 58 status information about the driver. 59 * `Pool Name` name of the devicemapper pool for this driver. 60 * `Pool Blocksize` tells the blocksize the thin pool was initialized with. This only changes on creation. 61 * `Data file` blockdevice file used for the devicemapper data 62 * `Metadata file` blockdevice file used for the devicemapper metadata 63 * `Data Space Used` tells how much of `Data file` is currently used 64 * `Data Space Total` tells max size the `Data file` 65 * `Data Space Available` tells how much free space there is in the `Data file`. If you are using a loop device this will report the actual space available to the loop device on the underlying filesystem. 66 * `Metadata Space Used` tells how much of `Metadata file` is currently used 67 * `Metadata Space Total` tells max size the `Metadata file` 68 * `Metadata Space Available` tells how much free space there is in the `Metadata file`. If you are using a loop device this will report the actual space available to the loop device on the underlying filesystem. 69 * `Udev Sync Supported` tells whether devicemapper is able to sync with Udev. Should be `true`. 70 * `Data loop file` file attached to `Data file`, if loopback device is used 71 * `Metadata loop file` file attached to `Metadata file`, if loopback device is used 72 * `Library Version` from the libdevmapper used 73 74 ### About the devicemapper options 75 76 The devicemapper backend supports some options that you can specify 77 when starting the docker daemon using the `--storage-opt` flags. 78 This uses the `dm` prefix and would be used something like `docker -d --storage-opt dm.foo=bar`. 79 80 These options are currently documented both in [the man 81 page](../../../man/docker.1.md) and in [the online 82 documentation](https://docs.docker.com/reference/commandline/daemon/#docker- 83 execdriver-option). If you add an options, update both the `man` page and the 84 documentation.