« HOWTO:Set up NFS sharingHOWTO Sort out kvm »

HOWTO Setup and Configure Autofs

21/07/08

HOWTO Setup and Configure Autofs

Why Use Autofs And Not NFS?

NFS is great when you have one dedicated server and it's up all the time. If like me you have a few PCs with Linux and you want to share the mounted file systems. The order you boot your machines up can be important and you could even get deadlocks where two machines are waiting for each other. NFS can also appear to hang the booting process if a remote server is not available. If this happens then you have to manually mount the NFS systems, I find that a pain.

...


With autofs, the file systems are mounted as required or on demand, and then automatically unmounted when they have not been used for some time. This means you can have two machines both of which mount file systems from the other and the order you boot them does not matter as long as the remote system is not required during the boot. For example your HOME area in on a remote NFS file system. To mount the remote system just access it. Change directory to it, list the contents of it or execute a script or program from it.

Also for removable devices you don't have the bother of mounting and unmounting them. They just work. Insert a cdrom, access it, when you are done wait for the timeout and eject it.

Note:
Automounted systems are not checked with fsck (or whatever your filesystem uses) as you boot. This may need to be sorted out else where.

We can now place a cd/dvd into one of the devices and it will be mounted when we use ls or cd /mnt/cd we will see a further subdirectory 0 or 1 depending on the device we used.


Stuff You May need To Read Up On!

  • The mount command, how to mount stuff and it's options.
  • /etc/fstab how to mount file systems automatically at boot time
  • nfs and /etc/exports How to setup exports (shares) in NFS
  • /etc/hosts file IP lookups
  • /etc/hosts.allow and /etc/hosts.deny A bit of security
  • Setting up Samba/Cifs

Pages: 1· 2· 3· 4· 5· 6· 7· 8· 9· 10

No feedback yet

These pages are how I have set up my Linux System and the software that is installed on them. They were originally made as notes, so that I could speed up the rebuilding of my system when I've done something rather daft.
Note:This site uses cookies and may already have written some. It you do not agree with this please leave this website, do not return and delete the cookies if any that have been written. Ta! :-)

Search

Contents

powered by b2evolution