Originally Posted by newbie0101
hello, i have a partition that i use as a storage which is on /dev/sda8.
i'd like to use autofs to mount it only when i need to access it.
i did the configuration according guides i found in google.
yea right, but you must have gotten something wrong. I found a pretty good description
some time ago. Alright, it's somewhat inclined to Arch Linux, but the basics of autofs are the same across various distros.
root# grep ^/m /etc/auto.master
root# cat /etc/auto.storage
/media/sto /dev/sda8 --timeout=60
You got that totally mixed up. In /etc/auto.master you should have three fields per line. The first specifies the base directory of the automounts initiated by that line, the second is the individual config file, and the third contains additional options. For you, that could be:
/media/auto /etc/auto.storage --timeout=60 --ghost
This main configuration refers to /etc/auto.storage which contains the individual definitions for each volume you want to auto-mount to /media/auto:
sto -fstype=auto :/dev/sda8
Again, you have three fields per auto-mount. First the directory name relative to the base directoy specified in /etc/auto.master, then the mount options, and finally the file system you want to mount at that location. Don't ask me why the file system path must be prefixed with a colon, I haven't understood that either. The above sample would auto-mount sda8 to /media/auto/sto when accessed. You may want to add or modify the mount options, though.
[X] Doc CPU