Unlock all Azure file share locks
I have an Azure file share (SMB) with files. When I try to rename/delete a file I get an "The specified resource may be in use by an SMB client" error. There are multiple servers that connect to this SMB share and I have no way of telling which server or which process has the lock. How can I unlock this file or how can I release all file locks currently in use?
Solution 1:
I found a solution for this problem, however I do not think this is the 'normal' way to do so:
- edit the 'Firewalls and virtual networks' section of the storage account and set it to 'Selected Networks'
- do not assign any IP addresses/ranges or remove existing ones
- wait for 30 minutes
- set the 'Firewalls and virtual networks' section of the storage account and set it to the original setting or 'All Networks'
- The connection from the external server is disconnected and the lock is gone