0

We use device mapper storage driver. This is probably more of a docker than k8s question.

Is there is a way to determine for example where this mount is coming from

/opt/dsx/ibm-data-platform/docker/devicemapper/mnt/b1127f21d5fd96b2ac862624d80b928decc1d60b87ec64d98430f69f360d3cee/rootfs/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.39.x86_64/jre/lib/rt.jar

You see devicemapper/mnt/b1127f21d5fd96b2ac862624d80b928decc1d60b87ec64d98430f69f360d3cee as part of the path..

We use a commercial product that has 67 different images bundled in. One particular above has a very old Java .. we'd like to know which image that docker mount is coming from.

Thanks!

Tagar
  • 13,911
  • 6
  • 95
  • 110

1 Answers1

2

You can ask Docker for a list of containers that have that volume mounted:

docker container ls --filter=volume=<name of volume>

Rawkode
  • 21,990
  • 5
  • 38
  • 45
  • thanks. `sudo docker container ls --filter=volume=b1127f21d5fd96b2ac862624d80b928decc1d60b87ec64d98430f69f360d3cee` returns empty list.. can I use that volume uuid instead of volume name? docker/k8s is somewhat new to me . also `sudo docker volume ls | grep b1127f21d5fd96b2ac862624d80b928decc1d60b87ec64d98430f69f360d3cee` returns empty list. – Tagar Dec 18 '18 at 00:33
  • Usually, the UUID.is the name. Does volume ls return anything,.without the grep – Rawkode Dec 18 '18 at 00:43
  • Yes, `docker volume ls` returns 6 lines, with `uuid`s for the `volume name` column. Although `b1127f21d5fd96b2ac862624d80b928decc1d60b87ec64d98430f69f360d3cee` is not one of them. Notice that we use `device mapper` storage driver for dockers .. does it explain this? – Tagar Dec 18 '18 at 00:47
  • The `rootfs` in the mnt would lead me to believe this may be an image ID rather than a volume. Try image ls. – Rawkode Dec 18 '18 at 00:58
  • `docker image ls` returns shorter ids like `9e1c85961ecd` that do not match to any of the `devicemapper/mnt/b1127f21d5fd96b2ac862624d80b928decc1d60b87ec64d98430f69f360d3cee` uuids.. – Tagar Dec 18 '18 at 18:26