docker-archive / v1.10-migrator

Prepare docker graph directory for content addressability
Apache License 2.0
24 stars 24 forks source link

Can't use migrator with dm.use_deferred_removal #12

Open jlebon opened 8 years ago

jlebon commented 8 years ago

I've been using the migrator (as a container) by directly passing the DOCKER_STORAGE_OPTIONS in /etc/sysconfig/docker-storage like this (yes, this ignores potential quoting issues):

# docker run --rm -ti \
    --privileged \
    -v /dev:/dev \
    -v /var/lib/docker:/var/lib/docker \
    docker/v1.10-migrator \
    $(sed -e "s/DOCKER_STORAGE_OPTIONS=//" /etc/sysconfig/docker-storage)

This works great. However, if the config includes --storage-opt dm.use_deferred_removal=true, then the container fails with:

ERRO[0000] Can't initialize device mapper: "devmapper: Deferred removal can not be enabled as libdm does not support it"

Removing that option makes it work.

Full contents of /etc/sysconfig/docker-storage:

DOCKER_STORAGE_OPTIONS=--storage-driver devicemapper --storage-opt dm.fs=xfs --storage-opt dm.thinpooldev=/dev/mapper/atomicos-docker--pool --storage-opt dm.use_deferred_removal=true

I guess my question is: is this the expected way to use the migrator, i.e. directly passing the storage options from config?

If not, then this is not an issue, and it may be closed. If yes, then should the migrator be changed to accept but ignore this option?

tonistiigi commented 8 years ago

Sorry, I think this specific option isn't supported because migrator is built with libdevmapper headers that don't support it.