You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Recommended and useful mountOptions settings on Azure Files
3
3
description: Learn about the useful and recommended mountOptions settings when you configure the storage class object on Azure Files.
4
-
ms.date: 04/25/2025
4
+
ms.date: 04/27/2025
5
5
ms.reviewer: chiragpa, nickoman, v-leedennis
6
6
ms.service: azure-kubernetes-service
7
7
#Customer intent: As an Azure Kubernetes user, I want to learn about mount option settings so that I can set up my Azure Files storage class object optimally on my Azure Kubernetes Service (AKS) cluster.
@@ -13,54 +13,56 @@ This article discusses recommended mount options when you configure the storage
13
13
14
14
## Recommended settings
15
15
16
-
The following `mountOptions` are recommended for SMB and NFS shares:
16
+
The following `mountOptions`settings are recommended for Server Message Block (SMB) and Network File System (NFS) shares:
- nosharesock # reduces probability of reconnect race
37
+
- actimeo=30 # reduces latency for metadata-heavy workload
38
+
- nobrl # disable sending byte range lock requests to the server and for applications which have challenges with posix locks
39
+
```
40
40
41
-
**NFS shares**
41
+
- **NFS shares**
42
42
43
-
```yaml
44
-
apiVersion: storage.k8s.io/v1
45
-
kind: StorageClass
46
-
metadata:
47
-
name: azurefile-csi-nfs
48
-
provisioner: file.csi.azure.com
49
-
parameters:
50
-
protocol: nfs
51
-
skuName: Premium_LRS # available values: Premium_LRS, Premium_ZRS
52
-
reclaimPolicy: Delete
53
-
volumeBindingMode: Immediate
54
-
allowVolumeExpansion: true
55
-
mountOptions:
56
-
- nconnect=4 # improves performance by enabling multiple connections to share
57
-
- noresvport # improves availability
58
-
- actimeo=30 # reduces latency for metadata-heavy workloads
59
-
```
43
+
```yaml
44
+
apiVersion: storage.k8s.io/v1
45
+
kind: StorageClass
46
+
metadata:
47
+
name: azurefile-csi-nfs
48
+
provisioner: file.csi.azure.com
49
+
parameters:
50
+
protocol: nfs
51
+
skuName: Premium_LRS # available values: Premium_LRS, Premium_ZRS
52
+
reclaimPolicy: Delete
53
+
volumeBindingMode: Immediate
54
+
allowVolumeExpansion: true
55
+
mountOptions:
56
+
- nconnect=4 # improves performance by enabling multiple connections to share
57
+
- noresvport # improves availability
58
+
- actimeo=30 # reduces latency for metadata-heavy workloads
59
+
```
60
60
61
61
> [!NOTE]
62
-
> The location to configure mount options (mountOptions) depends on whether you're provisioning dynamic or static persistent volumes. If you're [dynamically provisioning a volume](/azure/aks/azure-csi-files-storage-provision#dynamically-provision-a-volume) with a storage class, specify the mount options on the storage class object (kind: StorageClass). If you’re [statically provisioning a volume](/azure/aks/azure-csi-files-storage-provision#statically-provision-a-volume), specify the mount options on the PersistentVolume object (kind: PersistentVolume). If you’re [mounting the file share as an inline volume](/azure/aks/azure-csi-files-storage-provision#mount-file-share-as-an-inline-volume), specify the mount options on the Pod object (kind: Pod).
62
+
> The location for configuring mount options (`mountOptions`) depends on whether you provision dynamic or static persistent volumes. If you [dynamically provision a volume](/azure/aks/azure-csi-files-storage-provision#dynamically-provision-a-volume) with a storage class, specify the mount options on the storage class object (`kind: StorageClass`). If you [statically provision a volume](/azure/aks/azure-csi-files-storage-provision#statically-provision-a-volume), specify the mount options on the `PersistentVolume` object (`kind: PersistentVolume`). If you [mount the file share as an inline volume](/azure/aks/azure-csi-files-storage-provision#mount-file-share-as-an-inline-volume), specify the mount options on the `Pod` object (`kind: Pod`).
63
63
64
-
For best practices when using Azure Files, see [Provision Azure Files storage](/azure/aks/azure-csi-files-storage-provision#best-practices).
64
+
## More information
65
+
66
+
For Azure Files best practices, see [Provision Azure Files storage](/azure/aks/azure-csi-files-storage-provision#best-practices).
65
67
66
68
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]
0 commit comments