【Azure 存储服务】如何把开启NFS 3.0协议的Azure Blob挂载在Linux VM中呢?(NFS: Network File System 网络文件系统)
问题描述
如何把开启NFS协议的Azure Blob挂载到Linux虚拟机中呢?
【答案】:可以使用 NFS 3.0 协议从基于 Linux 的 Azure 虚拟机 (VM) 或在本地运行的 Linux 系统,在 Blob 存储中装载容器
操作步骤
参考官方文档(Mount Blob storage by using the Network File System (NFS) 3.0 protocol: https://docs.microsoft.com/en-us/azure/storage/blobs/network-file-system-protocol-support-how-to)可以成功的让 NFS 3.0的Blob Mount到VM中。

准备条件:
1) 开启NFS的Azure Storage Account
2) Linux 虚拟机(本示例中使用的为 UbuntuServer 18.04-LTS)
3) Storage Account与Linux 处于同一虚拟网络中,并且在Storage Account中设置允许访问的子网。
注意事项:
1)在创建Storage Account的时候要先开启ADLS Gen 2.0 (即Enable Hierarchical namespace 和 Enable network file system v3)

2) 使用PuTTy,SSH登录到VM后,需要使用用root权限执行mount命令。 使用 sudo -i 切换到root目录中。同时,如果没有安装nfs helper会提示bad option消息。只需使用 sudo apt install nfs-common 安装nfs helper。

3)最终,使用正确的 Storage Account 和 Container 名称替换下面指令中的信息。
mkdir -p /mnt/test mount -o sec=sys,vers=3,nolock,proto=tcp <storage-account-name>.blob.core.chinacloudapi.cn:/<storage-account-name>/<container-name> /mnt/test #1: Replace the <storage-account-name> placeholder that appears in this command with the name of your storage account. #2:Replace the <container-name> placeholder with the name of your container.

如果遇见错误,可以参考文档后面的常见错误部分,在本次的实验中,就先后遇见了 Access denied by server while mounting 和 mount: /mnt/test: bad option;错误。
| Error | Cause / resolution |
|---|---|
Access denied by server while mounting |
Ensure that your client is running within a supported subnet. See the Supported network locations. |
No such file or directory |
Make sure to type the mount command and it's parameters directly into the terminal. If you copy and paste any part of this command into the terminal from another application, hidden characters in the pasted information might cause this error to appear. This error also might appear if the account isn't enabled for NFS 3.0. |
Permision denied |
The default mode of a newly created NFS v3 container is 0750. Non-root users do not have access to the volume. If access from non-root users is required, root user must change the mode to 0755. Sample command: sudo chmod 0755 /mnt/<newcontainer> |
EINVAL ("Invalid argument") |
This error can appear when a client attempts to:
|
EROFS ("Read-only file system") |
This error can appear when a client attempts to:
|
NFS3ERR_IO/EIO ("Input/output error") |
This error can appear when a client attempts to read, write, or set attributes on blobs that are stored in the archive access tier. |
OperationNotSupportedOnSymLink error |
This error can be returned during a write operation via a Blob or Azure Data Lake Storage Gen2 API. Using these APIs to write or delete symbolic links that are created by using NFS 3.0 is not allowed. Make sure to use the NFS v3 endpoint to work with symbolic links. |
mount: /mnt/test: bad option; |
Install the nfs helper program using sudo apt install nfs-common. |
参考文档
Mount Blob storage by using the Network File System (NFS) 3.0 protocol:https://docs.microsoft.com/en-us/azure/storage/blobs/network-file-system-protocol-support-how-to
【Azure 存储服务】如何把开启NFS 3.0协议的Azure Blob挂载在Linux VM中呢?(NFS: Network File System 网络文件系统)的更多相关文章
- NFS - Network File System网络文件系统
NFS(Network File System/网络文件系统): 设置Linux系统之间的文件共享(Linux与Windows中间文件共享采用SAMBA服务): NFS只是一种文件系统,本身没有传输功 ...
- nfs 是Network File System 网络文件系统
NFS的基本原刚是容许不同的客户端及服务通过一组PRC分享相同的文件系统,它是独立于操作系统,容许不同硬件及操作系统的系统共同进行文件的分享.NFS在文件传送过程中依赖于RPC协议.远程过程调用Rem ...
- 玩转Windows Azure存储服务——网盘
存储服务是除了计算服务之外最重要的云服务之一.说到云存储,大家可以想到很多产品,例如:AWS S3,Google Drive,百度云盘...而在Windows Azure中,存储服务却是在默默无闻的工 ...
- 解读 Windows Azure 存储服务的账单 – 带宽、事务数量,以及容量
经常有人询问我们,如何估算 Windows Azure 存储服务的成本,以便了解如何更好地构建一个经济有效的应用程序.本文我们将从带宽.事务数量,以及容量这三种存储成本的角度探讨这一问题. 在使用 W ...
- 【Azure 存储服务】代码版 Azure Storage Blob 生成 SAS (Shared Access Signature: 共享访问签名)
问题描述 在使用Azure存储服务,为了有效的保护Storage的Access Keys.可以使用另一种授权方式访问资源(Shared Access Signature: 共享访问签名), 它的好处可 ...
- NFS(Network File System)服务配置和使用
Sun公司开发NFS (Network File System)之初就是为了在不同linux/Unix系统之间共享文件或者文件夹.可以在本地通过网络挂载远程主机的共享文件,和远程主机交互.NFS共享存 ...
- Centos7——NFS(Network File System)服务
NFS(Network File System)即网络文件系统,允许计算机之间通过网络共享资源:在NFS客户端即可NFS服务端所共享的目录挂载到本地,此时即可像读写本地目录一样读写远程计算机的目录与文 ...
- NFS(Network File System)即网络文件系统 (转)
第1章 NFS介绍 1.1 NFS服务内容的概述 □ RPC服务知识概念介绍说明,以及RPC服务存在价值(必须理解掌握) □ NFS服务工作原理讲解(必须理解掌握) □ NFS共享文件系统使用原理讲解 ...
- CentOS7.5搭建NFS(Network File System)
NFS(Network File System)即网络文件系统,是由Sun公司开发的一种通过网络方式共享文件系统的通用共享解决方案.可以将远程Linux系统上的文件共享资源挂载到本地主机(Linux客 ...
随机推荐
- ecshop刷新页面出现power by ecshop和链接的解决办法
当小伙伴在使用echop模板进行修改的时候,如果你删掉底部自带版权后,再调试程序刷新界面的时候,时不时就会冒出一个power by ecshop,而且是带有链接的,很不舒服,所以需要去掉,下面是最简单 ...
- Shell系列(39) - dirname
dirname作用 dirname实际工作中常常是跟$0一起使用 用于获取当前运行脚本的绝对路径 这个命令要放在shell脚本中使用,在命令行使用意义不大 [yutao@master01 ~]$ di ...
- Shell系列(4)- 历史命令
格式:history [选项] [历史命令保存文件] 选项: -c:清空历史命令 -w:把缓存中的历史命令写入到历史命令保存文件~ /.bash_history;用户的家目录下 例子: [root@l ...
- 执行:vim /etc/profile,提示:Command 'vim' not found, but can be installed with:
root@uni-virtual-machine:/# vim /etc/profile Command 'vim' not found, but can be installed with: apt ...
- php laravel v5.1 消息队列
* install https://laravel.com/docs/5.1#installationcomposer create-project laravel/laravel msgq &quo ...
- 真机连接电脑后,adb devices显示为空-解决方案
真机:小米6x,adb版本 真机连接电脑后,在cmd中输入adb devices,显示为空. 原因是真机没开启开发者选项和USB调试. 解决方案: 手机的[设置]-[我的设备]-[全部参数],多次点击 ...
- 将可执行程序设为linux服务启动
将可执行程序设为linux服务启动 如何将我们自己的程序设为linux的一个服务程序,并实现开机启动,需要经过如下三步: 1 把可执行程序放在一个linux系统可以找到的地方. ...
- 牛客练习赛89E-牛牛小数点【数论】
正题 题目链接:https://ac.nowcoder.com/acm/contest/11179/E 题目大意 定义\(f(x)\)表示\(\frac{1}{x}\)的混循环节长度(如果没有循环节就 ...
- logback日志入门超级详细讲解
基本信息 日志:就是能够准确无误地把系统在运行状态中所发生的情况描述出来(连接超时.用户操作.异常抛出等等): 日志框架:就是集成能够将日志信息统一规范后输出的工具包. Logback优势 Logba ...
- MySQL where子句的使用
MySQL WHERE 子句 我们知道从 MySQL 表中使用 SQL SELECT 语句来读取数据. 如需有条件地从表中选取数据,可将 WHERE 子句添加到 SELECT 语句中. 语法 以下是 ...