LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-23-2009, 09:34 PM   #1
jamida
LQ Newbie
 
Registered: Sep 2003
Posts: 8

Rep: Reputation: 0
Question about autofs and the mount point directory


I just installed autofs on a debian box. It's working well, but I did make some mistakes in setting it up before it started working correctly.

Specifically I was using an indirect map. I created the a directory for the top level mount point "/mount-nfs" and I also created a directory inside that top level for the device specific mount "storage".

Here's the thing, during the process of testing, I would temporarily turn off autofs and when I did that these directories disappeared. It's as if autofs, in the process of shutting down did an rm -fr /mount-nfs. Several times during my testing I re-created these folders only to see this process repeat itself.

What I'd like to know is if indeed this is what autofs did. I'm a little afraid that autofs did something more brutal and that, while the directories disappeared, the inodes are still there but unreachable.

Does anyone know for sure? (I don't really care at this point as what's a few missing inodes, but I'd certainly like to know before I do any more experimentation.

(BTW, on regular mounts I usually do a "touch NOTHING_MOUNTED" so users can report back something more useful than "all the files disappeared". Initially I did the same here and these "NOTHING_MOUNTED" files disappeared too.)

Thanks

Mike
 
Old 12-23-2009, 11:48 PM   #2
bryanl
Member
 
Registered: Dec 2003
Posts: 97

Rep: Reputation: 35
autofs creates the directories for the share mount points you define in auto.master and its offspring and it removes them when the share is not mounted. When you access a share mount point, autofs sees the request, logs into the share, and mounts it as per is configuration files. Besides 'mount on demand', autofs also provides for the automatic dismounting of unused shares after a set timeout if you want. Those features can be useful at times.

If you need persistent mount points, use fstab.
 
Old 12-24-2009, 10:49 AM   #3
jamida
LQ Newbie
 
Registered: Sep 2003
Posts: 8

Original Poster
Rep: Reputation: 0
Hi Bryanl:

Thanks for the answer. I quite familiar with how autofs works at a high level. This setup is in an office LAN and I'm not comfortable putting the mount in fstab as the NFS server may be powered down. So autofs seems the way to go. It won't hold up the boot process and the mount point will re-appear when needed when the NFS server is back online and accessed.

Mike
 
Old 12-24-2009, 01:02 PM   #4
bryanl
Member
 
Registered: Dec 2003
Posts: 97

Rep: Reputation: 35
re: "I quite familiar with how autofs works at a high level." - it gets difficult to answer a question when there is dissonance in the premise. rm -rf is a different thing than rmdir of a mount point. turning off a service does mean that the service is not available. These are 'high level' concepts that did not seem clear in the question. So, perhaps, I misunderstood the question.

I use autofs for access to smb shares on a NAS in an Ubuntu environment. Recently, permissions of the share mount point have made things difficult (read only except for owner). I have considered NFS but that means coordinating user and group numbers across then network and that'd be a pain, too. There always seems to be something.
 
Old 12-24-2009, 01:31 PM   #5
jamida
LQ Newbie
 
Registered: Sep 2003
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks for being patient with me. Recall that, not knowing any better, I initially did mkdirs for both the "top level" mount point and the lower level one for my autofs mounts. I also created a couple of files via touch in both the top level mount point and the lower level one.

After starting and then stopping autofs these directories and their files were gone.

So the main question I have is, were the files and directories I created completely deleted from the filesystem as if an rm -fr were done or did autofs delete the mount points in such a way that other aspects (inodes?) of the files and directories I created still "in use" by the filesystem?

rmdir won't work if there are still files in the directory, but I'm not sure if autofs has access to other deletion techniques. (It's been a while since I've done C programming in Unix.)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to mount a Windows shared directory and have mount point be owned by nonroot user Arodef Linux - Software 3 09-14-2009 12:23 AM
Autofs fails to mount home directory Neruocomp Solaris / OpenSolaris 0 05-20-2009 01:58 PM
Missing Mount Point Directory jvang Linux - Networking 1 08-09-2005 08:19 AM
How do I map device serial number to its mount point directory? vagrawal Linux - Software 1 03-11-2004 12:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration