【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客 ...
随机推荐
- Apache设置禁止访问网站目录
使用Apache作为Web服务器的时候,在当前目录下没有index.html|php等入口就会显示目录.让目录暴露在外面是非常危险的事. 找到Apache的配置文件 /etc/apache2/apac ...
- Java面向对象系列(11)- instanceof和类型转换
instanceof 先看引用类型的类和instanceof比较的类有没有父子关系,有则可以编译,IDEA不报错 new一个对象,对象new所在的类和instanceof比较的类有没有父子关系,有则为 ...
- php/awk 处理csv 使用 SplFileObject 操作文件
取第5列,去掉开头结尾的引号,匹配以http://, https://, ftp://开头的行 * awk awk -F"," 'str=gsub(/(^\"*)|(\& ...
- kibana操作
一些KIBANA的操作,记录下,免下次重复写 #创建索引名为kb_question的索引,并添加mapping,即各字段属性 PUT kb_question { "mappings" ...
- 牛客挑战赛48C-铬合金之声【Prufer序列】
正题 题目链接:https://ac.nowcoder.com/acm/contest/11161/C 题目大意 \(n\)个点加\(m\)条边使得不存在环,每种方案的权值是所有联通块的大小乘积. 求 ...
- CF444C-DZY Loves Colors【线段树,set】
正题 题目链接:https://www.luogu.com.cn/problem/CF444C 题目大意 \(n\)个物品第\(i\)个颜色为\(i\),权值为\(0\).要求支持\(m\)次操作 给 ...
- EXP-00091 正在导出有问题的统计信息-处理方法
打开oracle的SQL Puls中的命令如下: 1.conn /as sysdba 登陆 2.shutdown immediate; 关闭数据库 3.startup mount 4. AL ...
- Kettle学习笔记(四)— 总结
目录 Kettle学习笔记(一)- 环境部署及运行 Kettle学习笔记(二)- 基本操作 kettle学习笔记(三)- 定时任务的脚本执行 Kettle学习笔记(四)- 总结 Kettle中设置编码 ...
- 前端VUE基于gitlab的CI_CD
目录 CI 1.Gitlab的CI 1.1 GitLab-Runner 1.2 .gitlab-ci.yml 1.3 配置.gitlab-ci.yml 1.3.1 Pipeline概念 1.3.2 S ...
- 数据库MySQL主从-GTID
1.第一步在主服务器上/etc/my.cnf/下添加 log-bin=log-bin server-id=1 gtid_mode=ON enforce_gtid_consistency 2.第二步:重 ...