You are not logged in.
Pages: 1
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
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.
Offline
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
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
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
Have a look on this:
https://wiki.archlinux.org/index.php/Udev
Offline
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
Pages: 1
[ Generated in 0.013 seconds, 8 queries executed - Memory usage: 541.84 KiB (Peak: 543.13 KiB) ]