Commit Graph

5 Commits

Author SHA1 Message Date
5e59cd4e23 Limit the amount of prints during normal runs
This removes some Debugf() calls and chages some direct prints to
Debugf(). This means we don't get a bunch of spew when running the
tests.
Upstream-commit: bc7fa7b95773d638754eb72e7921ac328acb2ad6
Component: engine
2013-09-26 15:09:31 +00:00
eda48ebeaf devmapper: Base the device-mapper names on the root dir name
This means the default is "docker-*", but for tests we get separate
prefixes for each test.
Upstream-commit: 8f343ea65a05b374ffa64940a1946abf28402689
Component: engine
2013-09-26 15:08:55 +00:00
167815c85c devmapper: Add simple tool to test the DeviceSet commands
Upstream-commit: 2b1dc8a8a3b99e6edbdf2cc71bf5461d81b9c354
Component: engine
2013-09-26 15:08:54 +00:00
51bfa55a02 devmapper: Add DeviceSet device-mapper helper
This is a module that uses the device-mapper create CoW snapshots
You instantiate a DeviceSetDM object on a specified root (/var/lib/docker),
and it will create a subdirectory there called "loopback". It will
contain two sparse files which are loopback mounted into
a thin-pool device-mapper device called "docker-pool".

We then create a base snapshot in the pool with an empty filesystem
which can be used as a base for docker snapshots. It also keeps track
of the mapping between docker image ids and the snapshots in the pool.

Typical use of is something like (without error checking):

devices = NewDeviceSetDM("/var/lib/docker")
devices.AddDevice(imageId, "") // "" is the base image id
devices.MountDevice(imageId, "/mnt/image")
 ... extract base image to /mnt/image
devices.AddDevice(containerId, imageId)
devices.MountDevice(containerId, "/mnt/container")
... start container at /mnt/container
Upstream-commit: 0b12702c0c9753cbb18a942bac2600b036e4f80e
Component: engine
2013-09-26 15:08:54 +00:00
d06f87abd9 Add libdevmapper wrapper
Upstream-commit: 739af0a17f6a5a9956bbc9fd1e81e4d40bff8167
Component: engine
2013-09-26 15:08:54 +00:00