You are not logged in.

#1 2010-09-20 05:24:00

anthonyclark
Member
From: WA,USA
Registered: 2007-10-07
Posts: 48

[Solved]Yet Another HAL / Mounting issue....

My issue can be avoided by manually mounting a device, just to get that out there.

Whenever I transfer a larger file ( > 200mb) onto a removable USB device formated in either FAT or any non-journaled filesystem, Thunar will *pretend* like its unmounting the device but after about 20 seconds it states:


 Failed to unmount "<device name>".    
Did not receive a reply. Possible causes include: the remote application did not send a reply,
 the message bus security policy blocked the reply, the reply timeout expired, 
or the network connection was broken. 

On top of the message, my data written is mostly corrupt.


What I know:
** Thunar uses exo-unmount to unmount devices given a HAL uuid. Maybe this is failing? Any clue how to debug this?
** 20-storage-methods.fdi states that all vfat mounted devices have 'flush' and 'async' mount options... could this be an issue?
** I'm part of the 'storage' and 'power' groups.
** i start XFCE using ck-launch-session startxfce4


I've made sure that the device has no other handles and is not open in any window. My system(s) all have new and updated HAL and DBUS, as well as every other package. Running 'sync' after writing the files sometimes fixes the issue. Does anyone have a fix for why removable drives aren't "sending a reply" ? Thanks!


--Anthony

Last edited by anthonyclark (2010-09-22 17:48:13)

Offline

#2 2010-09-22 03:49:23

anthonyclark
Member
From: WA,USA
Registered: 2007-10-07
Posts: 48

Re: [Solved]Yet Another HAL / Mounting issue....

Alright ... well. I managed to solve this kind of. As per my last post regarding the same exact issue, I must've missed a reply from Inxsible telling me to use the FIRST suggest UDEV rule from the arch udev wiki.

The result of this is basically...
*Device inserted
*Mounted in /media/<device name> automatically
*(No access via Thunar sidepane since it gets mounted with `mount`)
*No need to manually unmount
*just unplug or power off the device and it gets "lazy" unmounted via `unmount`


Downside:
*Mounting a drive via TrueCrypt creates a directory in /media that doesn't get automatically deleted.
*Not a solution to Thunar having response issues with unmounting.

/etc/udev/rules.d/11-media-by-label-auto-mount.rules

KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"

# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"

# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"

# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"

# Mount the device
ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}"

# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"

# Exit
LABEL="media_by_label_auto_mount_end"

Last edited by anthonyclark (2010-09-22 03:50:00)

Offline

Board footer

Powered by FluxBB