MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.29k stars 21.47k forks source link

Mounting Azure file share dynamically and limit on number of file shares that can be mounted in a single pod #35904

Closed nit23uec closed 5 years ago

nit23uec commented 5 years ago

I want to know if it's supported by Azure to mount azure file share dynamically to a pod. Also, is there any limit of azure file share mount that can be done on a single pod? I want to mount 30k file shares in a single pod. Thanks.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

CHEEKATLAPRADEEP-MSFT-zz commented 5 years ago

@nit23uec Please help with the link of document on which above document feedback request is created.

In case your query in not related to document content, open a new forum thread in MSDN forum or Stack Overflow as it could be better place to get help on your scenario. These forum community members could provide their expert guidance on your scenario based on their experience. Thanks.

nit23uec commented 5 years ago

Documentation link: https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/aks/azure-files-volume.md

CHEEKATLAPRADEEP-MSFT-zz commented 5 years ago

@nit23uec Thanks for the question! We are investigating and will update you shortly.

jakaruna-MSFT commented 5 years ago

@nit23uec Do you want mount 30 thousand file shares to a pod?

Lokk at this stack overflow thread https://serverfault.com/questions/102588/maximum-numbers-for-file-system-mounts-in-linux and this link from that stack thread https://github.com/torvalds/linux/commit/d29216842a85

In linux the default max limit is 10000. You can increase it though.

I will check the limit (if there is any) for the number of file shared to be mounted on a container(or VM)

But mounting that many file shares to a container (or VM) doesnt seen like a good idea to me.

nit23uec commented 5 years ago

Thanks @jakaruna-MSFT . I think you missed one zero in default max limit as seems from the stack thread link. It seems to be 1,00,000. Are there any performance stats (like pod start up time) with number of volume mounts ? Is pod start up time also increased with increase in number of volume mounts? Also, please let me know if dynamic mount/unmount is allowed.

jakaruna-MSFT commented 5 years ago

@nit23uec Did you had a chance to go through the below document which speaks about dynamic file provisioning?

https://docs.microsoft.com/en-us/azure/aks/azure-files-dynamic-pv

nit23uec commented 5 years ago

@jakaruna-MSFT yes, I know about dynamic volume provisioning. But my query is different. I want to know if dynamic volume mounting is supported? Volume has already been provisioned here.

jakaruna-MSFT commented 5 years ago

@nit23uec The link which i shared above provisions the File share when we create pvc. Provided we have the storage class created(Once per cluster). Here file share is provisioned when we create a pvc and it will be deleted when we delete the PVC. That file share will be created in the node resource group.

We call this as dynamic provisioning of file shares as and when required. Provisioned volume will be mounted when we add that pvc in a deployment. We can do the same for Azure disks as well.

Please clarify the term "dynamic volume mounting" more. Please explain what you are mentioning as dynamic volume mounting. Do you want to mount a file share which is already provisioned? Then you can achieve that by adding this truncated volume yaml to your pod configuration.

  volumes:
  - name: azure
    azureFile:
      secretName: azure-secret
      shareName: aksshare
      readOnly: false

In the yaml, secretName , azure-secret contains the keys to connect to the file share. By this way we can connect to the existing file shares as volumes. Detailed documentation is here.

jakaruna-MSFT commented 5 years ago

Pod provisioning time will increase if we increase the number of volumes because, First all the volumes will be mounted to the underlying node and then the container starts. But i don't have any stats. I don't know about the maximum number of volumes which we can attach to the pod. I will check with the team and let you know.

jakaruna-MSFT commented 5 years ago

@nit23uec I got the information from the internal team. There is not limit for the number of azure files to be mounted on a VM. But mounting 30K file shares to a pod is not at a good practice. Pod will start only after all the volumes are mounted.

You can open a MSDN thread here (https://social.msdn.microsoft.com/Forums/en-US/home?forum=AzureContainerServices) with your use case. The community will suggest a better alternative to process the files in the file share.

jakaruna-MSFT commented 5 years ago

As this issue dont need any doc update, I am closing this issue. Please post question in the MSDN forums if that question is not related to document updates. I will close this out for now. If you need additional help please let me know and we can reopen and continue.