Mounting Azure FileShare is returning error code -122

Valéry Raulet 21 Reputation points
2020-09-23T15:50:07.423+00:00

Hi,

I have a fileshare that used to work fine but now when trying to mount it on Linux or Windows, I am getting an error:

on Linux:
mount error(122): Disk quota exceeded

Dmesg displays the following logs:
[XX] CIFS: Attempting to mount //mystorage.file.core.windows.net/myfileshare
[XX] CIFS VFS: cifs_mount failed w/return code = -122

on Windows 10:
New-PSDrive : The network resource type is not correct
At line:1 char:1

  • New-PSDrive -Name Z -PSProvider FileSystem -Root "\mystorage ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : InvalidOperation: (Z:PSDriveInfo) [New-PSDrive], Win32Exception
  • FullyQualifiedErrorId : CouldNotMapNetworkDrive,Microsoft.PowerShell.Commands.NewPSDriveCommand

I have no idea what this quota represents. I have a quota of 5TB on the fileshare and the usage is currently 12.06 GiB.

I have another file share in the same storage account and I am able to mount it without any issues.

Any help appreciated

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,420 questions
{count} votes

Accepted answer
  1. deherman-MSFT 38,021 Reputation points Microsoft Employee Moderator
    2020-09-23T16:35:18.93+00:00

    @Valéry Raulet

    This is normally caused by reaching the limit of 2,000 open file handles.

    To view open handles for a file share, directory or file, use the Get-AzStorageFileHandle PowerShell cmdlet.

    To close open handles for a file share, directory or file, use the Close-AzStorageFileHandle PowerShell cmdlet.

    Please refer to the documentation here for more information.

    ----------------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Valéry Raulet 21 Reputation points
    2020-09-24T09:41:11.97+00:00

    Hi Deherman,

    Thanks for the reply. That is was is causing the issue.

    However, when looking at the handles, I can see a new handle created every 2 minutes like clockwork but there is no path information:

    HandleId Path ClientIp ClientPort OpenTime LastReconnectTime FileId


    87540852726 10.0.2.159 34343 2020-09-23 21:18:47Z 0
    87540852741 10.0.2.159 34343 2020-09-23 21:20:41Z 0
    87540852758 10.0.2.159 34343 2020-09-23 21:22:41Z 0
    87540852774 10.0.2.159 34343 2020-09-23 21:24:42Z 0
    87540852788 10.0.2.159 34343 2020-09-23 21:26:41Z 0

    Any idea what would be causing this?
    The handles are created when running the web app inside a Web App on Azure. The same code running on an internal server is not creating all those file handles!

    Thanks,
    Valery


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.