Windows Azure Storage (20) uses azure File

Source: Internet
Author: User

Windows Azure Platform Family of articles Catalog

  When we are hosting the environmental operations website in a traditional IDC, we often encounter multiple Web servers with load balancing, followed by the same networked storage (SAN). In this way, you can solve the problem of file synchronization.

The server deployment diagram, as shown in:

  

In the Windows Azure Public cloud environment, it is difficult to implement the above architecture, mainly due to:

 1.Azure public cloud does not allow users to place networked storage (Sans) in the Azure data center

2. If you are using a separate azure Virtual machine to simulate networked storage, this azure VM will have a single point of failure.

You need to manually create an active Azure VM and a standby azure VM. When the active VM goes down, it is managed by the standby VM.

Before Azure file appeared, the solution for this shared storage was to have the user develop two times based on Azure storage and save the files that needed to be shared in azure storage. But this development cost is too big, very inconvenient.

You can now use Azure file to implement the functionality of shared folders , allowing multiple azure Virtual machines to use the same azure file, such as:

  

The Azure file features the following:

1. is a PAAs service that provides 99.9% SLAs with no single point of failure

2. Can be shared by multiple Azure VMs at the same time to resolve file sharing issues

3. Based on the SMB2.1 protocol, it can be used by both Windows and Linux.

4. Can be accessed through the REST API

Next, I will do a simple demo, give you a brief introduction of Azure File. The work is mainly divided into the following steps:

I. Preparatory work

Two. Create a file share using PowerShell

Three. Mount the azure File in Azure Virtual machine

I. Preparation: Confirm that Azure storage can use the Azure file feature

  1. TheAzure file feature is currently the preview stage, and if we have previously created an old Azure Storage account, it is not possible to see Azure file . For example, the Azure Storage account I created in the Hong Kong Data Center (East Asia) A long time ago is Leivms, and there is no Azure file feature, such as:

  

In order to demonstrate the relevant functions, the author created a new storage account, named Leifiledemo, created in Hong Kong data Center (East Asia), such as:

  

As you can see, files have appeared in, and we can use this namespace to create Azure File.

2. Next, we need to prepare the following environments:

-Create a new virtual network leivnet

-Create 2 Windows VMS, named Leizhangvmone and leizhangvmtwo

  -these 2 VMs are used through a cloud Service Name:LEIZHANGVM

  -these 2 VMS set up high availability sets: Leiavbset

- These 2 VMs are saved in the storage account we created earlier Leivms, note that This storage account is different from the Leifiledemo we created earlier

-Note: The storage account where our Azure VMs reside, and the storage account where Azure file resides, must be in the same datacenter. Here I use the Hong Kong Data Center (East Asia)

Two. Create a file share using PowerShell

Note: Azure file is only available in the latest 0.8.5 version and higher Azure PowerShell module, please download the latest Azure PowerShell tool in http://azure.microsoft.com/ en-us/downloads/ for download.

The following commands can be executed in Azure PowerShell or on the local computer through Azure windows:

1. Create context for storage accounts and keys

Execute the following command:

$ctx =new-azurestoragecontext Account-name Account-key

For example, the Azure file name that I created in step one is called Leifiledemo, execute the following command

$ctx =new-azurestoragecontext Leifiledemo [key to store account]

2. Create a new file share, where we create a new share named Sampleshare

Execute the following command:

$s = New-azurestorageshare Sampleshare-context $ctx

Three. Mount the azure File in Azure Virtual machine

1. We log in to Azure VM Leizhangvmone created before logging in via remote Desktop

2. Open PowerShell for Azure VMS

3. Save the virtual machine's storage account credentials

To ensure that Windows automatically connects to the file share when the Azure VM restarts, we need to execute the following command:

Cmdkey/add:<storage-account>.file.core.windows.net/user:<storage-account>/pass:<account-key>

In the author's environment, we execute the following command:

Cmdkey/add:leifiledemo.file.core.windows.net/user:leifiledemo/pass:[the key of the storage account)

The following are performed on this VM on Leizhangvmone:

4. Load the azure File

Using the net use command, we can mount the azure file as a local shared storage

net use Z: \ \<storage-account>.file.core.windows.net\<share-name>

In the author's environment, we execute the following command

NET use Z: \\leifiledemo.file.core.windows.net\sampleshare

We can view the shared storage that was mounted successfully, such as:

  

Repeat the command for step three, and we can mount shared storage on two Azure VMs at the same time, such as:

  

When the author creates a new file on the first VM, it can be seen on the second VM as well, such as:

By default, Azure file capacity is 5TB, and a single file stored in Azure file has a maximum capacity of 1TB.

The following is a comparison of azure file and blob

The following is a comparison of azure file with disk

Reference: Http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx

Windows Azure Storage (20) uses azure File

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.