Blogs  >  Introducing Microsoft Azure File Service

Introducing Microsoft Azure File Service

Introducing Microsoft Azure File Service


We are excited to announce the preview of the Microsoft Azure File service. The Azure File service exposes file shares using the standard SMB 2.1 protocol. Applications running in Azure can now easily share files between VMs using standard and familiar file system APIs like ReadFile and WriteFile. In addition, the files can also be accessed at the same time via a REST interface, which opens a variety of hybrid scenarios. Finally, Azure Files is built on the same technology as the Blob, Table, and Queue Services, which means Azure Files is able to leverage the existing availability, durability, scalability, and geo redundancy that is built into our platform.

Scenarios

  • “Lift and Shift” applications

Azure Files makes it easier to “lift and shift” applications to the cloud that use on-premise file shares to share data between parts of the application. To make this happen, each VM connects to the file share (see “Getting Started” below) and then it can read and write files just like it would against an on-premise file share.

  • Shared Application Settings

A common pattern for distributed applications is to have configuration files in a centralized location where they can be accessed from many different virtual machines. Such configuration files can now be stored in an Azure File share, and read by all application instances. These settings can also be managed via the REST interface, which allows worldwide access to the configuration files.

  • Diagnostic Share

An Azure File share can also be used to save diagnostic files like logs, metrics, and crash dumps. Having these available through both the SMB and REST interface allows applications to build or leverage a variety of analysis tools for processing and analyzing the diagnostic data.

  • Dev/Test/Debug

When developers or administrators are working on virtual machines in the cloud, they often need a set of tools or utilities. Installing and distributing these utilities on each virtual machine where they are needed can be a time consuming exercise. With Azure Files, a developer or administrator can store their favorite tools on a file share, which can be easily connected to from any virtual machine.

Getting started

  • Step 1: Sign up for service

To sign up, go to the Microsoft Azure Preview Portal, and sign up for the Microsoft Azure Files service using one or more of your subscriptions. As subscriptions are approved for the Azure File preview, you will get an email notifying you of the approval. We will be slowly opening up the service to users in batches, so please be patient after signing up.

  • Step 2: Create a new storage account

Once you get the approval notification, you can then go to the Microsoft Azure Management Portal and create a new storage account using any of the approved subscriptions. Whenever a new storage account is created for an approved subscription, it will automatically get a file endpoint provisioned. The file endpoint for the account will be: <account name>.file.core.windows.net.

Note, During the Azure File preview, existing storage accounts do not have access to Azure Files. You have to create a new storage account to access Azure Files.

  • Step 3: Create the File Share

You can now create a file share in either of the following two ways:

       ▪ PowerShell CmdLets

Download the latest version of Azure PowerShell (version 0.8.5 and later) and install it following the instructions here. Once completed, start the PowerShell prompt and execute the following.

# create a context for account and key
$ctx=New-AzureStorageContext <account name> <account key>
 
# create a new share
$s = New-AzureStorageShare <share name> -Context $ctx
 
# create a directory in the test share just created
New-AzureStorageDirectory -Share $s -Path testdir
 
# upload a local file to the testdir directory just created
Set-AzureStorageFileContent -Share $s -Source D:\upload\testfile.txt -Path testdir
 
# list out the files and subdirectories in a directory
Get-AzureStorageFile -Share $s -Path testdir
 
# download files from azure storage file service
Get-AzureStorageFileContent -Share $s -Path testdir/testfile.txt -Destination D:\download
 
# remove files from azure storage file service
Remove-AzureStorageFile -Share $s -Path testdir/testfile.txt 

       ▪ REST APIs

You can also create a file share programmatically using the ‘Create Share’ REST API with version 2014-02-14 REST APIs are available via http(s)://<account name>.file.core.windows.net Uri. In addition, the .NET Storage Client Library starting with 4.0 version uses the REST version 2014-02-14 and supports Azure Files. We recommend adding a NuGet reference to your project. Here is an abstract of code that creates a share:

static void Main(string[] args)
{
     CloudStorageAccount account = CloudStorageAccount.Parse(cxnString);
     CloudFileClient client = account.CreateCloudFileClient();
     CloudFileShare share = client.GetShareReference("bar");
     share.CreateIfNotExistsAsync().Wait();
}

  • Step 4: Use File Share

Once your share is created, it can be accessed via the SMB or REST protocol from any Azure node (VM/Worker/Web role) hosted in the same region as the storage account hosting the share.

To use the share via SMB 2.1 protocol, log into the VM that requires access to the share and execute “net use” as shown below:

    net use z: \\<account name>.file.core.windows.net\<share name> /u:<account name> <account key>

C:\>net use z: \\myaccount.file.core.windows.net\myshare /u:myaccount StgAccKey==
The command completed successfully.

C:\>dir z:\
Volume in drive Z has no label.
Volume Serial Number is 4038-F841

Directory of z:\

08/06/2013 10:51 AM 15 HelloFromWindosAzureFileService.txt
1 File(s) 15 bytes
0 Dir(s) 109,951,162,777,600 bytes free

C:\>type z:\HelloFromWindowsAzureFileService.txt
Hello World

To remove the mapping of the share from our VM, use: net use z: /delete.

How can I move my data to Azure Files

Azure Files is a separate service from Azure Blobs. In preview, we do not support copying Azure Blobs to Azure Files. In addition, the Microsoft Azure Import/Export Service does not support Azure Files for preview. Both these are in the roadmap and we will share more details in the future.

For preview, the below are the list of options available to transfer files from on premise to Azure File service.

AzCopy

AzCopy version 2.4 now supports moving your local files to Azure files and back. Once your data is in Azure Files, you can easily access this file share from any cloud VM within the same region via SMB protocol.

Assuming you have created a share called “myfileshare” in your file service, here are some examples:

  • Upload files from your local disk recursively to Azure Files, with all folder structures copied as well.

             AzCopy d:\test\ https://myaccount.file.core.windows.net/myfileshare/ /DestKey:key /s

             Note: empty folders will not be uploaded.

  • Upload files with certain file pattern from your local disk to Azure Files.

             AzCopy d:\test\ https://myaccount.file.core.windows.net/myfileshare/ /DestKey:key ab* /s

  • Download all files in the file share recursively to local disk, with all folder structures copied as well.

              AzCopy https://myaccount.file.core.windows.net/myfileshare/ d:\test\ /SourceKey:key /s

             Note: empty folders will not be downloaded.

  • Download one file from the file share to your local disk

             AzCopy https://myaccount.file.core.windows.net/myfileshare/myfolder1/ d:\test\ /SourceKey:key abc.txt

            Note: when specifying the file pattern ‘abc.txt’, AzCopy will try to find exactly the same name file under ‘myfileshare/myfolder1’, not including its subfolders.

The below scenarios are NOT supported in AzCopy during preview.

  • Copying files between Azure Blobs and Azure Files, as well as between Azure File shares.
  • Reading Azure File data from Geo Redundant Account’s Secondary Region.
  • Using Share Access Signature (SAS) to connect with Azure Files.

Storage Client Library 4.0 (or REST APIs version 2014-02-14)

Storage Client library 4.0 supports files and you can write a quick application to upload files into the service.

Remote desktop to the VM which has mapped the share

Using file explorer: There are two ways to copy files using file explorer.

        a. Copy and paste files from your local machine into the file share in explorer in a remote session.

        b. Using xcopy with local drives shared in a remote session

                 i. Remote desktop into an Azure VM and opt to choose the local drive to be accessible in remote session as shown in the below picture.

                     image

                 ii. Create a mapping to the Azure file share using net use as we mentioned above.

                 iii. Use xcopy:

                       xcopy \\tsclient\c\software\demo\data\* \\<accountname>.file.core.windows.net\myshare\data\.

Interaction between SMB and REST Interfaces

As mentioned above, an Azure File share can be accessed via two interfaces at the same time – SMB 2.1 or REST.

When a REST operation is performed on a file that is concurrently open on an SMB client, the REST operation must respect the share mode specified by the SMB client.

This section briefly describes how the two interfaces interact but more details can be found in the MSDN documentation.

The following SMB file access mode is used to determine whether the REST operation can be completed:

REST Operation REST Operation File Access Equivalent Comments
List Files N/A  
Create File Write/Delete If file is currently open in SMB, can only create the file via REST if the file has write or write/delete share mode.
Get File Read If file is currently open in SMB, can only read the file via REST if the file is open with shared read.
Set File Properties Write If file is currently open in SMB, can only set the file properties via REST if the file is open with Write sharing
Get File Properties N/A  
Set File Metadata Write If file is currently open in SMB, can only set the file metadata via REST if file is open with Write sharing.
Get File Metadata N/A  
Delete File Delete If file is currently open in SMB, can only delete the file via REST if file is open with Delete sharing.
Put Range Write If file is currently open in SMB, can only write data against the file via REST if file is open with Write sharing.
List Ranges Read If file is currently open in SMB, can only list its ranges via REST if the file if file is open with Read sharing.

NOTE: List Files (REST API), Get File Properties (REST API), and Get File Metadata (REST API) do not operate on SMB file content and do not require read access to the file (i.e. these operations will still succeed even if an SMB client has the file open for exclusive read access).

Here is an example of a sharing violation for REST Get File:

  • An SMB Client opens a file with FileShare.Write (but not FileShare.Read which would mean other clients are not allowed to read the file at the same time).
  • A REST Client then performs a Get File (REST API) operation on the file (thereby using FileAccess.Read as specified in the table above).
  • Result: The REST Client’s request fails with status code 409 (Conflict) and error code SharingViolation since SMB Client still has the file open while denying Read/Delete access).

When to use Azure Files vs Azure Blobs vs Azure Disks

We have three main ways to store data in the Azure cloud – Files, Blobs and Disks. All three abstractions take advantage of Azure Storage stack and the Azure platform. The following section compares the advantages of each abstraction.

Azure Files: Provides a SMB 2.1 interface in addition to the REST interface to provide access to files. The SMB interface enables applications running in the cloud to use native file system APIs to read and write from files. A file share is best for:

  • Lifting & shifting applications to the cloud which already use native file system APIs to share data between pieces of the applications
  • Storing development and debugging tools that need to be accessed from many cloud instances
  • Applications that want REST access to data from anywhere and SMB access to data from within the region the storage account is located in

Azure Blobs: Provides a REST interface for massively scale out object storage.

  • Applications can be written to use REST APIs to store unstructured data into Azure blobs at a massive scale (a single container can be 500TBs in size). .
  • Supports streaming scenarios and random access
  • Access to data from anywhere via REST

Azure Disks: Provides persistent disks to be attached to Azure virtual machine in which data is made durable by storing the disk as a fixed formatted VHD in a page blob in Azure storage. When used as a VHD, the disk can be attached to a single VM, but not shared across VM instances.

  • Lift & Shift applications that use native file system APIs to read and write data to persistent disks, but does not require this data to be available to other cloud VMs. Note that a single disk can be attached to only a single VM at any given time.
  • Individual data stored on the disk is not required to be accessed from outside the VM as the data is stored in a VHD formatted with NTFS. However, the VHD can be downloaded from anywhere via REST API and then loaded onto a local virtual machine.
  • Disks can be snapshotted to create point in time read-only backups. When recovery needs to take place, a snapshot can then be copied to a different blob and data can be recovered.

When accessing Azure Files via SMB 2.1, the share is available to VMswithin the same region as the storage account. The REST interface on other hand is available from everywhere. This new service enables customers to “lift and shift” legacy applications that rely on file system APIs to the cloud without code change.

The following table compares Azure Files with Azure Blobs. The most significant difference is that Azure Files can be accessed via standard file system APIs from VMs (e.g, Azure Files has true directories and supports file and directory rename). Both Files and Blobs provide a REST APIs that allows global access to the data they store. Another important difference is that Azure Blobs scale massively, up allowing up to 500 TB per container, whereas Azure Files limits capacity to 5 TB per share. Finally, Azure Blobs supports the “copy blob”, and “snapshots” APIs, while the preview of Azure Files does not support those APIs.

Description Azure Blobs Azure Files
Durability

Options
LRS, ZRS, GRS (and RA-GRS for higher availability) LRS, GRS
Accessibility REST APIs SMB 2.1 (standard file system APIs)

REST APIs
Connectivity REST – Worldwide SMB 2.1 - Within region

REST – Worldwide
Endpoints http://myaccount.blob.core.windows.net/mycontainer/myblob \\myaccount.file.core.windows.net\myshare\myfile.txt http://myaccount.file.core.windows.net/myshare/myfile.txt
Directories Flat namespace however prefix listing can simulate virtual directories True directory objects
Case Sensitivity of Names Case sensitive Case insensitive, but case preserving
Capacity Up to 500TB containers 5TB file shares
Throughput Up to 60 MB/s per blob Up to 60 MB/s per share
Object size Up to 1 TB/blob Up to 1 TB/file
Billed capacity Based on bytes written Based on file size

Azure Files complement Azure Disks, which can be attached to Azure VMs. A disk can be attached only to a single VM at any given time. Azure disks are fixed format VHDs stored as page blobs in Azure Storage and are used by the VM to persist the data on the disks. However, a disk is an NTFS formatted VHD (or other file system format) and thus it can be accessed from only a single VM. Also, disks do not have a REST interface that understands the VHD or file system format, and thus you cannot access the data (files) within VHD from outside the VM via REST. File shares based on Azure Files can be access from an Azure VM in the same way they access the local disk. In addition, the file share can be shared across many VMs as well as accessible through REST APIs. The below table highlights some of the differences between Azure Disks and Files.

