Autofs

Configuration for USB mass storage, DVD, CDROM, IDE hard drives. Now drives are automatically mounted when you try to access them. You can test it by inserting a cdrom, and cd /mnt/auto/autofs/cdrom . The CDROM is automatically mounted, and ls should show you contents of the cd.

autofs uses /etc/auto.master and /etc/auto.misc file.

Example:-

We want to auto mount CDROM when we list “/mnt” directory(ls /mnt).

Put “/mnt    /etc/auto.misc” line in “/etc/auto.master” file.

clip_image001

Then edit “/etc/auto.misc”

clip_image002

Restart service

clip_image003

Check directory

clip_image004