[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Problem with udev and mount



Hello everyone,

Lately I ran into a problem with udev and mounting; I can't tell the
exact date, but it worked until around this May.

I have an udev rule to automatically mount an USB device:
ACTION=="add", KERNEL=="sd?1", ATTRS{idVendor}=="0781",
ATTRS{idProduct}=="5150", RUN+="/bin/mount -v %N"

Then I restart udev, also enable the verbose logging: udevadm control
--log-priority=debug

After attaching the device, the following is written into
/var/log/daemon.log:
June 21 15:07:49 host systemd-udevd[10216]: starting '/bin/mount -v
/dev/sdb1'
Jun 21 15:07:49 host systemd-udevd[10204]: '/bin/mount -v
/dev/sdb1'(out) 'mount: /dev/sdb1 mounted on /media/sdb1.'
Jun 21 15:07:49 host systemd-udevd[10204]: Process '/bin/mount -v
/dev/sdb1' succeeded.

Unfortunately the device doesn't get actually mounted: it doesn't appear
in the mount results.

If I do a manual mount 'mount /dev/sdb1', then everything works fine
(implying the fstab is working correctly).

I'm using stretch (Linux host 4.5.0-2-amd64 #1 SMP Debian 4.5.5-1
(2016-05-29) x86_64 GNU/Linux), and the versions are:
- udev: udev/testing,now 230-2 amd64 [installed]
- mount: mount/testing,now 2.28-5 amd64 [installed]

Am I missing something, or should this be reported as a bug?

Thanks,
Szilárd


Reply to: