我按照以下链接在Azure中使用Premium LRS创建磁盘共享,结果失败,但仅适用于选择的Premium存储,因为我选择了Statard LRS文件共享已创建ok:
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门户调查了创建存储帐户,选择了Premium LRS,但一旦创建,它就不包括任何对文件共享的支持(只支持Blob),所以为什么会有一个关于它的官方链接页面?某个功能是否已被弃用,但未删除文档?我在那个文档页面上打开了一个案例,但它被关闭了,这表明我首先在这个社区打开了。
发布于 2020-03-25 15:00:54
链接没有任何问题。问题是您在创建存储帐号时遗漏了参数--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 FileStoragehttps://stackoverflow.com/questions/60839204
复制相似问题