Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm having a rather strange issue with autofs in CentOS 5.1.

Essentially I'm trying to access a file using automount, but the first time I try to access the file it isn't found. It's only on subsequent attempts that the mount becomes accessible until the it's automatically unmounted sometime later due to inactivity, and the cycle starts over again.

Below is what happens when I try listing the file twice, with only a second or so delay between them:

*_107> ls /net/netfiler/vol/Archive/build.xml
ls: /net/netfiler/vol/Archive/build.xml: No such file or directory
*_108> ls /net/netfiler/vol/Archive/build.xml
/net/netfiler/vol/Archive/build.xml

Upon further investigation, mount reports that netfiler:/vol/Archive is not mounted before the first attempt, but is afterwards, which allows the second attempt to succeed. It's almost as if the OS isn't waiting for automount to finish it's work before attempting to access the file.

My /etc/auto.master has the following:

/net    /etc/auto.net

Though I have also tried the default of:

/net    -hosts

To no avail.

This wouldn't be a huge issue were it not for the fact that it's breaking many of our automation scripts, because they cannot locate the files on the first try. I've never seen this problem in any other distribution, so I'm hoping someone here has a solution.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Looks like the vanilla install of CentOS 5.1 has a known kernel bug that is causing this issue:

http://bugs.centos.org/view.php?id=2448

It was fixed some time ago, and upgrading to the latest 5.1 kernel fixed the issue.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.