@Sai Theja Adding more information to the above response!
Symptoms
Mount error 1219: Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.
Cause
There might be an open handle on a file by the previously mounted file share which needs to be closed.
Resolution
Usually resolves by itself with time.
A file handle is preventing a file/directory from being modified or deleted. You can use the Get-AzStorageFileHandle PowerShell cmdlet to view open handles. If all SMB clients have closed their open handles on a file/directory and the issue continues to occur, you can force close a file handle.
# PowerShell script
# Connect via PowerShell to Azure account
Connect-AzAccount
# Set Azure Subscription
Select-AzSubscription -subscriptionid "your subscription id"
# Create azure storage account context and list the open handles
$Context = New-AzStorageContext -StorageAccountName "storage account name" -StorageAccountKey "your storage account key" Get-AzStorageFileHandle -Context $Context -ShareName "file share name" -Recursive | Sort-Object ClientIP,OpenTime
# To close the open handles
$Context = New-AzStorageContext -StorageAccountName "storage account name" -StorageAccountKey "your storage account key" Close-AzStorageFileHandle -ShareName "mysharename" -CloseAll -Recursive (after this command we need to provide context again)
# Re-Check
Get-AzStorageFileHandle -Context $Context -ShareName "file share name" -Recursive | Sort-Object ClientIP,OpenTime
You can use Handle.exe on a Windows client to check if there are open handles on the client against the Azure File share.
Example: handle <StorageAccountName>.file.core.windows.net
Please let us know if you have any further queries. I’m happy to assist you further.
----------
Please do not forget to
and
wherever the information provided helps you, this can be beneficial to other community members.