Eksportér (0) Udskriv
Udvid alt
Dette indhold er ikke tilgængeligt på dit sprog, men her er den engelske version.

Migrating Applications to Use Local Storage

Updated: April 9, 2014

Local Storage is provided as part of the Azure Compute offering and provides temporary storage for a running application instance. When you run your application in Azure, it is hosted in a virtual machine (VM) that has a virtual hard drive connected to it. Local storage represents a directory on the file system on the hard drive.

You can create multiple local storages for each instance. The default size of local storage is 1 MB. The storage size can be increased to the maximum that your compute instance allows. The maximum disk space for a compute instance depends on the VM size selected for your instance.

Authors: Sreedhar Pelluru
Reviewers: Valery Mizonov, Kun Cheng, Steve Howard

Migration Considerations

Your Azure applications in the cloud can use the existing NTFS APIs to access the local storage. This makes it easier to migrate on-premises applications that use the NTFS API (or standard .NET Framework API such as FileStream) to store and access temporary data on a file system to the Azure Platform with minimal changes to the code.

It is important to note that the local storage on a VM is only accessible by the local application instances on the VM. It can be configured to persist when the Web or Worker Role the instance runs in is recycled; however this only applies to a simple recycle of the role. If the instance is restarted on different hardware, such as in the case of hardware failure or hardware maintenance, data in the local storage is not moved along with the instance even if it was configured to persist through a recycle.

If you require reliable durability of your data, want to share data between instances, or access your data outside of Azure, use the Azure Table Service or Azure Blob Service or Azure SQL Database instead of local storage. If you want to share the data between instances with only one instance with the write access, consider using Azure Drives. See the comparison table in Migrating Data to Tables and Blobs in Azure for detailed comparison between these storages.

See Also


© 2014 Microsoft