Configure Automount CentOS 6
If you are using 389 or some other LDAP directory, I would encourage you to look here:
First of all, what is Automount? Auto-mount automatically mounts file systems you tell it to on a UNIX/Linux Machine.
Where is that helpful? We can just use FSTAB right? True…. However, let's say you are rebooting your desktop, and an entry in fstab is offline, now your desktop is hung, and you cant get into the NFS server without being in your desktop, so you have to boot to single user mode, disable that in fstab, and then reboot, login as root, mount -a, and then back to normal. How Helpful.
Let's get Started, in this example, we are mounting our Backup Server to my desktop. Login as root, either via GNOME or shell
install auto-mounter if you have not yet, or if you have a minimal install
set it to start on startup
now we need to have a place to mount our backup server to
first thing we need to do is edit the auto.master file
add the following to your auto.master file
basically what we are doing here is telling automounter that when someone goes to /mnt/Backup they should refer to the /etc/auto.backup file, setting a timeout, and allow ghost version of files
let's create the auto.backup file
RULE 1: ONLY ONE auto.server can exist for each server, for example if i wanted to mount 2 NFS mounts from our backup server, both have to be in auto.backup
Here's the basic Syntax of the Auto.backup file name, so basically we are going to mount to /mnt/Backup and have that be in a folder called Backups, with the filesystem type being Read/Write NFS, and the NFS mount point is our Backup Server's Home Directory (this assuemes that it's already an NFS Export, and is available to use)
once completed, restart the autofs service
as you can see, autmount worked!
we are now able to view our backup NFS mount.
Hosted Linux Servers at www.zwiegnet.com/go