Open saitoh183 opened 5 years ago
It could be. This plugin uses Systemd (or Upstart, but it's less supported), and I'm not super familiar with it, but I'm pretty sure you can have like a "depends on" clause and there should be some way to have it wait on the volumes...
Quick Google search brought up a mount option: https://www.freedesktop.org/software/systemd/man/systemd.mount.html#
Yeah i tried it but it didnt seem to work. for this time i just recreated all the volumes in a single command but next time i reboot i will test again.
[Unit]
Description=docker-volume-local-persist
Before=docker.service
After=data.mount
Wants=docker.service
[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/docker-volume-local-persist
[Install]
WantedBy=multi-user.target
Hello, I'm using kubuntu 19.04 and installed docker 18.06.1-ce by snap package. After that i installed the driver with suggested "quick way". Both docker and local-persist services are running.
Any defined volume which is using local-persist driver is gone after reboot(or local-persist service restart)
Is there any direction to check to understand what is wrong ?
@turkeryildirim I don't know for sure off the top of my head, but it may not recreate the volumes, but it persists the data so that the data is still there when you next recreate the volume with the same options.
That's the main intent of this plugin: to allow data to survive and persist even if a volume is destroyed (when the volume is next created).
@CWSpear I just want to create a volume(docker volume create) with custom mountpoint and use it for container(s). By default approach (local driver), created volumes persist but does not allow me to specify a mountpoint.
In theory, volumes that are using local-persist driver should stay because the only difference is the driver (i guess). But if this disappearance is normal behaviour of the driver after "volume create" then i should look something different.
I'm also affected by this, all my docker volumes are gone! Is this the intended behavior of the plugin? Is there a way to ensure the volumes are not removed after a reboot?
In case you changed data-root
in docker/daemon.json
then check this https://github.com/MatchbookLab/local-persist/issues/68.
Thanks everyone for the pointers, no matter how long ago they were written. I ended up having both issues being on a Synology box- the modified data-root and the volumes not being mounted yet. So I had to do two modifications:
Then my volumes were still there after reboot!
So i just rebooted my server and all i see under the service status is Couldn't find for all my volumes. They are on another drive and the docker folder is on the same drive as the data folders. Could it be that the services is starting before the data drive is mounted?