Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Server CentOS 6.5 and Selinux is permissive

My NFS server share in /etc/exports

/home/unixmen/ (rw,sync,no_root_squash)

Client running on another CentOS 6.5 host , is able to mount normally..

When I try automount with autofs, nothing works, did lot to google search of this issue to figure out the root cause, yet unsuccessful.

I am wondering if I am doing something basic error..

Please see the autofs configs

~]$ cat /etc/auto.master
#/net -hosts
/misc /etc/auto.misc


~]$ cat /etc/auto.misc
unixmen -fstype=nfs

I did change the log level to debug in /etc/sysconfig/autofs, post restarting the autofs and log says

Jun 27 17:20:00 ganeshh automount[12322]: mounted indirect on /misc with timeout 300, freq 75 seconds

Not sure if this is related to mount issue

Recently now, I get this data in the log

Jun 27 18:11:49 ganeshh automount[12322]: expire_proc: exp_proc = 3063937904 path /misc
Jun 27 18:11:49 ganeshh automount[12322]: expire_cleanup: got thid 3063937904 path /misc stat 0
Jun 27 18:11:49 ganeshh automount[12322]: expire_cleanup: sigchld: exp 3063937904 finished, switching from 2 to 1
Jun 27 18:11:49 ganeshh automount[12322]: st_ready: st_ready(): state = 2 path /misc

eventually there is not mounted files in /misc directory

share|improve this question
You've assured us that client can mount manually, yes? You can confirm that ls -al /misc/unixmen returns a file-not-found error, yes? My next point is I've never seen -fstype=nfs in an automount table before; my belief is that's implied and may not be valid to state. Could you try removing that, restarting automount and then doing ls -la /misc/unixmen? – MadHatter Jun 27 '14 at 6:59
Yes I deleted -fstype=ns from the entry , now its like this in the file cat /etc/auto.misc unixmen restarted autofs , but the change is pretty the same, unable to view the mounted partition . ls -l /misc returns 0 – user173639 Jun 27 '14 at 7:04
And what did you get when, after restarting automount, you did the ls? Also, can you confirm the two previous points in my comment? – MadHatter Jun 27 '14 at 7:04
I didn't ask for ls -l, I asked for ls -al, and (sorry to ask) can you confirm that you're doing it on /misc/unixmen, not just /misc? Your question makes that unclear. I presume that showed only . and .., but it would be useful to have it confirmed - and better still to see it (cut-and-paste both command and output into your answer). Still seeking confirmation on my first two points as well. – MadHatter Jun 27 '14 at 7:07
I do not see unixmen directory at all, tried many times ls -al /misc/ total 4 drwxr-xr-x. 2 root root 0 Jun 27 18:33 . dr-xr-xr-x. 25 root root 4096 Jun 27 00:31 .. [root@ganeshh ~]# ls -al /misc/ total 4 drwxr-xr-x. 2 root root 0 Jun 27 18:33 . dr-xr-xr-x. 25 root root 4096 Jun 27 00:31 .. – user173639 Jun 27 '14 at 7:16

Now we've got it working (-fstype=nfs is not needed, and probably not valid, in a map) your question betrays a misunderstanding about how automount presents to the user.

Here's an automount entry in my master file

/mnt    /etc/auto.master.d/mnt

and the corresponding map

# cat /etc/auto.master.d/mnt
helvellyn       -ro,soft,intr
bowfell         -ro,soft,intr

Now here's some ls output on the trigger directory

# ls -al /mnt
total 4
drwxr-xr-x  2 root root    0 Jun 14 10:01 .
dr-xr-xr-x 25 root root 4096 Jun 27 03:37 ..

Note that a) the directory is empty, and that b) the size is 0 bytes. The former confused you, and the latter is unlawful: even an empty directory has size 4096 bytes. But the zero is a shorthand way of knowing that automount has correctly read your maps, and is possessing the directory. You can also check with df:

# df -k /mnt
Filesystem             1K-blocks  Used Available Use% Mounted on
/etc/auto.master.d/mnt         0     0         0    - /mnt

Now let's list the target directory, even though the parent is apparently empty:

# ls -al /mnt/helvellyn
total 761548
drwxr-xr-x 2 root root      4096 Jun 23 13:21 .
drwxr-xr-x 3 root root         0 Jun 27 07:31 ..
-rw-r--r-- 1 root root         0 Jun  1 03:18 access_log
-rw-r--r-- 1 root root   7485078 May 11 03:09 access_log-20140511
-rw-r--r-- 1 root root   7052254 May 18 03:06 access_log-20140518
-rw-r--r-- 1 root root   5357900 May 25 03:28 access_log-20140525
-rw-r--r-- 1 root root    577579 May 25 16:36 access_log-20140601

Content magically appears! Now let's list the parent again:

# ls -al /mnt
total 8
drwxr-xr-x  3 root root    0 Jun 27 07:31 .
dr-xr-xr-x 25 root root 4096 Jun 27 03:37 ..
drwxr-xr-x  2 root root 4096 Jun 23 13:21 helvellyn

Automount really does do demand-driven mounting (and unmounting). Since /mnt/helvellyn won't be mounted until you try to access it, you cannot see it until the first access triggers the mount.

I hope you will forgive me for adding that if you take one other lesson from this answer, it should be that detail is vitally important in UNIX sysadmin. If an instruction asks you to do do X, it may well be important to do exactly X, and not something that you think is entirely equivalent to X. That little zero-size directory should give you some indication of how little information is sometimes presented to you to know that certain things, particular older UNIX-things, are working correctly. If, through imprecision, you skate past those tiny signs, UNIX won't give you anything else to go on, and confusion may result.

share|improve this answer
Lakeland Fells - cool naming convention. – Iain Jun 27 '14 at 7:49
<grin> why, thank you! At this site, we started from the top down (scafell - one-word peaks only) and are working down towards 1000'. See also… . – MadHatter Jun 27 '14 at 8:00

Your Answer


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.