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

1

6

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
Cannice answered 7/8, 2015 at 5:28 Comment(0)
P
3

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.

Pyrogallate answered 7/8, 2015 at 5:50 Comment(1)
I tried to modify /etc/sysconfig/docker like below: # /etc/sysconfig/docker # Modify these options if you want to change the way the docker daemon runs OPTIONS='--selinux-enabled --storage-driver=devicemapper' DOCKER_CERT_PATH=/etc/docker and restarted docker service. But not better.Cannice

© 2022 - 2024 — McMap. All rights reserved.