I’m currently trying to mount a local CIFS share as a mysql data directory but I cant seem to get it work.
I created a new docker volume which points to the CIFS-share:
sudo docker volume create --driver local --opt type=cifs --opt device=//[IP]/Share --opt o=[User],domain=[Domain]l,file_mode=0777,dir_mode=0777 --name testvol
That worked and gave me no error,it appears in the volume ls also.
Now I try to create a mysql/mariadb service in my swarm with the following:
sudo docker service create --name TEST --replicas 2 --mount type=volume,source=testvol,destination=/var/lib/mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=[PW] mariadb
After a couple of minutes it starts up and can see the replicas in the active list. But on my Windows-Server which provides the CIFS-share, nothing appears? Shoudnt here a database be stored after I changed the data storage location?
Thanks for any hints!