【问题标题】:Failed azure shared disk with Premium_LRSPremium_LRS 的 Azure 共享磁盘失败
【发布时间】:2020-03-24 20:57:35
【问题描述】:

我按照此链接页面在 Azure 中使用高级 LRS 创建磁盘共享,但结果失败,但仅适用于选择高级存储,因为我选择了 Statard LRS,文件共享创建正常:

https://docs.microsoft.com/en-us/azure/storage/files/storage-how-to-create-premium-fileshare

Create a storage account
az storage account create -n $AKS_PERS_STORAGE_ACCOUNT_NAME -g $AKS_PERS_RESOURCE_GROUP -l $AKS_PERS_LOCATION --sku "Premium_LRS"
Export the connection string as an environment variable, this is used when creating the Azure file share
#$AZURE_STORAGE_CONNECTION_STRING = az storage account show-connection-string -n $AKS_PERS_STORAGE_ACCOUNT_NAME -g $AKS_PERS_RESOURCE_GROUP -o tsv

Get storage account key
$STORAGE_KEY=$(az storage account keys list --resource-group $AKS_PERS_RESOURCE_GROUP --account-name $AKS_PERS_STORAGE_ACCOUNT_NAME --query "[0].value" -o tsv)
Create the file share
#az storage share create -n $AKS_PERS_SHARE_NAME --connection-string $AZURE_STORAGE_CONNECTION_STRING
az storage share create --account-name $AKS_PERS_STORAGE_ACCOUNT_NAME --account-key $STORAGE_KEY --name $AKS_PERS_SHARE_NAME

This latest shared create command is always failed with message:

HTTPSConnectionPool(host='$AKS_PERS_STORAGE_ACCOUNT_NAME.file.core.windows.net', port=443): Max retries exceeded with url: /$AKS_PERS_SHARE_NAME?restype=share (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x05A199F0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))

我也通过 Azure 门户调查创建存储帐户,选择高级 LRS,但是一旦创建,它不包含任何文件共享支持(仅 Blob),那么为什么会有关于它的官方链接页面?是否已弃用功能但未删除文档?我在该页面文档上打开了一个案例,但该案例已关闭,表明我首先在该社区中打开了。

【问题讨论】:

    标签: azure file share smb


    【解决方案1】:

    链接没有问题。问题是您在创建存储帐户时错过了参数--kind FileStorage。所以你需要做的是重新创建存储帐户再次添加后面的参数:

    az storage account create -n $AKS_PERS_STORAGE_ACCOUNT_NAME -g $AKS_PERS_RESOURCE_GROUP -l $AKS_PERS_LOCATION --sku "Premium_LRS" --kind FileStorage
    

    【讨论】:

    • 感谢您的关注!!我已经创建了 succesfull ,只有一个注释,正确的参数是: --kind ,而不是 -Kind (我将把这个问题报告给文档页面):az storage account create -n $AKS_PERS_STORAGE_ACCOUNT_NAME -g $AKS_PERS_RESOURCE_GROUP -l $AKS_PERS_LOCATION --sku "Premium_LRS" -Kind "FileStorage" az: error: unrecognized arguments: -Kind FileStorage Successful command with - -种类az storage share create --account-name $AKS_PERS_STORAGE_ACCOUNT_NAME --account-key $STORAGE_KEY --name $AKS_PERS_SHARE_NAME { "created": true }
    • @jmorcar 好吧,如果它适合你,请接受它作为答案。 :-)
    • @jmorcar 解决了你的问题,我的答案没有标记是什么原因?!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-01-15
    • 1970-01-01
    • 2016-04-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多