无法在 Linux VM 上装载文件共享

Unable to mount file share on Linux VM

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

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

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 和存储帐户位于不同的位置,而实际上它们不在。

在此先感谢您的帮助。

我可以用 Redhat 7.4 重现同样的问题。要解决此问题,您可以确保 Secure transfer required setting is disabled on the storage account. View more info. Or verify that you input the correct value in each of the parameters in the commands. You could refer to these steps 装载 Azure 文件共享。

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