Description Disk Azure Files
Relationship with Azure VMs Required for booting (OS Disk)  
Scope Exclusive/Isolated to a single VM Shared access across multiple VMs
Snapshots and Copy Yes No
Configuration Configured via portal/Management APIs and available at boot time Connect after boot (via net use on windows)
Built-in authentication Built-in authentication Set up authentication on net use
Cleanup Resources can be cleaned up with VM if needed Manually via standard file APIs or REST APIs
Access via REST Can only access as fixed formatted VHD (single blob) via REST. Files stored in VHD cannot be accessed via REST. Individual files stored in share are accessible via REST
Max Size 1TB Disk 5TB File Share 1TB file within share
Max 8KB IOps 500 IOps 1000 IOps
Throughput Up to 60 MB/s per Disk Up to 60 MB/s per File Share

Characteristics and Compatibility of the Azure File service

The following are the preview scalability targets for Azure Files

  • Up to 5TB per share
  • A file can be up to 1 TB
  • Up to 1000 IOPS (of size 8KB) per share
  • Up to 60MBps per share of data transfer for large IOs

The version of SMB protocol supported is SMB 2.1, which is available on Windows clients using Windows 7 or up, Windows Server 2008 R2 or up. For Linux, Ubuntu images available on the Azure IaaS images gallery are known to support SMB 2.1, however any other distribution with SMB2.1 support should also work.

Pricing

Pricing for the new SMB service is here. During preview, the capacity will be charged at 50% of the GA price.

SMB Compatibility

The SMB 2.1 protocol has many features; some of them are not applicable to the cloud (e.g, named pipes, etc), while others are used so rarely that we do not support them (alternative data streams). Please see here for the list of these features not supported by Azure Storage Files.

FAQ

1. Is SMB 3.0 supported?

We currently support SMB 2.1. We do have it in our list of feature requests to support SMB 3.0 but we do not have a timeline to share yet. We found that SMB 2.1 worked well with most popular systems and tools.

2. Is Active Directory based authentication supported?

We currently do not support AD based authentication or ACLs but do have it in our list of feature requests to support it. For now, the Azure Storage account keys are used to provide authentication and authorized access to the file share.

3. Would a File Share be accessible from outside the region that hosts the storage account?

SMB 2.1 protocol is available only from within the same region as storage account. REST APIs are available for accessing these files concurrently from anywhere.

4. How do I make the share visible to my VM?

You map (or mount) the share as you would any other SMB share in your OS. For Windows, you can use the “net use” command on the command-line, or use the File Explorer to mount a share. The storage account name is the username, and the password is the storage account key:

net use * \\myaccountname.file.core.windows.net\<sharename> /u:myaccountname StorageAccountKeyEndingIn==

5. Can I mount a share from Linux?

Yes. Today, it looks like only the latest 2 Ubuntu images in the portal can support Azure Files. To mount the share from linux, you first need to install some client tools. One choice is cifs-utils. This is the command from Ubuntu to install cifs-utils:

     sudo apt-get install cifs-utils

        Next, you need to make a mount point (mkdir mymountpoint), and then issue the mount command that is similar to this:

     sudo mount -t cifs //myaccountname.file.core.windows.net/mysharename ./mymountpoint -o vers=2.1,username=myaccountname,password=StorageAccountKeyEndingIn==,dir_mode=0777,file_mode=0777

        You can also add settings in your /etc/fstab to mount the share.

6. How do I access the data on the share?

Once the share is mounted, accessing it is no different than accessing any file on your local hard drive. Just use the standard file system APIs to create/open/read/modify/delete the files or directories you need.

7. Does the new emulator support Azure Files?

The new emulator does not support SMB or REST APIs for Azure Files.

Summary and Links

To summarize, we are very excited to announce a new file sharing PaaS service that enables our users to easily share data between application instances using standard file system APIs. As we always do, we would love to hear feedback via comments on this blog, Azure Storage MSDN forum or send email to mastoragequestions@microsoft.com.

Please see these links for more information:

Azure Files 2014-04-14 version

AzCopy

Azure File PowerShell Cmdlets (CTP)

Storage .NET Client Library 4.0 for 2014-04-14 version

Brad Calder, Andrew Edwards, Jai Haridas, Atul Sikaria and Jean Ghanem

