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
Copy file name to clipboardExpand all lines: articles/storage/files/storage-how-to-use-files-linux.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,22 +29,22 @@ ms.subservice: files
29
29
30
30
SMB 3.0 encryption support was introduced in Linux kernel version 4.11 and has been backported to older kernel versions for popular Linux distributions. At the time of this document's publication, the following distributions from the Azure gallery support mounting option specified in the table headers.
31
31
32
-
***Minimum recommended versions with corresponding mount capabilities (SMB version 2.1 vs SMB version 3.0)**
33
-
34
-
|| SMB 2.1 <br>(Mounts on VMs within same Azure region) | SMB 3.0 <br>(Mounts from on premises and cross-region) |
35
-
| --- | :---: | :---: |
36
-
| Ubuntu Server | 14.04+ | 16.04+ |
37
-
| RHEL | 7+ | 7.5+ |
38
-
| CentOS | 7+ | 7.5+ |
39
-
| Debian | 8+ ||
40
-
| openSUSE | 13.2+ | 42.3+ |
41
-
| SUSE Linux Enterprise Server | 12 | 12 SP3+ |
42
-
43
-
If your Linux distribution is not listed here, you can check to see the Linux kernel version with the following command:
44
-
45
-
```bash
46
-
uname -r
47
-
```
32
+
### Minimum recommended versions with corresponding mount capabilities (SMB version 2.1 vs SMB version 3.0)
33
+
34
+
|| SMB 2.1 <br>(Mounts on VMs within same Azure region) | SMB 3.0 <br>(Mounts from on premises and cross-region) |
35
+
| --- | :---: | :---: |
36
+
| Ubuntu Server | 14.04+ | 16.04+ |
37
+
| RHEL | 7+ | 7.5+ |
38
+
| CentOS | 7+ | 7.5+ |
39
+
| Debian | 8+ ||
40
+
| openSUSE | 13.2+ | 42.3+ |
41
+
| SUSE Linux Enterprise Server | 12 | 12 SP3+ |
42
+
43
+
If your Linux distribution is not listed here, you can check to see the Linux kernel version with the following command:
44
+
45
+
```bash
46
+
uname -r
47
+
```
48
48
49
49
* <aid="install-cifs-utils"></a>**The cifs-utils package is installed.**
50
50
The cifs-utils package can be installed using the package manager on the Linux distribution of your choice.
Copy file name to clipboardExpand all lines: articles/storage/files/storage-troubleshoot-linux-file-connection-problems.md
+84-70Lines changed: 84 additions & 70 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,39 @@ This article lists common problems that are related to Azure Files when you conn
16
16
17
17
In addition to the troubleshooting steps in this article, you can use [AzFileDiagnostics](https://gallery.technet.microsoft.com/Troubleshooting-tool-for-02184089) to ensure that the Linux client has correct prerequisites. AzFileDiagnostics automates the detection of most of the symptoms mentioned in this article. It helps set up your environment to get optimal performance. You can also find this information in the [Azure Files shares troubleshooter](https://support.microsoft.com/help/4022301/troubleshooter-for-azure-files-shares). The troubleshooter provides steps to help you with problems connecting, mapping, and mounting Azure Files shares.
18
18
19
+
## Cannot connect to or mount an Azure file share
20
+
21
+
### Cause
22
+
23
+
Common causes for this problem are:
24
+
25
+
- You're using an incompatible Linux distribution client. We recommend that you use the following Linux distributions to connect to an Azure file share:
26
+
27
+
|| SMB 2.1 <br>(Mounts on VMs within the same Azure region) | SMB 3.0 <br>(Mounts from on-premises and cross-region) |
28
+
| --- | :---: | :---: |
29
+
| Ubuntu Server | 14.04+ | 16.04+ |
30
+
| RHEL | 7+ | 7.5+ |
31
+
| CentOS | 7+ | 7.5+ |
32
+
| Debian | 8+ ||
33
+
| openSUSE | 13.2+ | 42.3+ |
34
+
| SUSE Linux Enterprise Server | 12 | 12 SP3+ |
35
+
36
+
- CIFS utilities (cfs-utils) are not installed on the client.
37
+
- The minimum SMB/CIFS version, 2.1, is not installed on the client.
38
+
- SMB 3.0 encryption is not supported on the client. The preceding table provides a list of Linux distributions that support mounting from on-premises and cross-region using encryption. Other distributions require kernel 4.11 and later versions.
39
+
- You're trying to connect to a storage account over TCP port 445, which is not supported.
40
+
- You're trying to connect to an Azure file share from an Azure VM, and the VM is not in the same region as the storage account.
41
+
- If the [Secure transfer required](https://docs.microsoft.com/azure/storage/common/storage-require-secure-transfer) setting is enabled on the storage account, Azure Files will allow only connections that use SMB 3.0 with encryption.
42
+
43
+
### Solution
44
+
45
+
To resolve the problem, use the [troubleshooting tool for Azure Files mounting errors on Linux](https://gallery.technet.microsoft.com/Troubleshooting-tool-for-02184089). This tool:
46
+
47
+
* Helps you to validate the client running environment.
48
+
* Detects the incompatible client configuration that would cause access failure for Azure Files.
49
+
* Gives prescriptive guidance on self-fixing.
50
+
* Collects the diagnostics traces.
51
+
19
52
<aid="mounterror13"></a>
20
53
## "Mount error(13): Permission denied" when you mount an Azure file share
21
54
@@ -49,9 +82,11 @@ In Linux, you receive an error message that resembles the following:
49
82
50
83
You have reached the upper limit of concurrent open handles that are allowed for a file.
51
84
85
+
There is a quota of 2,000 open handles on a single file. When you have 2,000 open handles, an error message is displayed that says the quota is reached.
86
+
52
87
### Solution
53
88
54
-
Reduce the number of concurrent open handles by closing some handles, and then retry the operation. For more information, see [Microsoft Azure Storage performance and scalability checklist](../common/storage-performance-checklist.md?toc=%2fazure%2fstorage%2ffiles%2ftoc.json).
89
+
Reduce the number of concurrent open handles by closing some handles, and then retry the operation.
55
90
56
91
<aid="slowfilecopying"></a>
57
92
## Slow file copying to and from Azure Files in Linux
@@ -60,36 +95,12 @@ Reduce the number of concurrent open handles by closing some handles, and then r
60
95
- If you know the final size of a file that you're extending by using writes, and your software doesn't experience compatibility problems when an unwritten tail on the file contains zeros, then set the file size in advance instead of making every write an extending write.
61
96
- Use the right copy method:
62
97
- Use [AzCopy](../common/storage-use-azcopy.md?toc=%2fazure%2fstorage%2ffiles%2ftoc.json) for any transfer between two file shares.
63
-
- Use [Robocopy](https://blogs.msdn.microsoft.com/granth/2009/12/07/multi-threaded-robocopy-for-faster-copies/) between file shares on an on-premises computer.
64
-
65
-
<aid="error112"></a>
66
-
## "Mount error(112): Host is down" because of a reconnection time-out
67
-
68
-
A "112" mount error occurs on the Linux client when the client has been idle for a long time. After an extended idle time, the client disconnects and the connection times out.
69
-
70
-
### Cause
71
-
72
-
The connection can be idle for the following reasons:
73
-
74
-
- Network communication failures that prevent re-establishing a TCP connection to the server when the default "soft" mount option is used
75
-
- Recent reconnection fixes that are not present in older kernels
76
-
77
-
### Solution
78
-
79
-
This reconnection problem in the Linux kernel is now fixed as part of the following changes:
80
-
81
-
-[Fix reconnect to not defer smb3 session reconnect long after socket reconnect](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/fs/cifs?id=4fcd1813e6404dd4420c7d12fb483f9320f0bf93)
82
-
-[Call echo service immediately after socket reconnect](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b8c600120fc87d53642476f48c8055b38d6e14c7)
83
-
-[CIFS: Fix a possible memory corruption during reconnect](https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=53e0e11efe9289535b060a51d4cf37c25e0d0f2b)
84
-
-[CIFS: Fix a possible double locking of mutex during reconnect (for kernel v4.9 and later)](https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=96a988ffeb90dba33a71c3826086fe67c897a183)
85
-
86
-
However, these changes might not be ported yet to all the Linux distributions. This fix and other reconnection fixes are in the following popular Linux kernels: 4.4.40, 4.8.16, and 4.9.1. You can get this fix by upgrading to one of these recommended kernel versions.
87
-
88
-
### Workaround
89
-
90
-
You can work around this problem by specifying a hard mount. A hard mount forces the client to wait until a connection is established or until it's explicitly interrupted. You can use it to prevent errors because of network time-outs. However, this workaround might cause indefinite waits. Be prepared to stop connections as necessary.
91
-
92
-
If you can't upgrade to the latest kernel versions, you can work around this problem by keeping a file in the Azure file share that you write to every 30 seconds or less. This must be a write operation, such as rewriting the created or modified date on the file. Otherwise, you might get cached results, and your operation might not trigger the reconnection.
98
+
- Using cp with parallel could improve copy speed, the number of threads depends on your use case and workload. This example uses six: `find * -type f | parallel --will-cite -j 6 cp {} /mntpremium/ &`.
-[Fpart](https://github.com/martymac/fpart) - Sorts files and packs them into partitions.
102
+
-[Fpsync](https://github.com/martymac/fpart/blob/master/tools/fpsync) - Uses Fpart and a copy tool to spawn multiple instances to migrate data from src_dir to dst_url.
103
+
-[Multi](https://github.com/pkolano/mutil) - Multi-threaded cp and md5sum based on GNU coreutils.
93
104
94
105
<aid="error115"></a>
95
106
## "Mount error(115): Operation now in progress" when you mount Azure Files by using SMB 3.0
@@ -100,7 +111,7 @@ Some Linux distributions don't yet support encryption features in SMB 3.0. Users
100
111
101
112
### Solution
102
113
103
-
The encryption feature for SMB 3.0 for Linux was introduced in the 4.11 kernel. This feature enables mounting of an Azure file share from on-premises or from a different Azure region. At the time of publishing, this functionality has been backported to Ubuntu 17.04 and Ubuntu 16.10.
114
+
The encryption feature for SMB 3.0 for Linux was introduced in the 4.11 kernel. This feature enables mounting of an Azure file share from on-premises or from a different Azure region. This functionality is included in the Linux distributions listed in [Minimum recommended versions with corresponding mount capabilities (SMB version 2.1 vs SMB version 3.0)](storage-how-to-use-files-linux.md#minimum-recommended-versions-with-corresponding-mount-capabilities-smb-version-21-vs-smb-version-30). Other distributions require kernel 4.11 and later versions.
104
115
105
116
If your Linux SMB client doesn't support encryption, mount Azure Files by using SMB 2.1 from an Azure Linux VM that's in the same datacenter as the file share. Verify that the [Secure transfer required](https://docs.microsoft.com/azure/storage/common/storage-require-secure-transfer) setting is disabled on the storage account.
106
117
@@ -127,13 +138,13 @@ Verify virtual network and firewall rules are configured properly on the storage
127
138
<aid="slowperformance"></a>
128
139
## Slow performance on an Azure file share mounted on a Linux VM
129
140
130
-
### Cause
141
+
### Cause 1: Caching
131
142
132
-
One possible cause of slow performance is disabled caching.
143
+
One possible cause of slow performance is disabled caching. Caching can be useful if you are accessing a file repeatedly, otherwise, it can be an overhead. Check if you are using the cache before disabling it.
133
144
134
-
### Solution
145
+
### Solution for cause 1
135
146
136
-
To check whether caching is disabled, look for the **cache=** entry.
147
+
To check whether caching is disabled, look for the **cache=** entry.
137
148
138
149
**Cache=none** indicates that caching is disabled. Remount the share by using the default mount command or by explicitly adding the **cache=strict** option to the mount command to ensure that default caching or "strict" caching mode is enabled.
139
150
@@ -149,6 +160,14 @@ You can also check whether the correct options are being used by running the **
149
160
150
161
If the **cache=strict** or **serverino** option is not present, unmount and mount Azure Files again by running the mount command from the [documentation](../storage-how-to-use-files-linux.md). Then, recheck that the **/etc/fstab** entry has the correct options.
151
162
163
+
### Cause 2: Throttling
164
+
165
+
It is possible you are experiencing throttling and your requests are being sent to a queue. You can verify this by leveraging [Azure Storage metrics in Azure Monitor](../common/storage-metrics-in-azure-monitor.md).
166
+
167
+
### Solution for cause 2
168
+
169
+
Ensure your app is within the [Azure Files scale targets](storage-files-scale-targets.md#azure-files-scale-targets).
170
+
152
171
<aid="timestampslost"></a>
153
172
## Time stamps were lost in copying files from Windows to Linux
154
173
@@ -167,40 +186,6 @@ Use the storage account user for copying the files:
167
186
-`Su [storage account name]`
168
187
-`Cp -p filename.txt /share`
169
188
170
-
## Cannot connect to or mount an Azure file share
171
-
172
-
### Cause
173
-
174
-
Common causes for this problem are:
175
-
176
-
177
-
- You're using an incompatible Linux distribution client. We recommend that you use the following Linux distributions to connect to an Azure file share:
178
-
179
-
|| SMB 2.1 <br>(Mounts on VMs within the same Azure region) | SMB 3.0 <br>(Mounts from on-premises and cross-region) |
180
-
| --- | :---: | :---: |
181
-
| Ubuntu Server | 14.04+ | 16.04+ |
182
-
| RHEL | 7+ | 7.5+ |
183
-
| CentOS | 7+ | 7.5+ |
184
-
| Debian | 8+ ||
185
-
| openSUSE | 13.2+ | 42.3+ |
186
-
| SUSE Linux Enterprise Server | 12 | 12 SP3+ |
187
-
188
-
- CIFS utilities (cfs-utils) are not installed on the client.
189
-
- The minimum SMB/CIFS version, 2.1, is not installed on the client.
190
-
- SMB 3.0 encryption is not supported on the client. SMB 3.0 encryption is available in Ubuntu 16.4 and later versions, along with SUSE 12.3 and later versions. Other distributions require kernel 4.11 and later versions.
191
-
- You're trying to connect to a storage account over TCP port 445, which is not supported.
192
-
- You're trying to connect to an Azure file share from an Azure VM, and the VM is not in the same region as the storage account.
193
-
- If the [Secure transfer required](https://docs.microsoft.com/azure/storage/common/storage-require-secure-transfer) setting is enabled on the storage account, Azure Files will allow only connections that use SMB 3.0 with encryption.
194
-
195
-
### Solution
196
-
197
-
To resolve the problem, use the [troubleshooting tool for Azure Files mounting errors on Linux](https://gallery.technet.microsoft.com/Troubleshooting-tool-for-02184089). This tool:
198
-
199
-
* Helps you to validate the client running environment.
200
-
* Detects the incompatible client configuration that would cause access failure for Azure Files.
## "Mount error(112): Host is down" because of a reconnection time-out
233
+
234
+
A "112" mount error occurs on the Linux client when the client has been idle for a long time. After an extended idle time, the client disconnects and the connection times out.
235
+
236
+
### Cause
237
+
238
+
The connection can be idle for the following reasons:
239
+
240
+
- Network communication failures that prevent re-establishing a TCP connection to the server when the default "soft" mount option is used
241
+
- Recent reconnection fixes that are not present in older kernels
242
+
243
+
### Solution
244
+
245
+
This reconnection problem in the Linux kernel is now fixed as part of the following changes:
246
+
247
+
-[Fix reconnect to not defer smb3 session reconnect long after socket reconnect](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/fs/cifs?id=4fcd1813e6404dd4420c7d12fb483f9320f0bf93)
248
+
-[Call echo service immediately after socket reconnect](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b8c600120fc87d53642476f48c8055b38d6e14c7)
249
+
-[CIFS: Fix a possible memory corruption during reconnect](https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=53e0e11efe9289535b060a51d4cf37c25e0d0f2b)
250
+
-[CIFS: Fix a possible double locking of mutex during reconnect (for kernel v4.9 and later)](https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=96a988ffeb90dba33a71c3826086fe67c897a183)
251
+
252
+
However, these changes might not be ported yet to all the Linux distributions. This fix and other reconnection fixes can be found in the [Minimum recommended versions with corresponding mount capabilities (SMB version 2.1 vs SMB version 3.0)](storage-how-to-use-files-linux.md#minimum-recommended-versions-with-corresponding-mount-capabilities-smb-version-21-vs-smb-version-30) section of the [Use Azure Files with Linux](storage-how-to-use-files-linux.md) article. You can get this fix by upgrading to one of these recommended kernel versions.
253
+
254
+
### Workaround
255
+
256
+
You can work around this problem by specifying a hard mount. A hard mount forces the client to wait until a connection is established or until it's explicitly interrupted. You can use it to prevent errors because of network time-outs. However, this workaround might cause indefinite waits. Be prepared to stop connections as necessary.
257
+
258
+
If you can't upgrade to the latest kernel versions, you can work around this problem by keeping a file in the Azure file share that you write to every 30 seconds or less. This must be a write operation, such as rewriting the created or modified date on the file. Otherwise, you might get cached results, and your operation might not trigger the reconnection.
259
+
246
260
## Need help? Contact support.
247
261
248
262
If you still need help, [contact support](https://portal.azure.com/?#blade/Microsoft_Azure_Support/HelpAndSupportBlade) to get your problem resolved quickly.
0 commit comments