How to copy a blob from NFSv3-enabled storage account
See original GitHub issueQuery/Question I try to copy a blob from a storage account that has NFSv3 enabled.
var source = "https://source.blob.core.windows.net/container1/file1.bin?sv=2020-10-02&st=2021-11-23T08%3A53%3A18Z&se=2021-12-01T08%3A53%3A00Z&sr=b&sp=r&sig=8Bt3I1guQe0VXjMjeOGOhPHv5tS2%2BH8gpx00bWhCnnE%3D";
var target = "https://target.blob.core.windows.net/container2/file2.bin?sv=2020-08-04&st=2021-11-23T08%3A54%3A13Z&se=2021-12-01T08%3A54%3A00Z&sr=c&sp=racwl&sig=WZULxHkbM6yo4s%2FIw%2FKH7UNpaf4AQVxnhxIUGq0nv88%3D";
var blobClient = new Azure.Storage.Blobs.BlobClient(new Uri(target));
var result = await blobClient.StartCopyFromUriAsync(new Uri(source));
The operation fails. Diagnostic logs show the following error:
StatusCode
409
OperationName
GetBlockList
StatusCode
409
StatusText
BlobOperationNotSupportedForBlobCreatedByNfsV3
I can download the blob without an issue:
var blobClient = new Azure.Storage.Blobs.BlobClient(new Uri(source));
await blobClient.DownloadToAsync(@"C:\Temp\MyFile");
Also, azcopy copy
works fine.
.\azcopy_windows_amd64_10.12.2\azcopy.exe" copy 'source' 'target'
How can I copy the blob without downloading and re-uploading?
Environment:
- Azure.Storage.Blobs 12.10.0
.NET SDK (reflecting any global.json):
Version: 5.0.403
Commit: bf9d168ac2
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19043
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.403\
Host (useful for support):
Version: 5.0.12
Commit: 7211aa01b3
It happens only for blobs created by NFS. I can copy blobs created using the storage SDK without an issue.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:16 (7 by maintainers)
Top Results From Across the Web
Network File System 3.0 support for Azure Blob Storage
This support provides Linux file system compatibility at object storage scale and prices and enables Linux clients to mount a container in Blob...
Read more >How To Copy Files From One Azure Storage Account ...
To copy an entire account data from one blob account with SAS to another blob account with SAS, you can use the following...
Read more >Using NFS with Azure Blob Storage
To do this, open Control Panel, navigate to Programs and Features, Click on Turn Windows features on or off, then find the Services...
Read more >NFS 3.0 support for Azure Blob Storage
In this video, we introduce Azure Blob NFS 3.0 support, the only public cloud object storage offering native file system compatibility.
Read more >409 API is not yet supported for NFSv3 enabled accounts
Issue mitigated by copy to another blob storage without NFSv3 enabled.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay I see what’s happening now. Obviously
Copy Blob
, e.g.StartCopyFromUri
is not supported by NFSv3 currently.The reason azcopy (and storage explorer since it also uses azcopy) works is because they’re using
Put Blob From Url
. In order to do copies with NFSv3. the API needs to change to using Put Blob From UrlThe SDK API to call this method is BlockBlobClient.SyncUploadFromUri. Please use this one instead.
@amnguye Thank you! It works.