azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Close/get storage file handles via azure-cli (as Close-AzStorageFileHandle in PowerShell)

Open DmitrySandalov opened this issue 4 years ago • 3 comments

Is your feature request related to a problem? Please describe.

I receive the following error while trying to delete file

HTTP status code=409, Exception=The specified resource is marked for deletion by an SMB client. ErrorCode: DeletePending

The suggested solution is to close file handle lock via PowerShell: https://docs.microsoft.com/en-us/azure/storage/files/storage-troubleshoot-cannot-delete-files-azure-file-share#resolution

Describe the solution you'd like

It should be possible to perform Close-AzStorageFileHandle and Get-AzStorageFileHandle via azure-cli (not only PowerShell).

Describe alternatives you've considered

I've considered using portal.azure.com trying to delete file, but there is no such possibility as well to delete file or close/get file handles.

Additional context

DmitrySandalov avatar Apr 29 '21 12:04 DmitrySandalov

storage

yonzhan avatar Apr 29 '21 15:04 yonzhan

Any updates on it?

arthar360 avatar Jul 26 '23 09:07 arthar360

we need this in az-cli too. Thanks.

vipulp86 avatar Oct 20 '24 10:10 vipulp86

need this too.

TiloGit avatar Nov 26 '24 17:11 TiloGit

The list and close handle command have been supported in previous versions of CLI, feel free to give it a try. az storage share list-handle  https://learn.microsoft.com/en-us/cli/azure/storage/share?view=azure-cli-latest#az-storage-share-list-handle az storage share close-handle https://learn.microsoft.com/en-us/cli/azure/storage/share?view=azure-cli-latest#az-storage-share-close-handle

calvinhzy avatar Dec 12 '24 07:12 calvinhzy