Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
KDE: mount and unmount USB stick
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
tomtom69
Tux's lil' helper
Tux's lil' helper


Joined: 09 Nov 2010
Posts: 100

PostPosted: Thu Sep 05, 2013 7:21 pm    Post subject: KDE: mount and unmount USB stick Reply with quote

Hi,

I have two (probably totally different) problems with KDE regarding mount/unmount USB stick:

(1) I have an entry in /etc/fstab to easily mount an USB stick plugged in to /mnt/usb:
/dev/sdc1 /mnt/usb vfat users,noauto,rw 0 0
This allows me to conveniantly mount an USB stick with mount /mnt/usb as a user on a command line.
However with this entry enabled KDE mounts an USB stick read-only, when I mount it via system tray popup.
I found out that this is udisks related, so that a volume with an entry in /etc/fstab is treated as a system volume which is always mounted read only when mounted via user.
Is there any option to keep the /etc/fstab entry AND tell KDE to mount the volume read-write using the system tray?

(2) Even without an /etc/fstab entry the "eject" action in the KDE system tray does not work properly. "Eject" seems to kick away the mount point without any chance to properly unmount it, causing file system errors.
When I insert an USB stick, mount it by KDE system tray and then eject it, I get the following messages in /var/log/messages (only eject messages shown):

--
udisksd[5497]: Cleaning up mount point /run/media/tom/02DD-ED90 (device 8:33 is not mounted)
udisksd[5497]: Unmounted /dev/sdc1 on behalf of uid 1000
dbus[4754]: [system] Rejected send message, 0 matched rules; type="method_return", sender=":1.8" (uid=0 pid=5497 comm="/usr/lib/udisks2/udisksd --no-debug ") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.12" (uid=1000 pid=5581 comm="/usr/bin/plasma-desktop ")
kernel: sdc: detected capacity change from 4009754624 to 0
--

What is new to me is the dbus message, and the fact that /dev/sdc1 disappears when I press the "eject" button in the KDE system tray. I cannot even re-mount or fdisk /dev/sdc1 after eject. If I copy files onto the USB stick they are mostly damaged or even the whole file system is damaged.

So at the moment I can not use KDE mount and unmount via system tray (not a real problem for me but not so easily expplainable to my wife who uses the same system...).
KDE version is 4.10.5, kernel is 3.6.11 (but problem also exists with kernel 3.10.7). However I can not say exactly since which version this occurs.
Anyone who knows how to fix this?

Tom
Back to top
View user's profile Send private message
radeczek
n00b
n00b


Joined: 21 Oct 2006
Posts: 10

PostPosted: Sat Sep 14, 2013 7:57 pm    Post subject: Reply with quote

I've had similar problem. When i plug USB device, KDE didn't know about it. But in /dev/ it was. When I want to list disks device in krusader, it show nothing and error in console:
Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Spawn.ChildExited"

Re-emerge udisks (udisks-1.0.4-r5) fails because bad libraries of udev and lvm2 after re-emerging them it was OK and now i can see USB disks.

Maybe this will help you.
Back to top
View user's profile Send private message
tomtom69
Tux's lil' helper
Tux's lil' helper


Joined: 09 Nov 2010
Posts: 100

PostPosted: Tue Sep 17, 2013 2:10 pm    Post subject: Reply with quote

Thank you for your answer.
I re-emerged udisks and udev and restarted the system, but there was no change (udisks and udev both compiled without problems).
lvm2 was not present on my system, but emerging it did also not change the behaviour (now removed it again because it seems I do not need it).

Some more Information:
I have 2 systems that show this behaviour. A 3rd system also mounts volumes with an /etc/fstab entry read-only and emits the dbus error message when I eject the volume, but this system cleanly unmounts the volume with the eject button from KDE. So the dbus message is not an indication of the problem.
Back to top
View user's profile Send private message
i92guboj
Moderator
Moderator


Joined: 30 Nov 2004
Posts: 9804
Location: Córdoba (Spain)

PostPosted: Tue Sep 17, 2013 2:54 pm    Post subject: Reply with quote

As far as I know, all the u* stuff won't work alongside the traditional fstab-based method.

Is there a reason why you can't use udisks to mount the drive(s)?

If you want to use the kde mount system alongside command line, your best bet is to remove all the custom stuff from /etc/fstab, then just use the udisks command line tool to mount and unmount drives. There's also bashmount, which is a simple bash frontend to that.
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2108
Location: Finland

PostPosted: Tue Sep 17, 2013 3:21 pm    Post subject: Reply with quote

i92guboj wrote:
As far as I know, all the u* stuff won't work alongside the traditional fstab-based method.


This is true for UDisks1, entries in /etc/fstab would conflict and break. However, UDisks2 was changed to allow /etc/fstab entries.

Thus:

Quote:

[ebuild R ] sys-fs/udisks-1.0.4-r5 USE="nls -debug -remote-access (-selinux)" 0 kB <- Won't work with conflicting fstab entries.
[ebuild R ] sys-fs/udisks-2.1.1:2 USE="gptfdisk introspection -cryptsetup -debug (-selinux) -systemd" 0 kB <- Will work even with fstab entries.
Back to top
View user's profile Send private message
i92guboj
Moderator
Moderator


Joined: 30 Nov 2004
Posts: 9804
Location: Córdoba (Spain)

PostPosted: Tue Sep 17, 2013 4:21 pm    Post subject: Reply with quote

Then I stand correcte. Thank you for the clarification ;)
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
tomtom69
Tux's lil' helper
Tux's lil' helper


Joined: 09 Nov 2010
Posts: 100

PostPosted: Wed Sep 18, 2013 9:08 pm    Post subject: Reply with quote

The only reason why I want to mount drives directly is habit. For someone like me who uses the mount command for >15 years now it is not easy to understand the advantage from something like udisks when it breaks such a basic thing. However if there is no solution I will have to switch (sigh...) to a bash script.
What hurts more is problem (2) because it damages file systems and this still happens even without an fstab entry.
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2108
Location: Finland

PostPosted: Thu Sep 19, 2013 6:14 am    Post subject: Reply with quote

tomtom69 wrote:
The only reason why I want to mount drives directly is habit. For someone like me who uses the mount command for >15 years now it is not easy to understand the advantage from something like udisks when it breaks such a basic thing. However if there is no solution I will have to switch (sigh...) to a bash script.
What hurts more is problem (2) because it damages file systems and this still happens even without an fstab entry.


Damages file systems, even when mounted and unmounted correctly using `udiskctl mount` or `udisksctl unmount`?
Back to top
View user's profile Send private message
tomtom69
Tux's lil' helper
Tux's lil' helper


Joined: 09 Nov 2010
Posts: 100

PostPosted: Thu Sep 19, 2013 3:55 pm    Post subject: Reply with quote

Using udiskctl mount / unmount works.
Only when using the KDE device notifier to mount and safely remove the volume is not correctly unmounted.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum