Using mountOptions settings in Azure Files storage
This article discusses useful and recommended mount options when configuring storage class objects on Azure Files. These mount options help provision storage on a Kubernetes cluster.
Recommended settings
It is recommended to use the following field settings for Kubernetes version and file and directory mode (permissions) mountOptions
:
Setting | Recommended value |
---|---|
Kubernetes version | 1.12.2 or higher |
file_mode and dir_mode value |
0777 |
The following configuration files are examples of how to set file and directory permissions:
YAML
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: azurefile
provisioner: kubernetes.io/azure-file
mountOptions:
- dir_mode=0777
- file_mode=0777
- uid=1000
- gid=1000
- mfsymlinks
- nobrl
- cache=none
parameters:
skuName: Standard_LRS
Other useful settings
You may also find the following mountOptions
settings useful:
Setting | illustrate |
---|---|
mfsymlinks |
This setting forces Azure Files to mount (Common Internet File System, or cifs) to support symbolic links. |
nobrl |
This setting prevents byte range lock requests from being sent to the server. This is necessary for some applications that use cifs-style forced byte range locking. Most cifs servers do not yet support requesting advisory byte range locks. If an application does not use this setting and breaks a cifs-style forced byte range lock, error messages may occur, Error: SQLITE_BUSY: database is locked for example. |