LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   autofs - delay when accessing the /nfs directory (https://www.linuxquestions.org/questions/linux-software-2/autofs-delay-when-accessing-the-nfs-directory-4175600127/)

taylorkh 02-19-2017 09:01 AM

autofs - delay when accessing the /nfs directory
 
I am running autofs-5.0.7-56.el7.x86_64 on CentOS 7.3 (Mate desktop). I have a VMWare guest of the same OS running on the CentOS 7 host. The guest VM has the following line in /etc/auto.master
Code:

/nfs  /etc/auto.nfs -browse
and /etc/auto.nfs contains
Code:

archive -rw  taylor20:/archive
backup -rw  taylor20:/backup
data -rw  taylor20:/data
quitelarge -rw taylor20:/quitelarge

data09.1 -rw taylor09:/media/data09.1a
data09.2 -rw taylor09:/media/data09.2a

data14.1 -rw taylor14:/media/data14.1a
data14.2 -rw taylor14:/media/data14.2a

data18.1 -rw taylor18:/media/data18.1a
data18.2 -rw taylor18:/media/data18.2a

taylor20 is the host machine and has 4 file systems exported. The other 3 machines listed are servers on my network each with two file systems exported. The servers are for data archive and are ONLY powered on when I need to access them to save or retrieve data. That is why I am using autofs rather than hard mounts in /etc/fstab. Here is the issue...

If I open the /nfs directory with Caja (Nautilus) on the VM it opens almost instantly. When I open one of the exported file systems on the host it opens in a few seconds. If I then backup to the /nfs directory it may take as long as 30 seconds before the Caja screen refreshes. After that I can switch between auto-mounted file systems on the host and the /nfs directory very quickly. I suspect that the delay is related to autofs interrogating the "dead" mounts to the servers which are off-line.

My question is... can I configure autofs to less diligent about looking for something which is not there? Or do I just have to live with the delays? This is a lot better than I had before using scripts to mount and umount the server file systems. I would often forget to run the umount script before powering down a server. This would cause all sorts of hangups as mount and nfs tried unsuccessfully to access the missing file systems.

TIA,

Ken

jperea 03-16-2017 12:37 PM

Hi

I'm not sure, but perhaps you can add the --timeout switch to your remote mounts, something like

data09.1 -rw taylor09:/media/data09.1a --timeout 60

--

Jaime

taylorkh 03-16-2017 01:45 PM

Thanks Jamie,

I will give that a try.

There are also a WHOLE lot of settings in /etc/atuofs.conf which I suspect are global. However, there is not a lot of documentation other than some sometimes cryptic comments in that file.

Autofs is great WHEN it works. When it doesn't... It can gum up everything and take several minutes to reboot the machine. I will let you know what happens with these changes - if I can figure out how to test. The problem usually only presents itself when I am not expecting it :(

Thanks again,

Ken


All times are GMT -5. The time now is 03:16 PM.