I have a mysterious directory that doesn't list until I cd into it. Then it does just fine. Then it vanishes again periodically.

bash-3.00$ pwd
bash-3.00$ ls -la
total 16
drwxr-xr-x   4 root root    0 May 18 16:46 .
drwxr-xr-x  29 root root 4096 Mar 23 13:16 ..
drwxrwxrwx  11 root root 4096 Dec  8 16:36 src_rep
drwxr-xrwx   7 root root 4096 Dec  3 11:06 taaats_6
bash-3.00$ cd s_int_r
bash-3.00$ pwd
bash-3.00$ ls ..
s_int_r  src_rep  taaats_6
bash-3.00$ cd ..
bash-3.00$ ls
s_int_r  src_rep  taaats_6

Some time passes, with no commands entered...

bash-3.00$ pwd
bash-3.00$ ls
src_rep  taaats_6
bash-3.00$ ls ./s_int_r/..
s_int_r  src_rep  taaats_6

I am SSH'd into this machine with putty. If I open up another connection to the machine, the second connection seems to always be the same as the first. Ie- It initially doesn't show on either, but if I cd into it on one connection, it will then show on the second.

What is going on?


You're seeing an automounter in operation. Automounter implementations vary, but the basic principle is to mount a directory only when it's accessed. This one is mounting s_int_r on demand when you change into it; other automounters might always list it in the directory entry for /sde but only actually mount it when you try to access a file in it.

cd /sde/s_int_r && df . will tell you where it's mounted from. grep /sde /proc/mounts will tell you what automounter is going on, and from that information you may be able to find out how it's configured.

  • Well I'm still a little confused, but I'll go do some reading and I'm sure it'll make sense. I just didn't know what to search for before! Cheers! – Cam Jackson May 19 '11 at 0:37
  • On another note, it now makes sense why all different machines were accessing what I thought were local copies of data that should have been communal. It's not local at all, it's mounted from somewhere else. – Cam Jackson May 19 '11 at 0:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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