疑難解答 Azure 檔案儲存體

本文列出與 Azure 檔案儲存體 相關的常見問題。 它也提供這些問題的可能原因和解決方法。

注意事項

本文是否有幫助? 您的輸入對我們很重要。 請使用此頁面上的 [ 意見反應 ] 按鈕,讓我們知道本文如何為您運作,或我們如何加以改善。

如果您找不到問題的解答,您可以透過下列通道與我們連絡, (呈報順序) :

適用於

檔案共享類型 SMB Nfs
GPv2) 、LRS/ZRS (標準檔案共用
GPv2) 、GRS/GZRS (標準檔案共用
FileStorage) 、LRS/ZRS (進階檔案共用

一般疑難解答第一個步驟

如果您遇到 Azure 檔案儲存體 的問題,請從下列步驟開始。

檢查 Azure 檔案共用的 DNS 解析和連線能力

Azure 檔案儲存體 客戶最常見的問題是掛接或存取 Azure 檔案共享失敗,因為網路設定不正確。 這會發生在 Azure 檔案儲存體 支援的三個檔案共享通訊協定中的任何一個:SMB、NFS 和 FileREST。

下表提供SMB、NFS和 FileREST 需求,適用於其可使用的記憶體帳戶網路端點,以及可存取該端點的埠。 若要深入瞭解網路端點,請參閱 Azure 檔案儲存體 網路考慮

通訊協定名稱 不受限制的公用端點 受限制的公用端點 私人端點 必要的埠
SMB TCP 445
Nfs TCP 2049
FileREST TCP 443 (HTTPS) 、TCP 80 (HTTP)

若要成功掛接或存取檔案共用,您的客戶端必須:

  • 能夠解析記憶體帳戶的完整網域名稱 (例如 mystorageaccount.file.core.windows.net) 記憶體帳戶所需網路端點的正確IP位址。

  • 在所需通訊協議的正確埠上,建立正確解析IP位址的成功TCP連線。

注意事項

掛接/存取共用時,您必須使用記憶體帳戶的完整域名 (FQDN) 。 下列命令可讓您查看記憶體帳戶網路端點的目前IP位址,但您不應該將這些IP位址硬式編碼為任何腳本、防火牆設定或其他位置。 IP 位址不保證會維持不變,而且隨時可能會變更。

檢查 DNS 名稱解析

下列命令可讓您測試記憶體帳戶的 DNS 名稱解析。

# If you have changed the DNS configuration in your environment, it may be helpful to clear
# the DNS client cache to ensure you're getting the updated DNS name resolution.
Clear-DnsClientCache

# Replace this value with the fully qualified domain name for your storage account. 
# Different storage accounts, especially in different Azure environments, 
# may have different suffixes than file.core.windows.net, so be sure to use the correct
# suffix for your storage account.
$hostName = "mystorageaccount.file.core.windows.net"

# Do the name resolution. Piping to Format-List is optional.
Resolve-DnsName -Name $hostName | Format-List

傳回的 Resolve-DnsName 輸出可能會根據您的環境和所需的網路設定而有所不同。 例如,如果您嘗試存取未設定任何私人端點之記憶體帳戶的公用端點,您會看到下列輸出。 在此輸出中, x.x.x.x 是 Azure 記憶體平臺叢集 file.phx10prdstf01a.store.core.windows.net 的 IP 位址,可為您的記憶體帳戶提供服務。

Name       : mystorageaccount.file.core.windows.net
Type       : CNAME
TTL        : 27
Section    : Answer
NameHost   : file.phx10prdstf01a.store.core.windows.net

Name       : file.phx10prdstf01a.store.core.windows.net
QueryType  : A
TTL        : 60
Section    : Answer
IP4Address : x.x.x.x

如果您嘗試存取已設定一或多個私人端點之記憶體帳戶的公用端點,您會看到下列輸出。 輸出包含的額外 CNAME 記錄 mystorageaccount.privatelink.file.core.windows.net,位於記憶體帳戶的一般 FQDN 和記憶體叢集的名稱之間。 這可在使用者從因特網存取時,啟用公用端點 IP 位址的名稱解析,以及當使用者從 Azure 虛擬網路內部存取時,解析為私人端點的 IP 位址, (或對等互連網路) 。

Name       : mystorageaccount.file.core.windows.net
Type       : CNAME
TTL        : 60
Section    : Answer
NameHost   : mystorageaccount.privatelink.file.core.windows.net

Name       : mystorageaccount.privatelink.file.core.windows.net
Type       : CNAME
TTL        : 60
Section    : Answer
NameHost   : file.phx10prdstf01a.store.core.windows.net


Name       : file.phx10prdstf01a.store.core.windows.net
QueryType  : A
TTL        : 60
Section    : Answer
IP4Address : x.x.x.x

如果您要解析為私人端點,您通常會預期其 A 記錄 mystorageaccount.privatelink.file.core.windows.net 會對應至私人端點的 IP 位址:

Name                   : mystorageaccount.file.core.windows.net
Type                   : CNAME
TTL                    : 53
Section                : Answer
NameHost               : mystorageaccount.privatelink.file.core.windows.net


Name                   : mystorageaccount.privatelink.file.core.windows.net
QueryType              : A
TTL                    : 10
Section                : Answer
IP4Address             : 10.0.0.5

檢查 TCP 連線能力

下列命令可讓您測試用戶端對已解析IP位址/埠號碼進行TCP連線的能力。

# Replace this value with the fully qualified domain name for your storage account. 
# Different storage accounts, especially in different Azure environments, 
# may have different suffixes than file.core.windows.net, so be sure to use the correct
# suffix for your storage account.
$hostName = "mystorageaccount.file.core.windows.net"

# Do the TCP connection test - see the above protocol/port table to figure out which
# port to use for your test. This test uses port 445, the port used by SMB.
Test-NetConnection -ComputerName $hostName -Port 445

如果成功建立連線,您應該會看到下列結果:

ComputerName     : mystorageAccount.file.core.windows.net
RemoteAddress    : x.x.x.x
RemotePort       : 445
InterfaceAlias   : Ethernet
SourceAddress    : y.y.y.y
TcpTestSucceeded : True

執行診斷

Windows 客戶端和 Linux 客戶端都可以使用 AzFileDiagnostics 來確保客戶端環境具有正確的必要條件。 AzFileDiagnostics 自動化徵兆偵測,並協助設定環境以取得最佳效能。

常見疑難解答區域

如需詳細資訊,請選擇您想要進行疑難解答的主旨區域。

某些問題可能與連線能力和效能 (多個主旨領域相關,例如) 。

需要協助?

如果您仍然需要協助,請 連絡支持人員 以快速解決您的問題。

另請參閱

與我們連絡,以取得說明

如果您有問題或需要相關協助,請建立支援要求,或詢問 Azure community 支援。 您也可以將產品意見反應提交給 Azure 意應見反社群