Page 1 of 1

autofs not mounting usb drive

Posted: Thu Jan 31, 2013 10:43 pm
by Aurock
I have autofs installed, and it should be set up to auto mount a usb drive. However, when I plug in a usb drive, it doesn't seem to do anything.

in /etc/auto.master, the only line I have that isn't commented out is:

/var/autofs/removable /etc/auto.removable --timeout=1

in /etc/auto.removable I have:
sda1 -fstype=auto,rw,umask=000 :/dev/sda1

Regardless of whether a usb drive is plugged in or not, /var/autofs/removable exists, but is empty.

sudo mount /dev/sda1 /mnt/sda1 successfully mounts the drive, and I can view the contents.

Why isn't autofs mounting the drive?

Re: autofs not mounting usb drive

Posted: Fri Feb 01, 2013 6:18 pm
by Aurock
Well, something must have been flaky with the os/fs on the card. Shortly after posting, I rebooted and got an error that the fs couldn't be mounted. (I sure seem to have a lot of corruption issues with this thing...) I put the sd card in my laptop, used diskpart to clean the disk, create a new partition, and format it fat32, then reimaged the card with win32diskimage from the image file I had applied earlier that day. Copied the required autofs files to /etc, rebooted, and now it's mounting the usb drive just fine.

Re: autofs not mounting usb drive

Posted: Sat Feb 02, 2013 1:15 pm
by DBryant
Take a look at the output of dmeg and see that the OS correctly identifies the plugging in of your device, or tail -f /var/log/messages for the same.

If that's ok you will have to verify that there is a udev rule for how to handle your particular device. See http://manpages.ubuntu.com/manpages/kar ... dev.7.html for the man page for udev. Its not that complicated and its relatively benign in terms of playing around.

The rules are defined in /etc/udev and are simply text so use your favourite editor and try it out. Just make a copy of the original so, should all hell break loose, you can revert to something sane. :oops: