Bring Your Own Storage in Azure Web App

Published Jul 27 2021 04:56 PM 3,554 Views
Microsoft

This article will show you a general idea on how to Mount Azure Storage as a local share in a container app in App Service

and some key points when use it.

 

1. What is Bring your own storage(BYOS)?

BYOS means bring your own Azure Storage File share or Blob container into Azure Container Web App as network file share.

Currently it supports Azure Linux Web App and Windows Container Web App, but not support Azure Function Apps.

With BYOS, you do not need to rewrite code to use Storage SDK. Compared to Mount SMB Azure file share on Linux VM, it is much easier for using.

 

2. How to use it?

We can use it by simply clicking on Azure Portal:

Haoran_Li_0-1625552490041.jpeg

Or use Azure CLI:

az webapp config storage-account add --resource-group <group-name> --name <app-name> --custom-id <custom-id> --storage-type <AzureFiles/AzureBlob> --share-name <share-name> --account-name <storage-account-name> --access-key "<access-key>" --mount-path <mount-path-directory>

Haoran_Li_1-1625552490045.jpeg

Also, you can integrate it with ARM template:

https://github.com/Azure/app-service-linux-docs/blob/master/BringYourOwnStorage/BYOS_azureFiles.json

"resources": [
  {
      "type""Microsoft.Web/sites",
      "apiVersion""2018-11-01",
      "name""[parameters('webApp_Name')]",
      "location""[parameters('webApp_Location')]",
      "properties": {
          "siteConfig": {
              "azureStorageAccounts": {
                  "[parameters('BYOS_mountName')]": {
                      "mountPath""[parameters('BYOS_mountPath')]",
                      "accountName""[parameters('AzureStorage_AccountName')]",
                      "type""AzureFiles",
                      "shareName""[parameters('AzureStorage_ShareName')]",
                      "accessKey"""
                  }
              }
          }
      }
  }
]

 

3. Some key points:

  • When using AzureFiles, it mounted as CIFS with read/write permission, when using AzureBlob, it mounted as blobfuse with readonly permission.
  • Azure Storage in App Service lets you specify up to five mount points per app.
  • Azure Storage mounted to an app is not accessible through App Service FTP/FTPs endpoints.
  • Storage mounts are not backed up when you back up your app
  • It is not recommended to put the Storage Account in a different region from the Web App because this adds latency. Latency between App Service and Storage can cause crashes due to not being able to mount the Storage share. 
  • The share name for AzureFiles should come from Files shares in Storage Account

Haoran_Li_2-1625552490046.png

 

  • The share name for AzureBlob should come from Containers in Storage Account

Haoran_Li_3-1625552490047.png

  • If we mount the blob container as AzureFile in Advanced mode, the web app will crash.

After mounting, the web app will restart automatically, then we can check the mount info via ‘cat /etc/mtab’.

Haoran_Li_4-1625552490052.jpeg

 

  • For AzureFiles, it will be shown as cifs rw, which means read/write. For AzureBlob, it will be shown as fuse ro, which means readonly.

 

4. What is CIFS? And related issue.

Common Internet File System (CIFS) is a network filesystem protocol used for providing shared access to files and printers between machines on the network. A CIFS client application can read, write, edit and even remove files on the remote server. CIFS client can communicate with any server that is set up to receive a CIFS client request.

https://docs.microsoft.com/en-us/windows/win32/fileio/microsoft-smb-protocol-and-cifs-protocol-overv...

 

When use CIFS, local databases (eg SQLLite) or other components that rely on file handles/locks may get problem.

 

Haoran_Li_5-1625552490048.png

One workaround for the sqlite issue is changing the journal mode to wal by using below command:

sqlite3 <database-file> 'PRAGMA journal_mode=wal;'

There are advantages and disadvantages to using WAL instead of a rollback journal. Please read this reference carefully before using it: https://sqlite.org/wal.html 

 

Thanks for reading this post. I hope you liked it. Please feel free to write your comments and views about the same over here.

 

