You are not logged in.

#1 2009-06-21 06:35:14

unregistered
Member
Registered: 2008-04-09
Posts: 134

[SOLVED] problem with autofs program

automount is able to start and stop correctly but it does not mount my thumbdrive, how do I solve this?

/media does not contain any directories or files

/etc/autofs/auto.master

# Sample auto.master fi# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(5).
 
/media /etc/autofs/auto.misc

/etc/autofs/auto.misc

# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage

usbstick -fstype=auto,async,nodev,nosuid,umask=000 :/dev/sdb1
cdrom -fstype=iso9660,ro,nodev,nosuid :/dev/scd0
floppy -fstype=auto,async,nodev,nosuid,umask=000 :/dev/fl

/etc/conf.d/autofs

#localoptions='rsize=8192,wsize=8192'

# e.g. --timeout=60
daemonoptions='timeout=60,ghost'

/var/log/daemon.log

automount[5765]: syntax error in nsswitch config near [ syntax error ]

Last edited by unregistered (2009-06-23 14:33:46)

Offline

#2 2009-06-21 07:50:23

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: [SOLVED] problem with autofs program

Could you have a look at /etc/nsswitch.conf or post it? I don't really know what nsswitch does but I have it on my system and I use autofs. You mentioned the automount service starts and stops ok. Can you actually see the automount process running in ps or htop?

Last edited by mikesd (2009-06-21 07:50:49)

Offline

#3 2009-06-21 08:05:39

unregistered
Member
Registered: 2008-04-09
Posts: 134

Re: [SOLVED] problem with autofs program

# Begin /etc/nsswitch.conf

passwd: files
group: files
shadow: files

publickey: files

hosts: files dns
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup: db files

# End /etc/nsswitch.conf

result of ps -aux | grep automount
root      4788  0.0  0.0   2124   776 ?        Ssl  16:02   0:00 /usr/sbin/automount timeout=60,ghost

if it means anything, i deleted the directories that were originally in /media like dvd, cd, etc
i originally had auto.master point to those directories and it worked using another configuration but once I switched and deleted those directories, it didn't.

Last edited by unregistered (2009-06-21 08:13:56)

Offline

#4 2009-06-21 08:30:40

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: [SOLVED] problem with autofs program

unregistered wrote:

if it means anything, i deleted the directories that were originally in /media like dvd, cd, etc
i originally had auto.master point to those directories and it worked using another configuration but once I switched and deleted those directories, it didn't.

Hmm, that nsswitch error is weird. Not sure what is causing that. Maybe unrelated.

That is the configuration I am using. I have an empty /media directory. I don't have the ghost option specified anywhere I can find but get the functionality anyway, ie I see the directories in media when automount starts up whether the device is plugged in or not. Maybe try it without that option? I take it that /dev/sdb1 is appearing when the device is pluged in. What about permissions on /media? Clasping at straws now. smile

Offline

#5 2009-06-21 10:37:58

unregistered
Member
Registered: 2008-04-09
Posts: 134

Re: [SOLVED] problem with autofs program

here are the permissions
drwxr-xr-x  2 root root  4096 2009-06-21 14:18 media

fdisk -l shows /dev/sdb1

no changes without the ghost option

Offline

#6 2009-06-22 12:07:28

unregistered
Member
Registered: 2008-04-09
Posts: 134

Re: [SOLVED] problem with autofs program

bump i still need help

Offline

#7 2009-06-22 18:48:16

dobedo
Member
From: Belgium
Registered: 2008-10-04
Posts: 113

Re: [SOLVED] problem with autofs program

When I had a problem with autofs following an upgrade, I have debugged it by running /usr/sbin/automount from the command line.

If you look at /etc/rc.d/autofs, you can see the command that is run.

When you start the daemon the output is sent to /dev/null.
By running automount, you may see other usefull info.

Fyi, my problem was the -ghost option was unrecognized.

Cheers

Last edited by dobedo (2009-06-22 18:51:12)

Offline

#8 2009-06-23 01:15:33

unregistered
Member
Registered: 2008-04-09
Posts: 134

Re: [SOLVED] problem with autofs program

i stopped autofs using /etc/rc.d/autofs stop and then started automount and the strange thing is automount worked, it automounted my usb stick but when I start it the daemon on bootup, it didn't. What gives and how do I solve it?

ok so i discovered this:
-when i start by running automount it worked
-when i start it using /etc/rc.d/autofs it says DONE but it doesn't work

output from /var/log/daemon.log

automount[5113]: syntax error in nsswitch config near [ syntax error ]
automount[5113]: lookup_nss_mount: key "umou" not found in map.
automount[5113]: lookup_nss_mount: key ".hal-mtab" not found in map.

Last edited by unregistered (2009-06-23 01:30:29)

Offline

#9 2009-06-23 01:41:32

unregistered
Member
Registered: 2008-04-09
Posts: 134

Re: [SOLVED] problem with autofs program

ok so the error was in the /etc/conf.d/autofs file

when i changed this:

#localoptions='rsize=8192,wsize=8192'

# e.g. --timeout=60
daemonoptions='timeout=60'

to this:

#localoptions='rsize=8192,wsize=8192'

# e.g. --timeout=60
daemonoptions=''

everything seemed to work fine, what's wrong with the timeout option?

Offline

#10 2009-06-23 10:11:50

dobedo
Member
From: Belgium
Registered: 2008-10-04
Posts: 113

Re: [SOLVED] problem with autofs program

I would say: '--timeout=60' instead of 'timeout=60'

Offline

#11 2009-06-23 11:32:34

unregistered
Member
Registered: 2008-04-09
Posts: 134

Re: [SOLVED] problem with autofs program

hmm i remember getting an error with '--timeout=60' but nvm I'll sort that out, anyway, all timeout does is unmount the device after the time specified in seconds as the argument right?

Offline

#12 2009-06-23 12:19:00

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: [SOLVED] problem with autofs program

unregistered wrote:

hmm i remember getting an error with '--timeout=60' but nvm I'll sort that out, anyway, all timeout does is unmount the device after the time specified in seconds as the argument right?

Yes. I don't have that option set. I think the default is something like 5 or 10 minutes. I often use 'sudo killall -USR1 automount' to unmount devices so I can remove them.

Offline

#13 2009-06-23 14:05:40

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 834
Website

Re: [SOLVED] problem with autofs program

You can do that in your auto.master, i.e.:

/mnt/media  /etc/autofs/auto.removable --timeout=2
/mnt/nfs   /etc/autofs/auto.nfs --timeout=60

You need to install an RTFM interface.

Offline

#14 2009-06-23 14:33:21

unregistered
Member
Registered: 2008-04-09
Posts: 134

Re: [SOLVED] problem with autofs program

ok problem solved, thanks for the help

Offline

Board footer

Powered by FluxBB