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

...that title is probably a bit misleading.

This is the situation. I have a collection of CentOS 4.x x86_64 systems which are used as a compute farm. The directories for users and tools and code are automounted. Jobs are submitted to the farm vi LSF. Most of the time this all works as expected, however periodically the jobs fail because the automounter doesn't mount a requested filesystem (or mounts it too slowly, I don't know).

The jobs are basically big make jobs, and periodically one will get submitted and fail with something like:

make: *** /home/qualifier/thing/otherthing/tim:
No such file or directory.  Stop.

However if you ls /home/qualifier/thing/otherthing/tim, you'll see that it is there.

If you immediately run the job after doing that (or something else to force the mount of /home/qualifier (or whatever automount make barfed on)), everything works as expected.

This problem isn't limited to make operations; trying to write to a file on an automounted filesystem sometimes fails because the file can't be opened (because it "isn't there" yet).

The nfs file server is either a NetApp appliance or one of two CentOS 4.x nfs fileservers, depending on what's being asked for, so I think this is client-side not server-side.

How do I adjust the automounter so that when things are asked for, the mount gets mounted?

Update: More Details

I should probably emphasize that this issue has been transient through my history with Linux, from RedHat 7.3 through the CentOS 4.x stream. I'm not using 5.x in any serious quantity anywhere yet.

This particular example node is a CentOS 4.8 running 2.6.9-89.0.25.ELsmp, with autofs-4.1.3-238. Software wise, all nodes were built using an automated Kickstart environment and pull updates from the same local yum repository, so they should not be different in any measurable way. Hardware-wise they are mostly Sun X2200-M2 systems with between 16GB and 48GB of RAM each; plus a couple of HP DL585-G2 systems with 32GB.

The contents of /etc/sysconfig/autofs, comment lines excluded. Note the only customization is the addition of --ghost as a DAEMONOPTIONS.

LOCALOPTIONS=""
LDAPAUTOMASTER=""
UNDERSCORETODOT=1
DISABLE_DIRECT=1
ONE_AUTO_MASTER=0
GHOSTDIRS=""
BASEDN=
DAEMONOPTIONS="--ghost"

auto.master and all auto.* files are delivered through NIS.

Sample entry in auto.master:

/home auto.home

Sample entry in auto.home:

jsmith fas2020-01:/vol/vol1/home/jsmith

The only entries with any automount options are for tempdata mounts. These mounts typically do not exhibit problems as there is nearly always something running which requires them, but I include them here for completeness:

tempdataS -tcp fas940-01:/vol/vol1/tempdata_H
tempdataH -tcp fas940-01:/vol/vol1/tempdata_H
tempdata -tcp pos-01:/mnt/array/tempdata
tempdata2 -tcp,noatime,rsize=32768,wsize=32768 pos-02:/mnt/array/tempdata
share|improve this question
    
Which version of automount and what do your automount maps/auto.master/options look like? –  James Jun 29 '10 at 21:30

1 Answer 1

You should mount NFS hard,fg,intr. AFAIK "bg" is a default (check with mount after you accessed your automounter directories).

The most important option for you in this case is propably "fg" (foreground) - the mount is only finished if it succeeds. Since your process depends on that mount you should set that option. In normal server operations you should not depend on nfs, so normally "bg" is being used.

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.