【问题标题】:Unable to mount file share on Linux VM无法在 Linux VM 上挂载文件共享
【发布时间】:2020-04-25 12:38:55
【问题描述】:

我有两个 Linux Azure VM (Redhat 7.4) 需要共享一个公共位置来处理文件。这些虚拟机位于澳大利亚东部。

我还有一个位于澳大利亚东部的存储帐户,并在该存储帐户中创建了一个文件共享。我生成了将虚拟机连接到文件共享的命令(通过单击文件共享,然后选择“连接”),但是当我在虚拟机中运行最终生成的命令时出现此错误:

sudo mount -t cifs //<storageaccount>/<fileshare> /mnt/<storageaccount>/<fileshare> -o vers=3.0,credentials=/etc/smbcredentials/<storageaccount>.cred,dir_mode=0777,file_mode=0777,serverino

...我收到这条消息:

mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

我在 VM 中运行了文件诊断工具脚本 (https://gallery.technet.microsoft.com/Troubleshooting-tool-for-02184089) 并收到此错误:

Error: Client is not Azure VM in the region as Storage account, mount will fail

我很困惑,因为它似乎是在说虚拟机和存储帐户位于不同的位置,而实际上它们不是。

提前感谢您的帮助。

【问题讨论】:

  • VM Ubuntu 是否支持 SMB 3.0? docs.microsoft.com/en-us/azure/storage/files/…
  • 不支持,但它支持 SMB 2.1。因此,我尝试关闭安全传输 (docs.microsoft.com/en-us/azure/storage/common/…),但收到相同的错误消息。
  • 我不认为地区是限制。该错误似乎您没有权限。您使用哪个用户以及如何连接到 VM?
  • 我在 Linux VM 中使用管理员用户。我通过终端会话到达那里。
  • 你能提供你所做的和你得到的错误的截图吗?

标签: azure azure-storage fileshare


【解决方案1】:

我可以用 Redhat 7.4 重现同样的问题。要解决此问题,您可以确保 Secure transfer required setting 在存储帐户上禁用。查看more info。或者验证您在命令中的每个参数中输入的值是否正确。您可以参考these steps 挂载 Azure 文件共享。

sudo mount -t cifs $smbPath $mntPath -o vers=3.0,username=$storageAccountName,password=$storageAccountKey,serverino

【讨论】:

    猜你喜欢
    • 2018-04-15
    • 2020-08-21
    • 1970-01-01
    • 2017-09-15
    • 2021-09-22
    • 1970-01-01
    • 2020-12-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多