• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-Dec-2019-

dmsetup/H03-Dec-2019-611396

losetup/H03-Dec-2019-204126

README.mdH A D03-Dec-20191.4 KiB4231

config.goH A D03-Dec-20192.6 KiB9955

config_test.goH A D03-Dec-20192.5 KiB10466

device_info.goH A D03-Dec-20193 KiB11164

metadata.goH A D03-Dec-20199.8 KiB363238

metadata_test.goH A D03-Dec-20196.5 KiB252180

pool_device.goH A D03-Dec-201914 KiB476321

pool_device_test.goH A D03-Dec-20198.4 KiB290192

snapshotter.goH A D03-Dec-201913.3 KiB489346

snapshotter_test.goH A D03-Dec-20194.2 KiB14385

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.