Comments (63)

  1. yk says:

    where can i find the zip file that includes new Azure Files cmdlets?

  2. Dave says:

    This is a great feature that will enable many HPC applications to more easily port to Azure

  3. jaidevh1@hotmail.com says:

    @yk – we have updated the blog with links and also added it to the end. @dave – thanks and do let us know if you have feedback.

  4. Ari says:

    How we can do backups?

  5. jaidevh1@hotmail.com says:

    @Ari, At this time you can use AzCopy or Powershell to copy the files to create a backup.  We’ll be looking at providing additional solutions in the future to backup Azure Files.

  6. Cam says:

    Will Azure Files support retrieving the directory size? If so, will that be available via the REST api (and c# client library)?

  7. jaidevh1@hotmail.com says:

    @Cam – thanks for the feature request for retrieving directory size via REST API. We will add it to the list of requests. All REST APIs will be available via our client libraries.

  8. Juan Carlos says:

    Could you please provide a sample on what to add to fstab: "        You can also add settings in your /etc/fstab to mount the share."

  9. Andrew Edwards says:

    @Juan – You can find an fstab example at the bottom of our "Persisting connections to Azure Files post": blogs.msdn.com/…/persisting-connections-to-microsoft-azure-files.aspx

  10. jb@xyonmap.com says:

    Does anyone know how to use this type of share in IIS (Windows Server 2012 R2 – IIS 8) as a web root. I have tried to add a local user like the storage account and with a password matching the account key but can't get it to work. Any suggestions ?

  11. Sebastian Beyer says:

    Is file storage not available in free acounts? I can't find anything to register for in Preview Portal or Management Portal. Only Blob, Table, Queue

  12. Sebastian Beyer says:

    What are allowed Names for the Share. On using "SMBSHARE"  as name I get => 'SMBSHARE' is not a valid name for a file share of Windows Azure File Service

  13. jeanghanem@hotmail.com says:

    @Sebastian, the share name must be lowercase. please take a look at this MSDN documentation for more information on naming rules: msdn.microsoft.com/…/dn167011.aspx

  14. Christofer says:

    Is there a way to let a Windows Service running on my VM have access to a share?

  15. Andrew Edwards says:

    @Christofer: Our other blog post on Azure Files (blogs.msdn.com/…/persisting-connections-to-microsoft-azure-files.aspx) describes methods that you can use to persist credentials such that applications that aren't running interactively (like services) can connect to shares.  Please let us know if you have further questions.  Thanks!

  16. dan houck says:

    Info for anyone following your examples: not only is the share lowercase, but the account name is case-sensitive (lower case also).

  17. Team anyone seen this error? says:

    PS C:azurefilesazurestoragefile> import-module .azurestoragefile.psd1 VERBOSE: Loading module from path 'C:azurefilesazurestoragefileazurestoragefile.psd1'. VERBOSE: Loading 'TypesToProcess' from path 'C:azurefilesazurestoragefileMicrosoft.WindowsAzure.Commands.Storage.File.types.ps1xml'.VERBOSE: Loading 'FormatsToProcess' from path 'C:azurefilesazurestoragefileMicrosoft.WindowsAzure.Commands.Storage.File.format.ps1xml'. Do you want to run software from this untrusted publisher? File C:azurefilesazurestoragefileMicrosoft.WindowsAzure.Commands.Storage.File.types.ps1xml is published by CN=Microsoft Corporation, OU=MOPR, O=Microsoft Corporation, L=Redmond, S=Washington, C=US and is not trusted on your system. Only run scripts from trusted publishers. [V] Never run  [D] Do not run  [R] Run once  [A] Always run  [?] Help (default is "D"): A VERBOSE: Loading module from path  'C:azurefilesazurestoragefileMicrosoft.WindowsAzure.Commands.Storage.File.dll'. import-module : Could not load file or assembly 'file:///C:azurefilesazurestoragefileMicrosoft.WindowsAzure.Commands.Storage.File.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) At line:1 char:1 + import-module .azurestoragefile.psd1 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    + CategoryInfo          : NotSpecified: (:) [Import-Module], FileLoadException    + FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand PS C:azurefilesazurestoragefile>

  18. pgemerson@yahoo.com says:

    •During preview please use the new File cmdlets in a different PowerShell session to existing Azure cmdlets since this preview module is developed using Storage Client Library 4.0 which is different from the version that Microsoft Azure module depends on

    What does the above statement mean – not clear.

  19. jaidevh1@hotmail.com says:

    About the failure to load module, did you follow the instruction to unblock. This one in particular:

    2. Right-click on the zip package from File Explorer and choose Properties. On the General tab, change the security setting to “unblock”.

    If yes, can you try manually unblocking using the following cmd:

    Unblock-file –Path c:azurefilesazurestoragefile*

    Let us know if you still face a problem.

    Thanks,

    Jai

  20. jaidevh1@hotmail.com says:

    @pgemerson, Azure sdk has some cmdlets that we release for service management, storage etc. services. However, this preview cmdlet does not work with other released Azure cmdlets because the released Azure cmdlets depend on older storage client library than the one that the preview file cmdlet depends on. Hence the suggestion is to not use this preview cmdlets with other released azure cmdlets.

    Does that help explain?

    Thanks,

    Jai

  21. Joel Sam Samraj says:

    where is the “AzureStoreFile” directory mentioned in F.A.Q 7? – I could not find it in the downloaded zip file

  22. jaidevh1@hotmail.com says:

    @Joel, I just retried it and the zip has AzureStorageFile. Can you retry from the link please?

  23. HWAY BT Team says:

    I looked at and understand persistent connection, and that is when a user is logging in.  My question…. can you have the file share mounted as a drive letter without having any users log in?  Would you create a service that starts on reboot?  My intention is to have x number of web servers in Azure all accessing the same file share, and I do not want to have any users log on.

  24. Russ B says:

    Can Mac clients connect to Azure File Service?

  25. jaidevh1@hotmail.com says:

    @Russ – yes via REST interface. We have a Java library for Azure Storage (v1.1) that can be used too (@ search.maven.org). The SMB interface is available only from Azure cloud within the same region.

  26. Jay says:

    I want to use azure file services as a shared drive among instances but I am having some trouble in creating it programmatically as advised in your blog. What are you using as your cxnString? I have tried to create mine by passing in the storage account name as I have previously done CloudStorageAccount account = CloudStorageAccount.Parse(<storage-name>) but I am getting a System.FormatException error on {"Settings must be of the form "name=value"." If I set this to CloudStorageAccount account = CloudStorageAccount.DevelopmentStorageAccount then I get past this line but it errors out on CloudFileClient client = account.CreateCloudFileClient() stating no endpoint configured, am I missing something? Also is it possible to do this on a webrole

  27. serdar.ozler@outlook.com says:

    @Jay, CloudStorageAccount.Parse expects a connection string and the format is documented at msdn.microsoft.com/…/ee758697.aspx. If you would like to use your account name and key directly, you can instead use the CloudStorageAccount constructor that takes a StorageCredentials object, which you can create with your account name and key. And yes, it is possible to use this in a web role.

    In addition, the reason you are getting an error with DevelopmentStorageAccount is that Azure Storage Emulator does not support Azure Files as also mentioned in FAQ.8 above in the blog post.

  28. RichardE says:

    It has been noted on another blog that Azure Files cannot be mapped as a local drive on a machine connected via a site-to-site or point-to-site VPN (only via ExpressRoute). Is this feature likely to be added in the future?

  29. agnimitra.sinha@sage.com says:

    I have configured an Azure file server and have mapped with network drive (say Z). Now I am able to connect to network drive using C# console application. Also, I am able to read/write into this.

    However when I deploy the same application in IIS server, I am not able to access the mapped path.

    can anyone please help me out.

  30. Andrew Edwards says:

    Hi Agnimitra,

    In Windows, connections to file shares are managed on a per-user basis, and IIS runs under a different user, so IIS won't implicitly inherit your connections.  Instead, you need to establish the connection from IIS's user context.  Some more information can be found on another blog post: blogs.msdn.com/…/persisting-connections-to-microsoft-azure-files.aspx.

    Thanks

    Andrew Edwards

    Microsoft Azure Storage

  31. Fernando says:

    Given that steps 2 and 3 have to be done independently of usage (or maybe I misunderstood something…), did you consider providing a ready-to-use file share at creation?

    TIA,

    Fernando.

  32. richard.hauer@5limes.com.au says:

    Is it possible to use Azure Files as the shared storage for a SQL AlwaysOn FCI cluster?  The idea being that SQL AlwaysOn clustering can be achieved without the need for an Enterprise license.

    PS. I appreciate that Availability Groups via SQL Enterprise are a superior solution, but at almost triple the price it's a lot to ask for HA.  Many people point to SQL Azure at this point, but SQL Azure has only limited support for the features in SQL Server (broad, but limited nonetheless) and some databases simply cannot be migrated without significant schema and application changes.

  33. Phil says:

    Hi, The share name appears to be case sensitive. When all I alter is the case of the share I get a 400 Bad Request response.

  34. isabelle says:

    Can I access azure files directly via php file_put_contents

  35. Henning says:

    I was able to set this us and mount it to my VM to be used for central storage of our web-farm. The problem though is that IIS does not want to read my config file located in this storage. I am able to navigate it just fine using Explorer and to copy files back and forth. Any idea why this is? I would think this would be one of the main reasons to use Azure files.

    I tried creating a local user on the VM and to use those credentials to connect, however it seems the generated access key is too long to be used as a password that IIS is willing to accept.

    Any assistance would be greatly appreciated.

  36. Andrew Edwards says:

    @Henning,

    Can you be more specific about which configuration file you are trying to read from the Azure File share?  The method you describe (creating a local user that happens to be names the same as your storage account name) generally works to get IIS to connect with Azure File shares.

    Thanks

    Andrew Edwards

    Microsoft Azure Storage

  37. Flavian Hautbois says:

    On Ubuntu the file paths won't be recognized properly because of charset issues due to an incorrect command in this article. The right command is: sudo mount -t cifs //myaccountname.file.core.windows.net/mysharename ./mymountpoint -o vers=2.1,username=myaccountname,password=StorageAccountKeyEndingIn==,iocharset=utf8,dir_mode=0777,file_mode=0777

    This may not work right away. You may get a 'mount error(79): Can not access a needed shared library' error. Some people fixed this issue using 'sudo apt-get install linux-generic' (my case), others using 'sudo apt-get install linux-image-extra-virtual'. If this does not solve the problem right away, try rebooting your server before cursing too loud (surprisingly it worked for me too).

  38. Sascha Gottfried says:

    Successfully connected from a VM using Ubuntu Linux (Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-29-generic x86_64)) using given instruction for Linux (FAQ 5). Noticed that `tail -f` is not recognizing the file system type. Any comments and will your team report that as a bug?

    tail: unrecognized file system type 0xfe534d42 for '/home/user/myshare/mydirectory/myfile.log'. please report this to bug-coreutils@gnu.org. reverting to polling

  39. Andrew Edwards says:

    Hi Flavian,

    We did a quick experiment with the Ubuntu images in the Azure Gallery, and with both 14.* images, you can connect to an Azure Files Share without installing any additional components.  However, your advice may be useful for other Ubuntu images.

    Thanks

    Andrew Edwards

    Microsoft Azure Storage

  40. Craig Mc says:

    Ok so If I am going full Pass, how could I attach a large storage volume (closer to infinite) to my application, since this in a SaaS model is the more typical model?

  41. Andrew Edwards says:

    Hi Sascha,

    Tail -f will return the warning with '0xfe534d42' for all SMB connections, including Azure Files.  Feel free to report that issue to the alias specified by the error.

    Thanks

    Andrew Edwards

    Microsoft Azure Storage

  42. Craig Mc says:

    Hi,

    In my app a (SaaS) website builder, I have a folder called Client Data, that folder has the potential to store 5 million websites worth of content. In my previous model I simply mapped a CDN volume that was infinite and wrote it it as if it was a normal part of the file system.

    This was also good because users could have a logical folder and file structure for their stored media.

    How do I achieve a similiar effect with Azure.

    Or do I need to keep making azure file stores for each and every user? How can I stream line that entire process to be 100% progmatic.

    Warm Regards

    Craig

  43. Andrew Edwards says:

    Hi Craig,

    With Azure Files, you can create a folder structure within a file share, just like you did before, or you can create a file share per user and automate that using the REST APIs.  Keep in mind that a single share is limited to 5TB of data, and a single storage account can hold up to 500TBs of file shares.

    Thanks

    Andrew Edwards

    Microsoft Azure Storage

  44. Mani says:

    How can I created the subdirectory under the share ?

    testtestsub

  45. Andrew Edwards says:

    Hi Mani,

    You have many options for creating directories.  If you have connected to your Azure Files Share from a VM using the "net use" command, you can use "mkdir" to create a directory.  For example, if I have connected to myshare in a VM like this:

      net use x: \mystorageaccount.file.core.windows.netmyshare /u:mystorageaccount MyStoreAccountKeyEndingIn==

    Then I create a directory like this

      mkdir x:mydirectory

    If you are not running in an Azure VM, you can use the powershell commandlets to create a directory in your Azure Files Share.  There is an example of how to do that here: msdn.microsoft.com/…/dn806385.aspx

    Finally, the Storage Client Library API "CloudFileDirectory.Create" can be used to create directories:  msdn.microsoft.com/…/microsoft.windowsazure.storage.file.cloudfiledirectory.create.aspx

    Thanks

    Andrew Edwards

    Microsoft Azure Storage

  46. Rory PS says:

    Is it possible to give access to a Get File operation using a Shared Access Signature (SAS)? If not, is it planned to add this?

    stackoverflow.com/…/can-i-create-a-sas-url-for-azure-file-storage-i-e-not-blobs

  47. Andrew Edwards says:

    Hi Rory,

    Azure Files do not support Shared Access Signature (SAS).  SAS support is on our list of requested features, but we do not have a timeline for when it will be available.

    Thanks

    Andrew Edwards

    Microsoft Azure Storage

  48. Craig Mc says:

    Hi Andrew,

    Great, I have my head around that aspect, now one final question, how do I under Azure Websites, give ASP Classic Read and Write permission to the mapped folder so I can use FSO.

    My goal is to create a 2GB Share for each user and just keep doing that for each of the 100k users. Obviously I want to do this real time programtically as each user signs up.

    Many Thanks

    Craig

  49. Andrew Edwards says:

    Hi Craig,

    Azure Websites don't currently support connecting to Azure Files Shares.

    You can connect to an Azure Files Share from an IaaS VM running IIS.

    Also, Azure Files does not have any quota enforcement that you could use to limit a share to 2GB.  This is on our list of requested features, but we do not have a timeline for when it will be available.

    Thanks

    Andrew Edwards

    Microsoft Azure Storage

  50. Luke Puplett says:

    How can a drive be mapped or a UNC path be consumed from a Web Role or Azure Website? You cannot run processes to map drives, you cannot use Interop either. No one ever got around to writing a Map Drive in `System.IO` in .NET.

    I understand that Web Jobs run in the same space as Websites. Perhaps on a single instance, a Web Job has the access to the host OS to map a drive???

    The use-case I have for this is using NuGet.Server (which is dead simple and uses a file share of packages) as a website for custom feeds (Visual Studio Online/TFS could also publish packages via REST direct to storage).

  51. Craig Mc says:

    Hi Andrew,

    Ok so moved to a VM, now is there a way using ASP Classic to mount the storage. So far using rest I can create the shares, but how would I mount the shares, with out having to resort to power shell in manual form?

    The major problem I still seem to be facing is there is no proper scalable logical storage, what ever I do I need to be able to make seamless and "infinite" which at this stage looks like I would need to mount a 5tb share, and then create and mount another one when ever space runs low, which is a bit of a hack. It also means I would need to run some form of accounting on storage which is also a bit schlocky.

    Also is there any limit to the number of shares I can create, if I keep mounting share as we grow to 50 million users surely something bad is going to happen, it sounds massively inefficient at least from a scaling of applications perspective?

    Have I maybe missed something here. In previous clouds I have built there was always some sort of CDN or origin I could just map and it would grow forever and b a logical volume. Is there any such thing in Azure?

    Regards

    Craig

  52. Tania says:

    Can you tell me if Azure Files works to the UK Data Protection Act.

  53. Jason Tang 501 says:

    Hi Tania

    Please check the "E.U. Data Protection Directive" section from the Azure Privacy Statement below which describes the specific privacy policy and practices that govern customers' use of Azure.

    azure.microsoft.com/…/privacy

    Thanks

    Jason Tang

    Microsoft Azure Storage

  54. Dave Bean says:

    Hello,

    A couple of questions about this..

    As of March 2015, is there an Azure automateed backup facility tied to this kind of store ?

    Also, is there a timeline on any kind of authentication other than storage account based ?

    As I see it these are the biggest impediments to what looks like a very useful bridge service for activities not capable of being rebuilt with .Net in the short term.

    I suppose we could use a VM running a file server, but there are definite advantages to operating under a SLA based service model abstracting the mechanics.

    thanks,

    Dave Bean

  55. Sushil says:

    I have a file share. I can mount it in the VM (SMB). Can I mount the file share from my laptop also (i.e. outside azure VM)

  56. Winston Li says:

    The FAQ#5 mentions only the latest 2 Ubuntu images are able to mount the share. Is it planned to enable other non-Ubuntu Linux images (say, CentOS in the image gallery) to mount the share as well? If yes, any rough timeframe?  

  57. Jason Tang says:

    Hi Brajesh

    Azure Files is in preview and you need submit preview request from azure.microsoft.com/…/preview

    and it will be auto-approved. After that you can follow the getting start guide below to try the service.

    azure.microsoft.com/…/storage-dotnet-how-to-use-files

    Jason Tang | Microsoft Azure Storage

  58. Jason Tang says:

    Hi Winston

    Actually any Linux distributions which supported SMB2.1 can work with Azure Files.

    For CentOS you may want try 7.0 or 7.1.

    Jason Tang | Microsoft Azure Storage

  59. Jon V says:

    Would multiple SSDs striped on a single VM and shared via mapped drive provide faster IO and throughput than Azure Files? Or does the SMB2.1 connection make Azure Files a faster solution to shared storage?

    My scenario involves multiple compute nodes hitting a shared folder currently hosted on a "head node". Warmup seems to be a factor in getting faster IO between VMs (all residing in the same region and within a vnet)

  60. RSACPM says:

    when attempting to mount the SMB share in a Linux vm in azure, I get password too long as an exception.  Anyone else run into this problem?

  61. jschlueter says:

    Is there an update on the ability to net use the file service from outside Azure?  The fancy footwork of WebDAV sharing via a VM is not ideal.  This could solve a lot of problems with using synchronized NAS boxes in different locations.

  62. RSA says:

    When attempting to mount the share from Linux (SUSE 11 SP3), we get "password too long" errors preventing useful mount.   Looking around we notice that there are some limitations on the Linux side for length of password associated with SMB Shares.  The default azure instances are compiled with with either old headers or older versions of SMB that prevent utilizing Azure Files.  so far, we are searching for the best work around.

  63. Jason Tang 501 says:

    To RSA: It seems SUSE 11 SP3 doesn't have full support on SMB2.1, you probably want try other latest Linux distribution such as SUSE Linux Enterprise Server 12 or latest version of Ubuntu (available in Azure Image Gallery).