2

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.

1 Answer 1

1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .