3

I have a cifs mounted like this:

mount.cifs -o uid=myuser,user=...,dom=... //IP/Share /some/mountpoint/

When I try to access it after period of inactivity (or when the network is inaccessible), it stucks application that for prolonged time (minutes). In the end it completes the request and unblocks the application. smbclient can easily log in and view directories, but the /some/mountpoint is waiting and waiting for minutes.

How do I speedup these retries?

Vi.
  • 5,528
  • 7
  • 34
  • 68

1 Answers1

0

By default cifs mounts use protocol 1.0, which besides obsolete is largely inefficient and does not recover well from sleep for several reasons.

Depending on what is your server technology, you can go from using vers=2.1 at least, or vers=3.0.

Please see the related question CIFS randomly losing connection to Windows share for more details.

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
  • 1
    In July 2017, [the default protocol version was changed to 3.0](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/fs/cifs?id=eef914a9eb5eb83e60eb498315a491cd1edc13a1) and in September 2017, [autonegotiation was added](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/fs/cifs/connect.c?id=9764c02fcbad40001fd3f63558d918e4d519bb75). – telcoM Apr 05 '22 at 18:14