Brindster / docker-plugin-cephfs

Docker Volume Plugin for CephFS
MIT License
9 stars 5 forks source link

volume bind mounts using ceph #4

Open dlasher opened 8 months ago

dlasher commented 8 months ago

Great plugin, appreciate the work, having issues trying to migrate non-swarm compose files over to swarm/ceph.

Example:

volumes: - "/opt/adsb/tar1090/heatmap:/var/globe_history" - "/opt/adsb/tar1090/timelapse:/var/timelapse1090"

This wants the DIRECTORY from the root file system, in /opt/adsb/tar1090/heatmap to be mapped to /var/globe_history inside the container. I've tried several different ways to accomplish this, and they all fail.

Try 1: volumes: - "storage:/adsb/tar1090/heatmap:/var/globe_history" - "storage:/adsb/tar1090/timelapse:/var/timelapse1090"

resulting mount: 198.18.53.105:/STORAGE/docker 44% /adsb/tar1090/heatmap

Obviously does not accomplish what we want. Even providing a more specific path like /STORAGE/docker/data/adsb/tar1090/heatmap results in a /STORAGE/docker mount, both source and destination are wrong.. (didn't end up mapped to /var/globe_history )

Try 2: volumes: - "storage:/ceph" - "/ceph/data/adsb/tar1090/heatmap:/var/globe_history" - "/ceph/data/adsb/tar1090/timelapse:/var/timelapse1090"

That fails completely, complaining that "/ceph/data/adsb/tar1090/heatmap" doesn't exist.

What we want is:

198.18.53.105:/STORAGE/docker/adsb/tar1090/heatmap 44% /var/globe_history

How do we get that?

dlasher commented 8 months ago

If I don't use the plugin, but mount a `/ceph' folder in the host OS, I can then use a bind mount, and that works around it for now? Pity, I wanted to use the plugin.

volumes: - type: bind source: /ceph/data/adsb/tar1090/heatmap target: /var/globe_history - type: bind source: /ceph/data/adsb/tar1090/timelapse target: /var/timelapse1090

Brindster commented 8 months ago

Apologies, it's been years since I have worked with this plugin or even used ceph or docker volumes, so I'm not sure I can give much in the way of support.

One thing that comes to mind though is when installing the plugin there is a parameter that you can pass in to get debug information: DEBUG_MODE=1. Enabling that might help you narrow down the right configuration.

Hope you get it working 🤞