You are not logged in.

#1 2016-05-16 17:00:01

aplainzetakind
Member
Registered: 2016-05-16
Posts: 3

[SOLVED] Can't get AutoFS to work

I have the exact same problem as here, but the "solution" there is just using something else for the job.

I want autofs to automount USB drives.

$ cat /etc/autofs/auto.master
/media/misc	/etc/autofs/auto.misc
/media/net	-hosts
+dir:/etc/autofs/auto.master.d
+auto.master
$ cat /etc/autofs/auto.misc

cd		-fstype=iso9660,ro,nosuid,nodev	:/dev/cdrom

usbstick  -fstype=auto,async,nodev,nosuid,umask=000  :/dev/sdb1

and

$ cat /etc/default/autofs

USE_MISC_DEVICE="yes"
OPTIONS="--verbose"

With these I watch the output of

$ sudo journalctl -fu autofs

And immediately upon restarting autofs, the following happens.

May 16 18:17:56 systemd[1]: Stopping Automounts filesystems on demand...
May 16 18:17:56 automount[3184]: umounted indirect mount /media/net
May 16 18:17:56 automount[3184]: shut down path /media/net
May 16 18:17:56 automount[3184]: umounted indirect mount /media/misc
May 16 18:17:56 systemd[1]: Stopped Automounts filesystems on demand.
May 16 18:17:56 systemd[1]: Starting Automounts filesystems on demand...
May 16 18:17:56 automount[3231]: Starting automounter version 5.1.1, master map auto.master
May 16 18:17:56 automount[3231]: using kernel protocol version 5.02
May 16 18:17:56 automount[3231]: lookup(file): failed to read included master map auto.master
May 16 18:17:56 automount[3231]: mounted indirect on /media/misc with timeout 300, freq 75 seconds
May 16 18:17:56 automount[3231]: mounted indirect on /media/net with timeout 300, freq 75 seconds
May 16 18:17:56 systemd[1]: Started Automounts filesystems on demand.

Upon inserting a USB disk, the following is returned by

$ sudo journalctl -kf
May 16 18:19:55 kernel: usb 4-1: new SuperSpeed USB device number 9 using xhci_hcd
May 16 18:19:55 kernel: usb-storage 4-1:1.0: USB Mass Storage device detected
May 16 18:19:55 kernel: scsi host16: usb-storage 4-1:1.0
May 16 18:19:56 kernel: scsi 16:0:0:0: Direct-Access     Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
May 16 18:19:56 kernel: sd 16:0:0:0: [sdb] 15138816 512-byte logical blocks: (7.75 GB/7.22 GiB)
May 16 18:19:56 kernel: sd 16:0:0:0: [sdb] Write Protect is off
May 16 18:19:56 kernel: sd 16:0:0:0: [sdb] Mode Sense: 45 00 00 00
May 16 18:19:56 kernel: sd 16:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
May 16 18:19:56 kernel:  sdb: sdb1
May 16 18:19:56 kernel: sd 16:0:0:0: [sdb] Attached SCSI removable disk

while there's no reaction from journalctl -fu autofs

I also have the following strange mounts, of course, as indicated by the journalctl -fu autofs output

$ mount | grep media
/etc/autofs/auto.misc on /media/misc type autofs (rw,relatime,fd=7,pgrp=3231,timeout=300,minproto=5,maxproto=5,indirect)
-hosts on /media/net type autofs (rw,relatime,fd=13,pgrp=3231,timeout=300,minproto=5,maxproto=5,indirect)

Thank you.

P.S. Perhaps I should have bumped the other thread, but since it was tagged as solved I figured posting an "open" topic was justified.

Last edited by aplainzetakind (2016-05-16 20:22:28)

Offline

#2 2016-05-16 18:51:17

branch
Member
Registered: 2014-03-16
Posts: 209

Re: [SOLVED] Can't get AutoFS to work

autofs mounts on demand. What happens if you try to access it?

ls /media/misc/usbstick

Last edited by branch (2016-05-16 18:51:39)

Offline

#3 2016-05-16 20:22:02

aplainzetakind
Member
Registered: 2016-05-16
Posts: 3

Re: [SOLVED] Can't get AutoFS to work

Well it indeed mounted then. I didn't know this was the behaviour to expect. Thanks.

So is

May 16 18:17:56 automount[3231]: lookup(file): failed to read included master map auto.master

safe to ignore?

Offline

#4 2016-05-16 22:22:29

branch
Member
Registered: 2014-03-16
Posts: 209

Re: [SOLVED] Can't get AutoFS to work

Probably, but you can get rid of it by deleting the line

+auto.master

from /etc/autofs/auto.master

Offline

Board footer

Powered by FluxBB