Solved

How to recursively automount

Posted on 2000-02-23
9
408 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

932 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

13 Experts available now in Live!

Get 1:1 Help Now