Azure 上为Liunx VM 挂载File类型的存储。
1. Create a storage account in Azure, copy the storage account endpoint URL (with postfix of "file.core.chinacloudapi.cn") and storage access key to a temp file.
2. Download and install Azure CLI: https://www.azure.cn/documentation/articles/xplat-cli-install (REBOOT PC after installation).
3. Download and install latest Node.JS: https://nodejs.org/en/#download (Optional, in some case, Azure CLI may encounter problem)
4. Connect to the storage account and create sub-folders by Azure CLI.: https://www.azure.cn/documentation/articles/xplat-cli-connect
4.1 open Azure CLI (CMD or PowerShell on Windows, Shell on Linux).
4.2 for US Azure - Connect to Azure: azure login, then follow the instruction to login.
for China Azure - Connect to Azure: azure login -e AzureChinaCloud -u username -p password
4.3 Create share first: azure storage share create <nameofshare> -a <storage Accountname> -k <storage account access Key>
4.4 Create folder for share: azure storage directory create --share <nameofshare> -p <nameofsharefolder> -a <storageAccountname> -k <storage account access Key>
4.5 (optional for test), upload local file to the folder just created: azure storage file upload 'c:\a.a' <nameofshare> <nameofsharefolder>
5. Mount to Linux server: https://www.azure.cn/documentation/articles/storage-how-to-use-files-linux (note: on that page, there are instruction for different Linux versions).
command for reference: host~$ sudo mount -t cifs //ACCOUNTNAME.file.core.windows.net/myshare /mnt/mountpoint -o vers=3.0,user=<StorageAccountName>,password=<StorageaccountAccessKey>,dir_mode=0777,file_mode=0777
5. Using utility like WinSCP connect to the linux server and check the mountpoint to verify the folder and file is there.
Azure 上为Liunx VM 挂载File类型的存储。的更多相关文章
- Azure杂七杂八系列(二) - 如何在Azure上重新配置VM
我们经常遇到这样的问题, 对于已经建立的VM进行性能提升, 比如需要更好的虚拟机或者需要迁移到其他的虚拟网络 那么我们可以使用以下的方法进行修改. 1. 如图所示, TESTVMXX位于North ...
- 在Windows Azure上配置VM主备切换(1)——Linux篇
对任何一个上线系统来说,高可用设计是不可或缺的一个环节,这样才可以确保应用可以持续.稳定的运行,而不是频繁的掉线.停机.高可用设计的核心思路很简单,就是消除一切单点故障,将单点链路或者节点升级为多点. ...
- 上传通用化 VHD 并使用它在 Azure 中创建新 VM
本主题逐步讲解如何使用 PowerShell 将通用化 VM 的 VHD 上传到 Azure.从该 VHD 创建映像,然后从该映像创建新 VM. 可以上传从本地虚拟化工具或其他云导出的 VHD. 对新 ...
- Azure上批量创建OS Disk大于30G的Linux VM
Azure上VM的OS盘的大小在创建时是固定的.Windows是127G,Linux是30G.如果需要批量创建的VM的OS Disk有更大的容量.可以考虑用下面的方法实现. 1 创建一台有Data-d ...
- Azure上如何在Linux下挂载数据磁盘
[原文首次发表于51cto http://cloudapps.blog.51cto.com/3136598/1653672] 在Azure上创建了虚拟机之后,我们在一些情况下会需要添加更多的数据磁盘来 ...
- Windows Azure 上 Linux VM 中的交换空间 – 第 2 部分
本文章由 Azure CAT 团队的 Piyush Ranjan (MSFT) 撰写. 在前一篇文章 Windows Azure 上Linux VM 中的交换空间第 1 部分中,我介绍了在默认情况下, ...
- 在 Windows Azure 上部署预配置 Oracle VM
Microsoft 和 Oracle 近期宣布建立战略合作伙伴关系,基于此,我们将通过 Windows Azure 镜像库推出多种常用的 Oracle 软件配置.即日起,客户可以在 Windows S ...
- 关于ACtion类利用file类型取得上传文件的内容,名字和内容类型
上面的Action提供了两个属性:uploadFileName和uploadContentType,这个两个属性分别用于封转上传文件的文件名.上传文件的文件类型.Action类直接通过File类型属性 ...
- file类型input框设置上传相同文件,并都可以触发change事件。
在使用file类型input框是,删除了第一次上传到文件,再次上传相同文件,无法触发change事件,所以在删除的js上添加如下js代码: document.getElementById('fileU ...
随机推荐
- ASP.NET MVC的路由
好久没写博文了,感觉最近好像少了点动力.唉!这回就看看这个MVC的路由. 说这个路由机制其实不是MVC里面特有的,ASP.NET里面本身就有的,只不过在WebForm里面一般比较少用,而在MVC里就是 ...
- [CLR via C#]26. 计算限制的异步操作
一.CLR线程池基础 前面说过,创建和销毁线程是一个比较昂贵的操作,太多的线程也会浪费内存资源.由于操作系统必须调度可运行的线程并执行上下文切换,所以太多的线程还有损于性能.为了改善这个情况,CLR使 ...
- 购买SSL证书到部署网站遇到的若干问题
作为一个菜鸟,对于SSL证书,我了解不多,只知道用了它网站更安全,所以这次使用SSL证书途中遇到了各方面的各种问题,到今天为止终于全部解决. 一.证书格式 前两天在那什么云上面买了个SSL证书,是Wo ...
- csharp: Export or Import excel using NPOI
excel 2003: using System; using System.Collections.Generic; using System.ComponentModel; using Syste ...
- 使用SignalR+Asp.net创建实时聊天应用程序
一.概述: 使用 ASP.NET 那么 SignalR 2 创建一个实时聊天应用程序.将 SignalR 添加 MVC 5 应用程序中,并创建聊天视图发送并显示消息. 在Demo中,将学习Signal ...
- pbfunc外部函数扩展应用-在Powerbuilder中进行Http的GET、POST操作
利用PBFunc扩展函数进行Http的操作时,需要对n_pbfunc_http的以下几个函数进行参数设置: of_set_URL(...)//要进行GET或POST的url,必须 of_set_Con ...
- 快速理解JS的闭包
/**闭包:1.在函数内部改变变量值,不影响函数外全局变量(相当于JAVA中私有变量)* 2.调用闭包后,最后产生的变量值并不释放.* 3.任何人调用闭包,闭包里面的值并不 ...
- python基础之常用模块以及格式化输出
模块简介 模块,用一砣代码实现了某个功能的代码集合. 类似于函数式编程和面向过程编程,函数式编程则完成一个功能,其他代码用来调用即可,提供了代码的重用性和代码间的耦合.而对于一个复杂的功能来,可能需要 ...
- ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded
The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramewor ...
- [Microsoft Dynamics CRM 2016]Invalid Action – The selected action was not valid 错误的诱因及解决方法
详细问题描述: 由于解决windows server 评估版过期\SQL server 评估版过期的问题后而导致的Invalid Action – The selected action was no ...