README.md
1## Devmapper snapshotter
2
3Devmapper is a `containerd` snapshotter plugin that stores snapshots in ext4-formatted filesystem images
4in a devicemapper thin pool.
5
6## Setup
7
8To make it work you need to prepare `thin-pool` in advance and update containerd's configuration file.
9This file is typically located at `/etc/containerd/config.toml`.
10
11Here's minimal sample entry that can be made in the configuration file:
12
13```
14[plugins]
15 ...
16 [plugins.devmapper]
17 pool_name = "containerd-pool"
18 base_image_size = "128MB"
19 ...
20```
21
22The following configuration flags are supported:
23* `root_path` - a directory where the metadata will be available (if empty
24 default location for `containerd` plugins will be used)
25* `pool_name` - a name to use for the devicemapper thin pool. Pool name
26 should be the same as in `/dev/mapper/` directory
27* `base_image_size` - defines how much space to allocate when creating the base device
28
29Pool name and base image size are required snapshotter parameters.
30
31## Run
32Give it a try with the following commands:
33
34```bash
35ctr images pull --snapshotter devmapper docker.io/library/hello-world:latest
36ctr run --snapshotter devmapper docker.io/library/hello-world:latest test
37```
38
39## Requirements
40
41The devicemapper snapshotter requires `dmsetup` (>= 1.02.110) command line tool to be installed and
42available on your computer. On Ubuntu, it can be installed with `apt-get install dmsetup` command.