This is a mirror of official site: http://jasper-net.blogspot.com/

AutoFS - Auto-Mount of Hard Drives

| Tuesday, October 5, 2010
I have an external USB drive, which interacts as my backup and media file system. Very often I switch off this hard drive, because of energy savings. But after enabling I have to mount manually this drive. Furthermore my Samba server access to that and from my other Linux working stations I also have to manually mount the Samba accounts. After sometime I was really nerved. That's why I tried to add the USB drive and my Samba accounts to the fstab files. But after a switch off the USB drive they wasn't be reconnected. So I looked for another solution and I found one. The AutoFS daemon solved my problem. Below I describe how to install and configure the AutoFS feature. It's very easy.

First you have to install the autofs package (e.g. Ubuntu):

sudo apt-get install autofs

Second you edit the /etc/auto.master file:

# absolute directory for mounting and
# dedicated configuration file path
/media  /etc/autofs/auto.media  --timeout=5

Last you add your USB drive to the auto.media file:

# relative mount directory, file system type, further options
# dev path
BackupAndFiles  -fstype=ext3,rw,nosuid,nodev,uhelper=udisks  :/dev/sdb1

Read more: Developers Blog - Programming Languages, Technologies and Visions

Posted via email from .NET Info

0 comments: