Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the rootfs of container in host machine after docker 1.6.0

Tags:

docker

rootfs

In Docker v1.4.1, we can find the rootfs of a container on the host machine. For example:

cd /var/lib/docker/devicemapper/mnt/ab83a2638bb23f24d8811fa9b4ca458efca9269696ff3112cc670be2833f3f92/rootfs/
.autofsck     .dockerenv    lost+found/   proc/         sys/
.autorelabel  .dockerinit   media/        root/         tmp/
bin/          etc/          mnt/          sbin/         usr/
boot/         lib/          opt/          selinux/      var/
dev/          lib64/        .pki/         srv/

But in Docker v1.6.0, I found that /var/lib/docker/devicemapper/mnt/911d7ac8fca78b2beca8752ec89d80c06a1ea1dd8a65099d074ed40eec0c6cce is empty.

Where is it for v1.6.0?

It's already used devicemapper

# docker -D info
Containers: 4
Images: 58
Storage Driver: devicemapper
  Pool Name: docker-253:1-2886824-pool
  Pool Blocksize: 65.54 kB
  Backing Filesystem: extfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 12.12 GB
Data Space Total: 107.4 GB
Data Space Available: 95.26 GB
Metadata Space Used: 10.48 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.137 GB
Udev Sync Supported: true
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.93 (2015-01-30)
Execution Driver: native-0.2
Kernel Version: 4.0.6-300.fc22.x86_64  
Operating System: Fedora 22 (Twenty Two)
CPUs: 2
Total Memory: 3.705 GiB
Name: rhel65.cn.ibm.com
ID: WERO:NIMH:2K3M:GRGS:2Q5T:JDU4:QMO3:QFE5:QZJB:GICM:OLMS:7GFL
Debug mode (server): false
Debug mode (client): true
Fds: 18
Goroutines: 28
System Time: Fri Aug  7 22:33:58 CST 2015
EventsListeners: 0
Init SHA1: a29656f0ad364f66e24c1ff1cf36b9e0e2bd5b0d
Init Path: /usr/libexec/docker/dockerinit
Docker Root Dir: /var/lib/docker
like image 430
che yang Avatar asked Oct 20 '22 05:10

che yang


1 Answers

That could simply mean your docker does not use by default that driver.
See issue 14551, and check the output of docker -D info:

Added --storage-driver=devicemapper on the DOCKER_OPTS and it worked.

like image 64
VonC Avatar answered Oct 21 '22 23:10

VonC