Azure / azurefile-dockervolumedriver

Docker Volume Driver for Azure File Service over SMB/CIFS :whale:
Apache License 2.0
169 stars 55 forks source link

Are symlinks supported? #69

Closed niau closed 8 years ago

niau commented 8 years ago

I have a container that mounts two volumes. One for the database data and another for the database index

niau@docker-swarm-head-1:~$ docker volume inspect volnmsdb-2-data
[
    {
        "Name": "volnmsdb-2-data",
        "Driver": "azurefile",
        "Mountpoint": "/var/run/docker/volumedriver/azurefile/volnmsdb-2-data",
        "Labels": {},
        "Scope": "local"
    }
]
niau@docker-swarm-head-1:~$ docker volume inspect volnmsdb-2-index
[
    {
        "Name": "volnmsdb-2-index",
        "Driver": "azurefile",
        "Mountpoint": "/var/run/docker/volumedriver/azurefile/volnmsdb-2-index",
        "Labels": {},
        "Scope": "local"
    }
]

We have mounted the volumes the following way

docker volume create -d azurefile --name volnmsdb-2-data -o share=volshare-nms-2 -o remotepath=/data -o uid=60 -o gid=60 -o dirmode=0775 -o filemode=0775;

docker volume create -d azurefile --name volnmsdb-2-index -o share=volshare-nms-2 -o remotepath=/index -o uid=60 -o gid=60 -o dirmode=0775 -o filemode=0775;

Later when the database operates it tries to create a symlink we are getting the following error:

Database::_query: Query error: Can't create symlink './pluginlongterm/d1_psnmp_t274_o85.MYI' pointing at '/index/pluginlongterm/d1_psnmp_t274_o85.MYI' (Error 95 - Operation not supported)

And when I tried to reproduce it manually...

ln -s /data/mysql/pluginlongterm/d1_psnmp_t274_o85.test  /index/pluginlongterm/d1_psnmp_t274_o85.test 
ln: failed to create symbolic link '/index/pluginlongterm/d1_psnmp_t274_o85.test': Operation not supported

Digging a bit deeper it looks that azurefile is CIFS and in the end windows file share and pardon me windows still does not support symlinks???

ahmetb commented 8 years ago

@niau My guess is, most likely CIFS does not support symlinks. I'm not familiar with CIFS enough to give a definitive answer. However, this does not look like a Docker Volume Plugin-specific issue. I suggest you to ask this on https://azure.microsoft.com/en-us/documentation/articles/storage-how-to-use-files-linux/ comments section.

fvilers commented 6 years ago

See PR #95 for symbolic links support.