Can AUTOMOUNT_TIMEOUT be too long?

1

I'm running Mountain Lion on a new iMac. I need it to maintain a persistent connection to a NAS drive. However, I am finding regular lost connections -- as reported by iTunes and other applications.

In researching a solution, I have discovered automount and it seems like a good solution to this problem. I have noted that there is a field in autofs.conf called AUTOMOUNT_TIMEOUT which is currently set to 3600 seconds.

According to man autofs.conf:

AUTOMOUNT_TIMEOUT
The number of seconds after which an automounted file system will be unmounted if it hasn't been referred to within that period of time. The default is 10 minutes (600 seconds). This is equivalent to the -t option in automount(8).

Since i would like a persistent connection, is there any reason not to set this to a larger number, say 3600000 or likewise. Is there some reason why I shouldn't do this?

Hephaestus

Posted 2013-02-02T07:18:19.473

Reputation: 153

Thank you to DB for the reference to the man page. Just for the record, I added a link to Apple White Paper that is the source of my info. – Hephaestus – 2013-02-04T18:37:31.373

Answers

0

Well, in principle, you shouldn't need to. The whole point of automount is that it will mount on demand. In theory, whenever you try to access the folder in question it will be mounted on the fly. Setting it to such a large value would seem to negate the benefits of automount. I don't think it would cause any problems, I just don't see how it would solve any.

Assuming your NAS is running a Unix variant, mounting it via NFS should work perfectly. I have a Debian server exporting folders to three Mac laptops and a Linux one through NFS with no problems. Were you using NFS when you experienced the lost connections?

terdon

Posted 2013-02-02T07:18:19.473

Reputation: 45 216

Thank you, terdon. I think you nailed the core issue: the OS should be able to reconnect on demand. I am still new to OS X and trying to understand some of its strengths/limitations. So far, I am finding the network services to be somewhat unstable. I am connecting to a QNAP TS-419 NAS box running Linux. It has been rock solid for the last two years serving some windows boxes. I chose to use AFP as the connection protocol assuming it would be more efficient with a Mac, but am wondering if that is the best choice. I will try NFS next. Thank you. – Hephaestus – 2013-02-04T18:52:30.240

1@Hephaestus, you should try NFS. Macs are Unix, and NFS is a very stable UNIX protocol. I recommend it highly. AFP is (in my limited experience) at best harder to set up on Linux and often problematic. – terdon – 2013-02-04T19:08:07.513