Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to recursively automount

Posted on 2000-02-23
9
417 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Choosing CentOS 16 108
linux redhat 7.2 10 89
How to retrieve remote exit code when using rsh from Linux to Windows ? 13 52
Apache LDAP Authentication 20 31
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
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 find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

856 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