You are not logged in.

#1 2015-06-10 07:37:28

benutzer193
Member
Registered: 2015-06-10
Posts: 7

[Knowncause] Mount problem with devmon and udevil

Hi,

I have devmon along with udevil configured for automounting.
Some USB drives and SD cards mount without any problem.
But at least one USB drive takes a lot of time to mount and I have following error messages multiple times in the journal:

systemd-udevd[205]: error: /dev/sdb: No medium found

at the same time the following is printed multiple times:

devmon[379]: ===========================================
devmon[379]: changed:     /org/freedesktop/UDisks/devices/sdb
devmon[379]: ===========================================

Obviously the USB drive is recognized and after about 1-2 minutes devmon actually mounts the device succesfully:

devmon[379] added:     /org/freedesktop/UDisks/devices/sdb1
devmon[379]: device: [/dev/sdb1]
devmon[379]: systeminternal: [0]
devmon[379]: usage:          [filesystem]
devmon[379]: type:           [vfat]
devmon[379]: label:          []
devmon[379]: ismounted:      [0]
devmon[379]: nopolicy:       [0]
devmon[379]: hasmedia:       [1]
devmon[379]: opticaldisc:    []
devmon[379]: numaudiotracks: []
devmon[379]: blank:          []
devmon[379]: media:          []
devmon[379]: partition:      [1]
devmon[379]: devmon: /usr/sbin/udevil --mount /dev/sdb1 --mount-options "noexec,nosuid,nodev,noatime,flush"
devmon[379]: Mounted /dev/sdb1 at /media/sdb1-usb-Kingston_DT_Elit

I tried to reformat the drive multiple times using different filesystems, but nothing changed.
Manually mounting using '#mount /dev/sdb1 /path/to/mountpoint' is working without any problems.

I am thankful for any help I can get.
Thanks in advance.

Last edited by benutzer193 (2015-06-16 11:31:12)

Offline

#2 2015-06-10 11:51:43

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,413
Website

Re: [Knowncause] Mount problem with devmon and udevil

Install udisks2 and try "udisksctl mount -b /dev/sdb1".

If that works, see: https://wiki.archlinux.org/index.php/Udisks#Devmon (remove both -s and -x from /usr/bin/udevil)

Last edited by Alad (2015-06-10 11:54:04)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#3 2015-06-11 16:35:38

benutzer193
Member
Registered: 2015-06-10
Posts: 7

Re: [Knowncause] Mount problem with devmon and udevil

Thanks for the tip.
I tried changing the monitoring tool to udisks1 (if I am not completely mistaken pmount and udisks2 can only substitute udevil as mount tools).
Sadly devmon has the same problems monitoring this USB drive using udisks1.

If I am correct, pmount and udisks2 can only be used as mounting tools along with udevil as monitoring tool.
I tried every combination without success:

monitoring:
udevil
+ mounting:
udevil, udisks{1,2}, pmount

monitoring + mounting:
udisks1

Perhaps something is wrong with the USB drive after all. I am just not sure, because manual mounting is no problem.
Just monitoring seems to be the problem.

Is there anything else I could try to do with the USB drive?

Thanks again.

Last edited by benutzer193 (2015-06-11 16:35:58)

Offline

#4 2015-06-13 11:58:40

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,413
Website

Re: [Knowncause] Mount problem with devmon and udevil

So running udisksctl manually as suggested did work? Just making sure before posting an alternative solution.

Last edited by Alad (2015-06-13 12:15:19)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#5 2015-06-14 10:13:46

benutzer193
Member
Registered: 2015-06-10
Posts: 7

Re: [Knowncause] Mount problem with devmon and udevil

Yes I tried it already and it was working, I just forgot to mention.

But now it's strange.
Just to make sure I tried it again. The first time it was not working at once, but at the second try (leaving the USB drive in the USB port).

Then after unmounting, unplugging and replugging  I tried it again, but this time it wasn't working at all for about 5 minutes.
I just received following error:

Error looking up object for device /dev/sdb1

But after something about 5 minutes it just works, without doing anything - just repeated trying 'udisksctl mount -b /dev/sdb1':

