Installation of shared volume driver like flocker

Has anyone tried installing a shared volume driver like flocker on top of Docker for Azure? Pointers?

We are use VM scale sets in the ARM template for the worker nodes and attaching VHDs to the VM scale set instances is not supported by Azure at the moment. So something like Flocker (using VHDs) or REX-Ray/libstorage (with a Azure page blob driver for VHDs) may not work.

If storage performance is not a big concern, you may be able to use https://github.com/Azure/azurefile-dockervolumedriver with Azure File Shares but you will have to install/configure it for each of the Azure nodes.

We are planning to bake support in for persistent storage/volumes in one of our future releases for Docker for Azure and AWS.

1 Like

FYI … we have a new storage plugin - Cloudstor - that gets installed by Docker for Azure and AWS templates and provides distributed shared storage across all nodes in the swarm. For more details, please visit: https://docs.docker.com/docker-for-azure/persistent-data-volumes/

How can I save or backup all data managed by Cloudstor for atach a future Swarm Cluster recreation?

@alexsandro you can backup all data from cloudstor through the following steps:

  1. Identify the Storage Account backing the volume data from cloudstor volumes in the original resource group. [see **1 below]
  2. AzCopy the file shares (corresponding to the volumes) from [1] to your backup storage account. [see **2 below]
  3. When deploying a fresh resource group, identify the Storage Account that will be used by cloudstor in that resource group similar to [1].
  4. AzCopy the file shares from [2] to [3]. [see **2 below]
  5. Restore your volumes from [4] by simply recreating the volumes you need with the same exact names as before. If you specifed a share option originally for certain volumes, you will also need to specify that when restoring and the name of the volume does not need to match the original. cloudstor will attach the new volumes to the data from the existing file shares based on the names if no share option was specified or using the share option if it was specified.

**1 The data managed by Cloudstor for Azure today is all stored in a single Storage Account in File Shares. You can find the Storage Account used by cloudstor using the command:

docker inspect cloudstor:azure | grep AZURE_STORAGE_ACCOUNT=
**2 AzCopy /Source:https://myaccount1.file.core.windows.net/myfileshare1/ /Dest:https://myaccount2.file.core.windows.net/myfileshare2/ /SourceKey:key1 /DestKey:key2 /S

1 Like

Thank you, it’s very useful

why I can not see the data managed by cloudstor from the azure portal? It look likes the data are separated. The files uploaded by azure portal do not show in the cloudstor volume. The files created by containers mounted by cloudstor volume do not show in the azure portal.

The Cloudstor volumes are backed by FileStorage shares within one of the five storage accounts created by the Docker4Azure ARM template. You can identify the specific storage account used by Cloudstor using the following command from any docker node:
docker plugin inspect cloudstor:azure | grep AZURE_STORAGE_ACCOUNT=

Once you have the Storage Account used by Cloudstor, you can enumerate the FileStorage shares in it through the Azure portal. As explained at https://docs.docker.com/docker-for-azure/persistent-data-volumes/#volume-options, the default name used for the shares is the md5 hash of the volume name specified. If the optional share parameter was specified during volume creation, that is used instead.

The files in the docker volumes are mapped to files within the FileStorage shares corresponding to the docker volumes.