%3CLINGO-SUB%20id%3D%22lingo-sub-2517999%22%20slang%3D%22en-US%22%3EBring%20Your%20Own%20Storage%20in%20Azure%20Web%20App%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2517999%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20article%20will%20show%20you%20a%20general%20idea%20on%20how%20to%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Fconfigure-connect-to-azure-storage%3Ftabs%3Dportal%26amp%3Bpivots%3Dcontainer-linux%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EMount%20Azure%20Storage%20as%20a%20local%20share%20in%20a%20container%20app%20in%20App%20Service%3C%2FA%3E%3C%2FP%3E%0A%3CP%3Eand%20some%20key%20points%20when%20use%20it.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E1.%20What%20is%20Bring%20your%20own%20storage(BYOS)%3F%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EBYOS%20means%20bring%20your%20own%20Azure%20Storage%20File%20share%20or%20Blob%20container%20into%20Azure%20Container%20Web%20App%20as%20network%20file%20share.%3C%2FP%3E%0A%3CP%3ECurrently%20it%20supports%20Azure%20Linux%20Web%20App%20and%20Windows%20Container%20Web%20App%2C%20but%20not%20support%20Azure%20Function%20Apps.%3C%2FP%3E%0A%3CP%3EWith%20BYOS%2C%26nbsp%3Byou%20do%20not%20need%20to%20rewrite%20code%20to%20use%20Storage%20SDK.%20Compared%20to%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Ffiles%2Fstorage-how-to-use-files-linux%3Ftabs%3Dsmb311%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EMount%20SMB%20Azure%20file%20share%20on%20Linux%20VM%3C%2FA%3E%2C%20it%20is%20much%20easier%20for%20using.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E2.%20How%20to%20use%20it%3F%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EWe%20can%20use%20it%20by%20simply%20clicking%20on%20Azure%20Portal%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Haoran_Li_0-1625552490041.jpeg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F293623iF8A17CA91206F417%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Haoran_Li_0-1625552490041.jpeg%22%20alt%3D%22Haoran_Li_0-1625552490041.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EOr%20use%20Azure%20CLI%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Eaz%20webapp%20config%20storage-account%20add%20--resource-group%20%3CGROUP-NAME%3E%20--name%20%3CAPP-NAME%3E%20--custom-id%20%3CCUSTOM-ID%3E%20-%3C%2FCUSTOM-ID%3E%3C%2FAPP-NAME%3E%3C%2FGROUP-NAME%3E%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3Estorage-type%20%26lt%3B%3C%2FSPAN%3EAzureFiles%2FAzureBlob%26gt%3B%3CSPAN%3E%20--share-name%20%26lt%3B%3C%2FSPAN%3Eshare-name%3CSPAN%3E%26gt%3B%20--account-name%20%3CSTORAGE-ACCOUNT-NAME%3E%20--access-key%20%22%3CACCESS-KEY%3E%22%20--mount-path%20%3CMOUNT-PATH-DIRECTORY%3E%3C%2FMOUNT-PATH-DIRECTORY%3E%3C%2FACCESS-KEY%3E%3C%2FSTORAGE-ACCOUNT-NAME%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Haoran_Li_1-1625552490045.jpeg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F293624i3006CCB55C223E1E%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Haoran_Li_1-1625552490045.jpeg%22%20alt%3D%22Haoran_Li_1-1625552490045.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAlso%2C%20you%20can%20integrate%20it%20with%20ARM%20template%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fapp-service-linux-docs%2Fblob%2Fmaster%2FBringYourOwnStorage%2FBYOS_azureFiles.json%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FAzure%2Fapp-service-linux-docs%2Fblob%2Fmaster%2FBringYourOwnStorage%2FBYOS_azureFiles.json%3C%2FA%3E%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%3E%3CSPAN%3E%22resources%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%5B%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%7B%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22type%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22Microsoft.Web%2Fsites%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22apiVersion%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%222018-11-01%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22name%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22%5Bparameters('webApp_Name')%5D%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22location%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22%5Bparameters('webApp_Location')%5D%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22properties%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%7B%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22siteConfig%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%7B%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22azureStorageAccounts%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%7B%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22%5Bparameters('BYOS_mountName')%5D%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%7B%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22mountPath%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22%5Bparameters('BYOS_mountPath')%5D%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22accountName%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22%5Bparameters('AzureStorage_AccountName')%5D%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22type%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22AzureFiles%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22shareName%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22%5Bparameters('AzureStorage_ShareName')%5D%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22accessKey%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22%22%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%7D%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%7D%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%7D%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%7D%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%7D%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%5D%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E3.%20Some%20key%20points%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EWhen%20using%20AzureFiles%2C%20it%20mounted%20as%20CIFS%20with%20%3CSTRONG%3Eread%2Fwrite%3C%2FSTRONG%3E%20permission%2C%20when%20using%20AzureBlob%2C%20it%20mounted%20as%20blobfuse%20with%20%3CSTRONG%3Ereadonly%3C%2FSTRONG%3E%20permission.%3C%2FLI%3E%0A%3CLI%3EAzure%20Storage%20in%20App%20Service%20lets%20you%20specify%26nbsp%3B%3CSTRONG%3Eup%20to%20five%3C%2FSTRONG%3E%26nbsp%3Bmount%20points%20per%20app.%3C%2FLI%3E%0A%3CLI%3EAzure%20Storage%20mounted%20to%20an%20app%20is%26nbsp%3B%3CSTRONG%3Enot%3C%2FSTRONG%3E%26nbsp%3Baccessible%20through%20App%20Service%20FTP%2FFTPs%20endpoints.%3C%2FLI%3E%0A%3CLI%3EStorage%20mounts%20are%20not%20backed%20up%20when%20you%20back%20up%20your%20app%3C%2FLI%3E%0A%3CLI%3EIt%20is%20not%20recommended%20to%20put%20the%20Storage%20Account%20in%20a%20different%20region%20from%20the%20Web%20App%20because%20this%20adds%20latency.%20Latency%20between%20App%20Service%20and%20Storage%20can%20cause%20crashes%20due%20to%20not%20being%20able%20to%20mount%20the%20Storage%20share.%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3EThe%20share%20name%20for%20AzureFiles%20should%20come%20from%20Files%20shares%20in%20Storage%20Account%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Haoran_Li_2-1625552490046.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F293622iF4A12E387C0EF1D2%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Haoran_Li_2-1625552490046.png%22%20alt%3D%22Haoran_Li_2-1625552490046.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EThe%20share%20name%20for%20AzureBlob%20should%20come%20from%20Containers%20in%20Storage%20Account%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Haoran_Li_3-1625552490047.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F293625i9EEEDA4A63EDE285%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Haoran_Li_3-1625552490047.png%22%20alt%3D%22Haoran_Li_3-1625552490047.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EIf%20we%20mount%20the%20blob%20container%20as%20AzureFile%20in%20Advanced%20mode%2C%20the%20web%20app%20will%20crash.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EAfter%20mounting%2C%20the%20web%20app%20will%20restart%20automatically%2C%20then%20we%20can%20check%20the%20mount%20info%20via%20%E2%80%98%3CSTRONG%3Ecat%20%2Fetc%2Fmtab%3C%2FSTRONG%3E%E2%80%99.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Haoran_Li_4-1625552490052.jpeg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F293627i0BA1C9EA21FDF444%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Haoran_Li_4-1625552490052.jpeg%22%20alt%3D%22Haoran_Li_4-1625552490052.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EFor%20AzureFiles%2C%20it%20will%20be%20shown%20as%20cifs%20rw%2C%20which%20means%20read%2Fwrite.%20For%20AzureBlob%2C%20it%20will%20be%20shown%20as%20fuse%20ro%2C%20which%20means%20readonly.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E4.%20What%20is%20CIFS%3F%20And%20related%20issue.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ECommon%20Internet%20File%20System%20(CIFS)%20is%20a%20network%20filesystem%20protocol%20used%20for%20providing%20shared%20access%20to%20files%20and%20printers%20between%20machines%20on%20the%20network.%20A%20CIFS%20client%20application%20can%20read%2C%20write%2C%20edit%20and%20even%20remove%20files%20on%20the%20remote%20server.%20CIFS%20client%20can%20communicate%20with%20any%20server%20that%20is%20set%20up%20to%20receive%20a%20CIFS%20client%20request.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fwin32%2Ffileio%2Fmicrosoft-smb-protocol-and-cifs-protocol-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fwin32%2Ffileio%2Fmicrosoft-smb-protocol-and-cifs-protocol-overview%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20use%20CIFS%2C%20local%20databases%20(eg%20SQLLite)%20or%20other%20components%20that%20rely%20on%20file%20handles%2Flocks%20may%20get%20problem.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Haoran_Li_5-1625552490048.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F293626iEFB8E4062FC39BFD%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Haoran_Li_5-1625552490048.png%22%20alt%3D%22Haoran_Li_5-1625552490048.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EOne%20workaround%20for%20the%20sqlite%20issue%20is%20changing%20the%20journal%20mode%20to%20wal%20by%20using%20below%20command%3A%3C%2FP%3E%0A%3CP%3Esqlite3%20%3CDATABASE-FILE%3E%20'PRAGMA%20journal_mode%3Dwal%3B'%3C%2FDATABASE-FILE%3E%3C%2FP%3E%0A%3CP%3EThere%20are%20advantages%20and%20disadvantages%20to%20using%20WAL%20instead%20of%20a%20rollback%20journal.%20Please%20read%20this%20reference%20carefully%20before%20using%20it%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fsqlite.org%2Fwal.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fsqlite.org%2Fwal.html%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20reading%20this%20post.%20I%20hope%20you%20liked%20it.%20Please%20feel%20free%20to%20write%20your%20comments%20and%20views%20about%20the%20same%20over%20here.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2517999%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20App%20Service%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Jul 27 2021 02:36 AM
Updated by: