Solved

How to recursively automount

Posted on 2000-02-23
9
406 Views
Last Modified: 2013-12-16
I am looking for a way to recursively automount another machines directories.  Automounting is setup and working for a single directory layer, for example I have a /hosts/spike directory on my local machine that automounts the root directory of the machine spike, ie 'spike:/' when I cd into that directory.

I would like automount to also work for other drives mounted on the spike machine.  For example, the spike machine has another drive that is mount at '/disk1'.  When I cd into my local machines '/hosts/spike/disk1' directory I would like 'spike:/disk1' to be automounted at this point.  Currently '/hosts/spike/disk1' looks like an empty directory.

My current configuration files:
auto.master:
/misc   /etc/auto.misc  --timeout 60
/home   auto.home
/hosts  /etc/auto.hosts

auto.hosts:
spike   spike:/

I have tried adding the line '/hosts/spike    /etc/auto.spike' to the auto.master file, and creating an auto.spike file that contains the entry 'disk1    spike:/disk1', but that didn't work.
0
Comment
Question by:brian1
9 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2553168
Basically you can't automount onto an automount point. You can, however, automount points that aren't a home dir. In my auto.home table I have things like:

levie     chimera.dom.com:/nfs0/levie
src       chimera.dom.com:/nfs0/sources
dist      chimera.dom.com:/attic/dist
chaos     chaos.dom.com:/nfs0/levie
chaos-src chaos.dom.com:/nfs0/sources

/home/levie is my normal home dir, but I have another system that doesn't use NIS+ that has a local home dir for me. I can reference that data by looking at /home/chaos.
0
 

Author Comment

by:brian1
ID: 2555759
But still no way to recursively automount directories?  We have an two older servers here(a SUN and SGI) that recursively automount each others' file systems.  I trying to replace these machines with some newer Linux machines, and would really like this to work.

Anyone out there done this before?
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2556340
I'm sorry, I misunderstood what you were asking. Your comment about the Sun's and Sgi's tells me what you meant. Let me check something and I'll be back shortly.
0
 
LVL 2

Expert Comment

by:ventolin
ID: 2559832
is /etc/exports set up right on spike?
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:brian1
ID: 2559969
spike is exporting all of its drives with read/write access.  spike is an SGI, and a SUN box is succesfully recursively automounting all of the exported drives.

I can explicitly mount all the drives on spike from a Linux box with the mount command, but cannot recursively automount the drives that are mounted onto spike's root level.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2560039
Okay I found it... Per the man page for autofs(5) which describes the automount map files:

UNSUPPORTED
       The  automounter  does  not support  direct maps or mount
       trees (more than one filesystem to be mounted under a spe­
       cific automount point), and handles SunOS-style replicated
       filesystems only to the extent that mount(8) does.

So as far as Linux is concerned you can't have a multiple mount entry (aka recursive) mount point.
0
 
LVL 2

Expert Comment

by:jeffa072897
ID: 2566431
jlevie's oh so right.

I spent many hours trying to get it to work.
Simply put, it dosen't.
It's on the wish list for the autofs folks.
0
 

Author Comment

by:brian1
ID: 2566469
Thanks for your help with this.  I guess I will pay attention to autofs updates and watch for this feature.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 100 total points
ID: 2566494
I'm going to consider this to be the answer as subsequent comments bear it out.

Okay I found it... Per the man page for autofs(5) which describes the automount map files:

UNSUPPORTED
   The  automounter  does  not support  direct maps or mount
   trees (more than one filesystem to be mounted under a spe­
   cific automount point), and handles SunOS-style replicated
   filesystems only to the extent that mount(8) does.

So as far as Linux is concerned you can't have a multiple mount entry (aka recursive) mount point.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now