Home | Fedora Core 4 Tutorial | Linux Tutorials | Linux Games | Linux Java | Linux Kernal | Linux Firewall | Linux Database | Linux Distributions | Linux Firewall GUI | Linux Distributions | Linux Firewall

 


 

Search Host

Monthly Fee($)
Disk Space (MB)
Register With us for Newsletter!
Visit Forum! Post Questions!
Jobs At RoseIndia.net!

Have tutorials?
Add your tutorial to our Java Resource and get tons of hits.

We offer free hosting for your tutorials. and exposure for thousands of readers. drop a mail
roseindia_net@yahoo.com
 
   

Tutorials

Java Server Pages

JAXB

Java Beans

JDBC

MySQL

Java Servlets

Struts

Bioinformatics

Java Code Examples

Interview Questions

 
Join For Newsletter

Powered by groups.yahoo.com
Visit Group! Post Questions!

Web Promotion

Web Submission

Submit Sites

Manual Submission?

Web Promotion Guide

Hosting Companies

Web Hosting Guide

Web Hosting

Linux

Beginner Guide to Linux Server

Linux Distribution

Major Linux Distribution

Linux FTP Software

Frameworks

Persistence Framework

Web Frameworks

Free EAI Tools

Web Servers

Aspect Oriented Programming

Free Proxy Servers

Softwares

Adware & Spyware Remover

Open Source Softwares

7. How it works

Autodir uses modules to get specific functionality. The core Autodir implements generic functionality on which modules can exploit and add specific functionality of their own.

At any moment only one module can be added to Autodir. If there are two modules, for example autohome, autogroup, two processes of Autodir should be created so that each process will have required modules attached to it.

For further explanation I chose the autohome module which handles transparent home directory creation.

Note

  • autohome module creates user home directories on demand if these does not exist already.

  • It is assumed user accounts exists but not their home directories. Either because these accounts were created with the -M option with useradd or these accounts were imported from ldap, NIS or some other external database for which home directories are yet to be created.

  • It also assumed for this explanation only that all user home directories are expected to be in the /home directory.

Note

Some fine details are intentionally kept aside to make explanation easy to understand.

First autofs file system is mounted on /home directory by Autodir. And this is informed to the Linux kernel that /home is managed by user space application Autodir from now on.

NoteDo not bother too much about autofs file system if you do not understand about it. Just think some special kind of file system something in similarity with memory based file system but with some additional special properties.

                                +----------------+
                                |  Linux Kernel  |
                                +----------------+
                                  /        \
                                 /          \
                                /            \
                               /              \
   +-------------+       +--------+       +------------+        +-----------------+
   | Application |------>| /home  |<----->|  Autodir   |<------>| autohome module |
   +-------------+       +--------+       +------------+        +-----------------+
                              \                                          /
                               \  +----------------+                    /
                                +-|   /autohome    |<------------------+
                                  +----------------+

Whenever an application or daemon needs access to user's home directory, for example /home/userhome1, they directly enter into /home/userhome1 to access it. Kernel which notices this, informs to Autodir if userhome1 directory does not exist already in /home.

Autodir, in turn, passes this request to autohome module. autohome module does not touch /home directory. Instead it manages real home directories some where else, for example in /autohome as shown in the above figure.

autohome module creates real home directory if it does not exist already in /autohome directory. After it is successfully created or failed to created, whatever the outcome, it is reported back to Autodir along with the path to real home directory -- if successful.

If autohome module reports success, Autodir creates userhome1 directory under /home and mounts real home directory from /autohome on it. At the end Autodir informs this to the kernel whether this whole operation successful or failure. Accordingly kernel allows application to enter the directory or reports that no such directory exists, in case of failure, back to the application.

Search Tutorials

Linux Distributions

Fedora

Slackware
SuSe
Mandrake
Knoppix
Mepis
Debian
All Distors....
 

 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2004. All rights reserved.