LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Playing with autofs. (https://www.linuxquestions.org/questions/linux-newbie-8/playing-with-autofs-381966/)

Vitalka 11-10-2005 07:29 PM

Playing with autofs.
 
Now I have been playing with "autofs" for two days (just for my own enjoyment) and I can't get it to work or I just don't understand something.

I made an entry in "/etc/auto.master":
Code:

/windows          /etc/auto.fat
Then I created file "auto.fat" in /etc and made following entry in it:
Code:

fat                  -fstype=vfat        :/dev/hda5
I took a look at a few tutorials and one of them says that:
- "/windows" will be my mounting point
- "fat" is my key to invoke automount action
So as far as I understand only "/windows" folder needs to be created.

Now when I start "autofs", my windows folder stays the empty. If I type
Code:

cd /windows/fat
it says that this folder doesn't exist.
If I create "fat" folder inside "/windows" and type
Code:

ls -al /windows/fat
, fat folder stays empty.

How do I make that when I go into that folder I would be able to see files on that partition.

Nawar 11-10-2005 08:53 PM

After you made your changes to the config files, did you restart the autofs daemons?

If not, then more than likely, your daemons are not running with up-to-date config info.

Try restarting the service, or if you're having difficulty locating it, restart the system.


HTH,

Nawar

Vitalka 11-10-2005 09:18 PM

I do restart the service every time I make changes. :cool:

I also solved my problem:

1. I created /windows/fat folder manually
2. I changed this:
Code:

fat                  -fstype=vfat        :/dev/hda5
to this:
Code:

fat                  -fstype=auto,rw,users,exec        :/dev/hda5
3. Restarted autofs, and finally it worked. :)

I just don't know if timeout option works, which i specified in "auto.master":

/windows /etc/auto.fat --timeout=10

I assume that 10 means 10 seconds and not 10 minutes, right?:scratch:

Nawar 11-10-2005 09:22 PM

Now that makes sense.

It's always the simple things that cause problems, isn't it.

Like forgetting to have a directory available as a mount point.... <DOH!>

I know I've done it before, and WILL do it again.


Glad to hear you solved your problem.

Good work!

Vitalka 11-10-2005 09:41 PM

Directory thing was not the biggest problem. Because I tried creating it and autofs still wouldn't mount fat partition.

Now this apperantely caused all the problem:

fat -fstype=vfat :/dev/hda5

- for some reason it would not take "vfat" value so I replaced it with "auto" and also added a bunch of other options.

I also found this link:
http://www.linux-consulting.com/Amd_.../autofs-6.html
It states some of the mounting options, maybe it will come useful to someone, on this forum, one day. :)


All times are GMT -5. The time now is 12:55 PM.