Talk about how to create a file share in an Azure storage account and mount it on an azure VM today. (By the way, the Chinese Azure official documents can be translated, literal translation of global Azure, the technical documentation of the calibration is not good)
We'll start by creating a test VM on Azure, for reference: http://gshao.blog.51cto.com/3512873/1344846
1. Create a storage account on azure;
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/71/F0/wKiom1Xa_5OgRvfoAAHXUtwYrto540.jpg "height=" 504 "/>
2. Login Window Azure PowerShell, configure the file sharing;
Input:
Get-azurepublishsettingsfile-environment Azurechinacloud
Mport-azurepublishsettingsfile "****.publishsettings" (path to the configuration file)
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/71/F0/wKiom1Xa_5SQror4AAGksW8JSUE425.jpg "height="/>
Configure the Storage account context
$ctx =new-azurestoragecontext–storageaccountname Account-name–storageaccountkey account-key-environment " Azurechinacloud "(Chinese only need to add this, global not)
Create a shared folder
$s =new-azurestorageshare sharefiles (shared folder name)-context $ctx
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/71/F0/wKiom1Xa_5aiHoDXAAEu86TcMJQ328.jpg "height="/>
You can use the command to view the case of file:
Input: Get-azurestoragefile–share $s
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/71/F0/wKiom1Xa_5fRdbFSAABKUHB4-II308.jpg "height="/>
3. Mount the file share in Azure VM;
In PowerShell input:
Cmdkey/add:<storage-account-name>.file.core.windows.net/user:<storage-account-name>/pass:< Storage-account-key>
This is to save the credentials so that restarting the VM does not cause the file share's login credentials to be lost
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/71/F0/wKiom1Xa_5nicy-SAAFGhQf5LdY841.jpg "height="/>
To add a file share store:
net use Z: \ \ <storage-account>.file.core.chinacloudapi.cn\ shared folder name/u:<storage-account> < Storage-account-key>
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/71/F0/wKiom1Xa_5vztLwcAAEWBhntLzo722.jpg "height="/>
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/71/F0/wKiom1Xa_53ADuQ0AAEVAlWxHG8181.jpg "height=" 257 "/>
Well, guess how much storage space this folder is about. The answer is 5TB.
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/71/F0/wKiom1Xa_5_hLSpnAADRW9wL4mA858.jpg "height=" 288 "/>
But I'm quite surprised that the Chinese version of Azure
(The exact words are
)
Specifically, you can see China Azure about file Share storage links: http://www.windowsazure.cn/documentation/articles/storage-dotnet-how-to-use-files
This article from "Gs_hao" blog, declined reprint!
Azure storage File Share storage for Windows Azure