It is hoped that by reading this document, you should be able to have one or both of these automounter running on your linux system.
amd and autofs can co-exist together...
- you will need an ethernet cable ( RJ45 or BNC ) for your network card
- make sure your ethernet card is listed in the Ethernet-HOWTO hardware compatible list
The amd automounter does NOT require any kernel support. Therefore you should be able to get it running with no problems.
The current versions of amd is available from:
ftp://sunsite.unc.edu:/pub/Linux/system/mount/ amd920824upl67.tar.gz
automount2amd.pl script in NET-2-HOWTO will convert Sun automounter map file format into amd map file format.
The autofs automounter on the otherhand does REQUIRE kernel level support.
The current versions of autofs is available from:
ftp.kernel.org:/pub/linux/daemons/autofs/ autofs-3.1.1.tar.gz
ftp://sunsite.unc.edu/pub/Linux/system/mount/ autofs-3.1.0.tar.gz
Autofs source code is also included in the the Linux kernel source tree at:
/usr/src/linux/fs/autofs ( on your local disk )
root# cat /proc/filesystems
ext2
...
nodev autofs <<---- required for autofs
#
Note: Kernel.Version will vary on your system, eg: 2.0.35 for linux-2.0.35
#
# if autofs is not listed...you can try to install the autofs module:
#
root# /sbin/insmod /lib/modules/Kernel.Version/fs/autofs.o
or
root# /sbin/modprobe autofs
#
#
# Now Check if the module is loaded
#
root# /sbin/lsmod should list the loaded modules
#
Module Pages Used by
...
autofs 1 2 (autoclean)
#
If your linux kernel does NOT support autofs, you will get in your log files: ( /var/log/messages )
Jul 20 11:40:40 xxx automount[29602]: >> mount: fs type autofs not supported by kernel
Jul 20 11:40:40 xxx automount[29602]: /kernel: mount failed!
Given that recompiling the kernel is a lot of fun to some and a source of aggrevation to others... and if you are not comfortable with your linux hardware and software configuration, you should consider using amd first and play with the kernel at a later date.
For more info, see Linux Kernel HOWTO
Be sure to enable modules support, so that features can be incrementally added to your kernel without having to recompile it each time.
To verify if your kernel supports autofs
root# /etc/rc.d/init.d/autofs status
Configured Mount Points:
/usr/sbin/automount --timeout 600 /.autofs file /etc/auto.misc
Active Mount Points:
/usr/sbin/automount --timeout 60 /.autofs file /etc/auto.mis
root# grep -i autofs /usr/src/linux-2.0.3x/.config
CONFIG_EXPERIMENTAL=y <<--- required for autofs
....etc...
CONFIG_AUTOFS_FS=y <<--- required for autofs
These are the files that must be configured for your network and varies from the different linux distributions.
the /etc/fstab is a file that defines your file system and is read at boot time.
General fstab file syntax is
filesystem mount_point options
You may mount the partitions into your file system as defined by /etc/fstab at boot time or you can manually mount it as needed or use an automounter mounter that will transparently mount the partition you are accessing.
fstab defines your various filesystem defining your disks such as a ext2 filesystem ( default ) or a msdos partition or a iso9660 filesystem for cdrom among many other options.
see man pages for fstab
#
# Sample /etc/fstab file
# ------
#
# These filesystems are mounted by
# root# mount -a
#
# To view the mounted filesystems
# root# showmount -e
# or
# root# df
#
#
# for ps and other runtime data
none /proc proc defaults
#
/dev/sda1 swap swap defaults 0 2
/dev/sda2 / ext2 defaults 0 1
/dev/sda3 /tmp ext2 defaults 0 2
/dev/sda5 /var ext2 defaults 0 2
/dev/sda6 /usr ext2 defaults 0 2
#
/dev/sdb1 /people ext2 defaults 0 2
#
# Do not mount on reboots
/dev/sdc1 /cdrom iso9660 noauto,default,ro 0 2
#
#
# If you want to be able to manually mount these filesystems
#
# make sure /mnt/kernel.org exists ( mkdir /mnt/kernel.org )
www.kernel.org:/tmp /mnt/kernel.org nfs noauto 0 0
#
# Do not mount on reboots
Mach:/Backup /Backup nfs defaults,noauto 0 0
#
# end of file
see Mount options for more info
You do not configure the automounter from the /etc/fstab file, which you will already be using to contain information about your filesystems, instead it is command line driven.
This file shows the active partitions currently mounted.
Please do NOT edit this file
When running commands like "df", it will list mounted directories listed in this file in order. If df hangs in the middle, it usually means the next mount point in the /etc/mtab file is the server that is not responding.
This file defines all your partitions that you are allowing the rmachines to have access to your filesystem.
A machine that is a server for your home directories will have /home exported as rw to other client workstations
A machine that is your mail server will have /var/spool/mail exported as rw to other client workstations
and if were have such a servers
#
# Sample /etc/exports
#
# To reload changes to this file
# ------------------------------
# /etc/rc.d/init.d/nfs stop ; /etc/rc.d/init.d/nfs start
# check /var/log/messages for any errors
#
#
# allow the primary Server to read the entire filesystem hierarchy
/ Primary.your_domain.com(ro,no_root_squash)
#
# allow users on other machines to pop and delete their emails
/var/spool/mail #.your_domain.com(rw)
#
#
# allow users on Home to read/write data on this machine
/home Home.your_domain.com(rw)
#
# allow users on any machine to read the /home dirctory on this machine
/home *.your_domain.com(ro)
#
#
# To Export /home/$USR to particular users workstations
# note: you should probably use NT1.your_domain.com to disallow
# exporting the directory to NT1.evil_hacker.com
#
/home/usr1 NT1(rw)
/home/usr2 NT2(rw)
/home/usr3 NT3(rw)
#
#
# To allow this machine's local disks to be the backup disk to Server
# allow root@Server to be able to write to this backup disk
#
/Backup Server.your_domain.com(rw,no_root_squash)
#
# end of file
Some commonly used mount options
ro read only ( default?? )
rw read and write
root_squash prevents root on the remote server from having
root access to this machine
( the default on linux machine )
no_root_squash allows root on the remote server to manage
this file system as if it was local to that remote server
see Mount options below for more info
a loadable module or pre-compiled into the linux kernel.