You are not logged in.

#1 2010-03-19 20:12:53

gladstone
Member
Registered: 2009-01-03
Posts: 74

Unable to unmount a device mounted with UDEV

I use this Udev rule to automatically mount devices. However, I cannot unmount them using Thunar; the error being:

The volume "CENTRIOS" was probably mounted manually on the command line.

I can, however, unmount the device manually using sudo umount, which leaves me to believe the issue might be related to UDEV mounting as root?

This thread says to use ck-launch-session to start the WM, i.e.:

exec ck-launch-session xmonad

However, this didn't work for me.

Here's some relevant info:

$ ls -l /media
drwxrwxr-x 12 root users  16K Jan  1  1970 CENTRIOS
$ ls -l /dev/sdb1 
brw-rw---- 1 root disk 8, 17 Mar 11 19:07 /dev/sdb1
$ groups
tty disk wheel cron video audio optical storage camera users vboxusers

Offline

#2 2010-03-19 23:34:49

kgas
Member
From: Qatar
Registered: 2008-11-08
Posts: 718

Re: Unable to unmount a device mounted with UDEV

have a look at this post.

Offline

#3 2010-03-20 11:29:29

gladstone
Member
Registered: 2009-01-03
Posts: 74

Re: Unable to unmount a device mounted with UDEV

Simply unplugging it? Not really a solution wink

Offline

#4 2010-03-20 11:37:35

kgas
Member
From: Qatar
Registered: 2008-11-08
Posts: 718

Re: Unable to unmount a device mounted with UDEV

use a script to unmount the device by passing a parameter.
  or thro' udev write to a file what device and where it is mounting.
      if you finsh the work use the first method by reading the file udev wrote..
         Linux users are expected little bit attentive to their system  so unplugging is not a problem atleast to me.

Offline

#5 2010-03-29 10:11:28

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Unable to unmount a device mounted with UDEV

I have added an alternative ruleset to the udev wiki page that uses pmount instead of mount to facilitate user unmounting of udev-mounted devices.

Offline

#6 2010-03-29 14:03:45

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Unable to unmount a device mounted with UDEV

@tomk - I installed pmount, used your udev ruleset and changed to my username, but it doesn't work right. On boot only one of my usb partitions (NTFS) is mounted and the other ext4 remains unmounted. And I still cannot unmount the NTFS partition in Thunar.

Offline

#7 2010-03-29 15:32:52

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Unable to unmount a device mounted with UDEV

OK. I''m not using it at boot-time myself, nor am I using Thunar or any other gui filemanager. I can try a boot with something plugged in, but you'll need to look elsewhere for your Thunar issue.

My rules are based on xduugu's ruleset immediately above in the wiki page - does that one work for you?

Offline

#8 2010-03-29 15:49:27

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Unable to unmount a device mounted with UDEV

Yes, xduugu's ruleset does mount my partitions however I cannot unmount them as user.

Offline

#9 2010-03-29 19:13:06

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Unable to unmount a device mounted with UDEV

As expected. If I get to do a boot-time test, I'll let you know how it goes.

Slightly off topic, but if you want your drives mounted at boot-time, you could just use /etc/fstab.

Offline

#10 2010-03-29 20:07:15

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Unable to unmount a device mounted with UDEV

anonymous_user - fyi I had to reboot, so I plugged in a stick (VFAT) and an external drive (EXT3). Both were automounted successfully at boot, and both can be unmounted as user with pmount.

Offline

#11 2010-03-29 20:37:49

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Unable to unmount a device mounted with UDEV

tomk wrote:

Slightly off topic, but if you want your drives mounted at boot-time, you could just use /etc/fstab.

My USB drive is not ready at the time fstab is called. And if I mount them in rc.local, I think I would still need to be root to unmount them.

tomk wrote:

anonymous_user - fyi I had to reboot, so I plugged in a stick (VFAT) and an external drive (EXT3). Both were automounted successfully at boot, and both can be unmounted as user with pmount.

I tried disconnecting and reconncting my drive and the ext4 partition still doesn't automount.

Offline

#12 2010-03-29 22:32:27

xduugu
Member
Registered: 2008-10-16
Posts: 292

Re: Unable to unmount a device mounted with UDEV

The latest pmount release does not support ext4. You have to patch it.

Offline

#13 2010-03-29 22:39:19

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Unable to unmount a device mounted with UDEV

^ Drats.

Offline

#14 2010-03-29 23:25:14

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Unable to unmount a device mounted with UDEV

Or you could do a pmount git build.

Offline

Board footer

Powered by FluxBB