Lade...
 
UNIX >  Linux

Linux autofs

I tried to figure out how to do the /net thing like in solaris. For those who don't know: you just do a
cd /net/somemachine/somedirectory
and get somedirectory of somemachine mounted. Why do i write a tutorial here? There are different versions of the linux autofs (kernel based automounter) around. Some still have 3.X versions, some use 4.X versions. On 3.X i found a good tutorial here http://www.seismo.ethz.ch/linux/automount_7.2.html. In case this page gets lost i copy&pasted it:


The automounter concept under SuSe Linux 7.2 & 7.3 is quite different than to their previous versions. Finally I got it working using the following steps; I have found the solution on

http://groups.google.com/groups?q=auto%5C.net+master&hl=en&safe=off&rnum=6&ic=1&selm=3869D509.283532D%40lms.be

and I thank Carol Ghijs for her posting!

0. Make sure, autofs is running! Do this as follows:
   - Start Yast2
   - Sonstiges
   - RC.Config-Editor
   - Start-Variables: Click on +
   - Start-Network: Click on +
   - start_autofs
   - select 'yes'
   - Speichern
   - OK
    (sorry, for having used German words here)

1. Stop the automounter, entering the following command:
   /etc/init.d/autofs stop

2. Add the following line to /etc/auto.master :
   /nfs   /etc/auto.net.main -rw,intr,timeo=4,retrans=2

3. Create a file /etc/auto.net.main and add the following line to it:
   * -fstype=autofs,-Dhost=& file:/etc/auto.net.sub

4. Create a file /etc/auto.net.sub and add the following line to it:
   * ${host}:/&

5. Start the automounter, entering the following command:
   /etc/init.d/autofs start

   --> Then you may access any NFS file system that is exported for you by
       simply entering the command:

    cd /nfs/machine/directory

    Example:  cd /nfs/guru.ethz.ch/home

PS: You may of course substitute 'nfs' by 'net'; do this by changing
    the mountpoint in /etc/auto.master




For those who use autofs 4.X (just check with rpm -q autofs) you usually just have to uncomment the /net line in auto.master and restart the automounter.

Erstellt von admin. Letzte Änderung: Donnerstag Oktober 6, 2005 13:34:06 GMT-0000 by admin.