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 ...
随机推荐
- c# 正则表达式 匹配中括号&颜色过滤
现在需要匹配 [color=#000000],以"[color"开头,以"[/color]"结束,中间字符数量不限制,最后返回所有匹配的下标. 代码如下: // ...
- foreach---集合已修改;可能无法执行枚举操作。
小结 : foreach是取只读的,在取的时候数据不能变(包括修改,删除,添加等).要避免这个问题,就应该使用for循环--- 原因: 当用foreach遍历Collection时,如果对Collec ...
- datagrid动态数据添加超链接的方法
首先,我我们要有一个json格式的datagrid_data.json文件,如下:
- csharp: NHibernate and Entity Framework (EF) (object-relational mapper)
代码生成器: 1. http://www.codesmithtools.com/ 2.https://sourceforge.net/projects/mygeneration/ 3. http:// ...
- C# 发邮件
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using Sy ...
- 关于SQL2008 “不允许保存更改。您所做的更改要求删除并重新创建以下表。您对无法重新创建的标进行了更改或者启用了‘阻止保存要求重新创建表的更改’” 解决方案
不允许保存更改.您所做的更改要求删除并重新创建以下表.您对无法重新创建的标进行了更改或者启用了“阻止保存要求重新创建表的更改” 解决方法: 打开SQL SERVER 2008 工具-->选项- ...
- Java 上传文件到 SFTP 抛异常 java.lang.NoClassDefFoundError: Could not initialize class sun.security.ec.SunEC 的解决办法
最近从 Op 那里报来一个问题,说是SFTP上传文件不成功.拿到的 Exception 如下: Caused by: java.lang.NoClassDefFoundError: Could not ...
- virtualenv and virtualenvwrapper on Ubuntu 14.04
In this post I’ll go over my attempt to setup virtual environments for Python development. Most Pyth ...
- ArcEngine 0x8004023C
在进行缓冲区查询时,查询的并是不要素本身的范围,而是缓冲一定半径,所以用到了ITopologicalOperator接口,主要是利用其buffer方法,代码如下: IFeatureClass pFea ...
- SharePoint Iframe 报错“此内容不能显示在一个框架中”
问题描述 我们SharePoint站点用Excel Service发布的Excel,需要Iframe到其他系统中,但是,Iframe的时候发现报错“此内容不能显示在一个框架中”. 后来,尝试在其他系统 ...