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 autofsSecond you edit the /etc/auto.master file:# absolute directory for mounting and
# dedicated configuration file path
/media /etc/autofs/auto.media --timeout=5Last 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
# dedicated configuration file path
/media /etc/autofs/auto.media --timeout=5Last 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
0 comments:
Post a Comment