==== AUTHENTICATING FOR org.freedesktop.udisks2.filesystem-mount-system ===
Authentication is required to mount Kingston DT Elite HS 2.0 (/dev/sdb1)
Authenticating as: ******
Password: 
==== AUTHENTICATION COMPLETE ===
Mounted /dev/sdb1 at /run/media/******/4579-7BA8.

I did nothing different than to the time before.
Is there an other information you I can give?

Last edited by benutzer193 (2015-06-14 10:16:52)

Offline

#6 2015-06-14 12:41:08

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,413
Website

Re: [Knowncause] Mount problem with devmon and udevil

This may be unrelated to your issue but I don't think you should get an authentication dialog from udisksctl. Make sure your session is active (loginctl show-session $XDG_SESSION_ID).

I think I know what you describe. To put things in an inaccurate way, udisks need certain information to mount a device, but it gets this only a while after you plugged your device. In some cases there's something off with the device and it only gets this information after a long time. Run lsblk during and after those 5 minutes and you should get the idea.

In my case it was some half-broken drive I had an issue with. I wouldn't know on the exact cause of it acting that way - journalctl -f before the mount might give some more information.

Either way, devmon certainly doesn't anticipate this behaviour - in my mount script I just run udevadm info periodically.

Last edited by Alad (2015-06-14 12:44:38)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#7 2015-06-14 14:41:39

benutzer193
Member
Registered: 2015-06-10
Posts: 7

Re: [Knowncause] Mount problem with devmon and udevil

I am using journalctl -f already to observe whats happening when I plug in the USB drive (the error messages I get multiple times fill the screen incredibly fast... ).
I mean this:

systemd-udevd[205]: error: /dev/sdb: No medium found

devmon[355]: ===========================================
devmon[355]: changed:     /org/freedesktop/UDisks/devices/sdb
devmon[355]: ===========================================

My session is active, I checked this already, because I was curious, why I get this authentication dialog. I believe it is since I uninstalled lightdm and use only startx to login.

I also checked lsblk already and there the drive is listed in about 3 secs.

So that means, probably the monitoring tool is not able to get all required information about the device, so the mount tool does not know which arguments it should use for mounting (filesystem, uid, etc.) and waits for the monitoring tool to fetch these informations?

In other words probably the USB drive is broken and I have either to manual mount it  or wait some time for devmon?
Or do you propose another solution.
Eg. find out what is wrong with the drive?
I already tried zeroing out the drive and reformat it using fat32 and ext4. But that's all I tried.
If you have no other ideas, I guess I'll close this topic and hope it's just the USB drive which is broken.

Thank you for your help!

Offline

#8 2015-06-15 05:58:21

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,413
Website

Re: [Knowncause] Mount problem with devmon and udevil

I also checked lsblk already and there the drive is listed in about 3 secs.

Well yes, but check with lsblk -f und you should see that FSTYPE isn't filled in, at least until after a while. It's a more low level thing than whatever an udev monitor like udevil does. (see e.g https://doc.opensuse.org/documentation/ … udev.html)

So yes, wait some time or mount it manually. Perhaps try badblocks and smartctl to see if there's some damage to the drive.


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#9 2015-06-15 22:33:57

benutzer193
Member
Registered: 2015-06-10
Posts: 7

Re: [Knowncause] Mount problem with devmon and udevil

Okay, I'll try that.
Thanks again for your help. I'll guess I mark it as solved...or is there a more appropriate tag?

Offline

#10 2015-06-16 09:15:41

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,413
Website

Re: [Knowncause] Mount problem with devmon and udevil

benutzer193 wrote:

I'll guess I mark it as solved...or is there a more appropriate tag?

You could do [Knowncause] or similar.. not commonplace but more accurate than Solved.

Last edited by Alad (2015-06-16 09:15:48)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#11 2015-06-16 11:31:31

benutzer193
Member
Registered: 2015-06-10
Posts: 7

Re: [Knowncause] Mount problem with devmon and udevil

Done!

Offline

Board footer

Powered by FluxBB