Re: Re: Problem with udev and mount

2016-06-23 Thread Szilard Andai
Thanks Michael, I see the changed functionality and solved the automount
with udisks2.

regards,
Szilárd



Re: Problem with udev and mount

2016-06-21 Thread Michael Biebl
Am 21.06.2016 um 18:28 schrieb Szilard Andai:
> 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"

...

> Unfortunately the device doesn't get actually mounted: it doesn't appear
> in the mount results.
> Am I missing something, or should this be reported as a bug?

See the changelog in 229-6

>   * Drop udev-re-enable-mount-propagation-for-udevd.patch, i. e. run udevd in
> its own slave mount name space again. laptop-mode-tools 1.68 fixed the
> original bug (#762018), thus add a Breaks: to earlier versions.


Running "mount" from within udev rules will make the mount points only
available for udev itself.

What you are doing is strongly discouraged. Use something like udisks2
instead, which listens on uevents and reacts accordingly.

Regards,
Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Problem with udev and mount

2016-06-21 Thread Szilard Andai
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