Solved

How to recursively automount

Posted on 2000-02-23
9
421 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
LVL 2

Expert Comment

by:ventolin
ID: 2559832
is /etc/exports set up right on spike?
0
 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

680 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