Xfce Forum

Sub domains
 

You are not logged in.

#1 2011-07-13 14:25:19

kajman
Member
Registered: 2011-06-20
Posts: 5

Thunar-volman mount options.

Hi!

Is there a way to change automount options in Thunar-Volman?
I'd like to change some USB mount options, since USB file copy is very slow, and I'd like to experiment with sync/flush, noatime and similiar options to see if it helps.

Some resources say to edit /etc/xdg/xfce4/mount.rc file, but I think that it's no longer there in 4.8. Any suggestions?

Cheers,
kajman

Offline

#2 2011-09-13 20:08:02

herd
Member
From: Germany
Registered: 2006-05-18
Posts: 143
Website

Re: Thunar-volman mount options.

The best way to achieve such things would be to edit udev rules since 4.8 has moved away from HAL.
Benefit: Works with any desktop.

http://google.com/?q=writing+udev+rules+usb

Offline

#3 2011-12-24 03:51:23

Oriel
Member
From: Chile
Registered: 2010-08-27
Posts: 8

Re: Thunar-volman mount options.

Is it certain that Xfce 4.8 does not use HAL anymore? All other pages I have read on this issue refer to HAL and say that for specifying mount options one should change mount.rc. How is it now controled what happens if I plug in a USB stick? Is there a description somewhere on xfce.org on how to create a udev rule for specifying mount options? (I want to mount with noatime and discard.)


Desktop with 3 GB RAM, OpenSUSE 11.3. (64 bit), Kile, OpenOffice, Firefox, Thunderbird. I prefer Xfce because of its speed.

Offline

#4 2011-12-30 08:36:01

stqn
Member
Registered: 2010-10-11
Posts: 174

Re: Thunar-volman mount options.

At the very least, Xfce 4.8 does not _require_ HAL, since it's not installed here.

A way to speed up writes to USB (and maybe network storage) is to tweak or disable transparent hugepages: https://bbs.archlinux.org/viewtopic.php … 6#p1033186

Offline

#5 2011-12-30 22:08:11

Oriel
Member
From: Chile
Registered: 2010-08-27
Posts: 8

Re: Thunar-volman mount options.

Can I still specify mount options for a USB stick in fstab? (I don't know yet how to produce a udev rule.) For example, by adding the line
/dev/sdc1   /media/STIFT   auto   user,exec,rw,noauto,noatime,discard,sync,umask=000   0  0
Or does that conflict with udev?

PS. This does not work. No I have tried to create an undev rule, saved in /etc/udev/rules.d/11-usb-mount-options.rules :

BUS=="usb", KERNEL=="sd?1", ACTION=="add", ENV{mount_options}="noatime,sync,discard"

But it does not work (after reboot). What is wrong?

Last edited by Oriel (2011-12-31 01:39:12)


Desktop with 3 GB RAM, OpenSUSE 11.3. (64 bit), Kile, OpenOffice, Firefox, Thunderbird. I prefer Xfce because of its speed.

Offline

#6 2011-12-31 14:11:58

Clio
Member
Registered: 2011-01-25
Posts: 97

Re: Thunar-volman mount options.

Offline

#7 2011-12-31 15:50:30

Oriel
Member
From: Chile
Registered: 2010-08-27
Posts: 8

Re: Thunar-volman mount options.

I did it and produced this udev rule, which works:
___________________________
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}="noatime,sync,nosuid,nodev"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=0,umask=000"
ACTION=="add", ENV{ID_FS_TYPE}=="ext4", ENV{mount_options}="$env{mount_options},discard"

# 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"
_____________________________________

The trouble is that with this rule my USB stick (ext4 without journaling) takes much longer for ejecting than before. Perhaps because of sync or because of discard. However, I deleted the rule and will just be content as it is. The ejecting is much faster than with ext2 anyway.


Desktop with 3 GB RAM, OpenSUSE 11.3. (64 bit), Kile, OpenOffice, Firefox, Thunderbird. I prefer Xfce because of its speed.

Offline

Board footer

Powered by FluxBB