Docker Community Forums

Share and learn in the Docker community.

Trying to use cloudstor:azure to mount a file share, a long road

Hi all, for a while now I’ve been trying to mount a file share on my Azure storage account but can’t get it to work. Using Ubuntu 18.04 LTS Azure VM in a VNet for testing.

Problem 1: How do I determine the correct cloudstor:azure plugin to use?

Found a link to https://hub.docker.com/r/docker4x/cloudstor/tags which lists all the plugin versions.

And from several locations I’ve pieced together installing the plugin:

sudo docker plugin install docker4x/cloudstor:17.06.2-ee-23-azure1 \
    --alias cloudstor:azure \
    --grant-all-permissions
    CLOUD_PLATFORM=AZURE \
    AZURE_STORAGE_ACCOUNT_KEY="storage-name" \
    AZURE_STORAGE_ACCOUNT="storage-key"

Where I set the storage name, key and plugin version values.

However the only one I’ve been able to successfully install is docker4x/cloudstor:azure-v17.03.0-ce. All other versions give errors. So I had a brainwave and noticed the plugin builds seemed to match Docker builds. I then found the closets to my Docker version which is 18.09.7 and tried to install it, with the same errors:

18.09.2-ce-azure1: Pulling from docker4x/cloudstor
d946d85d3531: Download complete
Digest: sha256:c25b6bb1573575cdf537b3f1abd92e42cc78cca5f3f3801b9c9ac912ae12abef
Status: Downloaded newer image for docker4x/cloudstor:18.09.2-ce-azure1
[1315419.117778] CIFS VFS: Send error in SessSetup = -13
[1315419.127571] CIFS VFS: Send error in SessSetup = -13
[1315419.131287] CIFS VFS: cifs_mount failed w/return code = -13
[1315419.140636] CIFS VFS: Send error in SessSetup = -13
[1315419.149463] CIFS VFS: Send error in SessSetup = -13
[1315419.153285] CIFS VFS: cifs_mount failed w/return code = -13
[1315419.482408] CIFS VFS: Send error in SessSetup = -13
[1315419.491596] CIFS VFS: Send error in SessSetup = -13
[1315419.495409] CIFS VFS: cifs_mount failed w/return code = -13
[1315419.503750] CIFS VFS: Send error in SessSetup = -13
[1315419.513357] CIFS VFS: Send error in SessSetup = -13
[1315419.517182] CIFS VFS: cifs_mount failed w/return code = -13
Error response from daemon: dial unix /run/docker/plugins/fe706cb833d89226c0296bdb0971205a35ee53d1a51b6eef72b7b390a27d78b3/cloudstor.sock: connect: no such file or directory

I thought I’d also try and upgrade Docker with no luck:

sxdatagen@sxDataGenHQueueClient01:~$ sudo docker engine update --version 19.03
unable to determine the installed engine version. Specify which engine image to update with --engine-image set to 'engine-community' or 'engine-enterprise': open /var/lib/docker-engine/distribution_based_engine.json: no such file or directory

So the only version I could get to install with no errors was docker4x/cloudstor:azure-v17.03.0-ce

Problem 2: Errors while trying to run a container with mounted volume

From https://azure.microsoft.com/en-in/blog/persistent-docker-volumes-with-azure-file-storage/ I then managed to create a docker volume with no errors:

sudo docker volume create -d cloudstor:azure -o share=myFileShare --name vol1

But following that example yielded errors:

 docker run -i -t -v vol1:/data busybox
[1316828.442258] CIFS VFS: Send error in SessSetup = -13
[1316828.450792] CIFS VFS: Send error in SessSetup = -13
[1316828.454633] CIFS VFS: cifs_mount failed w/return code = -13
[1316828.462756] CIFS VFS: Send error in SessSetup = -13
[1316828.474394] CIFS VFS: Send error in SessSetup = -13
[1316828.478146] CIFS VFS: cifs_mount failed w/return code = -13
docker: Error response from daemon: error while mounting volume '': VolumeDriver.Mount: mount failed: exit status 32
output="mount error(13): Permission denied\nRefer to the mount.cifs(8) manual page (e.g. man mount.cifs)\nmount error(13): Permission denied\nRefer to the mount.cifs(8) manual page (e.g. man mount.cifs)\nmount: mounting //sxdatagenmainstorage.file.core.windows.net/sxdatagen-hqueue on /mnt/cloudstor/vol1 failed: Permission denied\n".

I then remembered reading somewhere that having Secure transfer required enabled on the storage account could affect this so I disabled it and restarted the container and it worked!

So Id still like to resolve getting the correct version of cloudstor:azure and enabling secure transfer. But I hape this helps someone else out in the future.

1 Like

Thank you very much for this!
“Long road” is a huge understatement :wink:
I fought with it for a long time and I just can’t understand why such “basic” requirements always have to be infinitely complicated.
In retrospect everything is clear now, but the way there was long, long, long :wink:
If you find a solution for secure transfer it would be great if you could share it here as well.

NP! I always like documenting this sort of thing in a forum so when I forget it and google my notes come up :slight_smile:

Another piece of this puzzle is the versions of Docker daemon and the plugin. By default Docker on Azure VMs is I think 18.06.x. If I try and install ANY version of the cloudstor plugin with this version of docker I get errors. If I upgrade docker daemon to 18.09.x I can only get it working with plugin version azure-v17.03.0-ce. Every other plugin version fails in one way or another.